diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java b/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java index f608302731..d3ba73baf2 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java @@ -433,14 +433,17 @@ public class ImportBankStatement extends SvrProcess statement.setEndingBalance(Env.ZERO); // Copy statement data - if (imp.getName() != null) - { + if (imp.getName() != null) { statement.setName(imp.getName()); } - if (imp.getStatementDate() != null) - { + if (imp.getStatementDate() != null) { statement.setStatementDate(imp.getStatementDate()); } + if (imp.getDateAcct() != null) { + statement.setDateAcct(imp.getDateAcct()); + } else { + statement.setDateAcct(statement.getStatementDate()); + } statement.setDescription(imp.getDescription()); statement.setEftStatementReference(imp.getEftStatementReference()); statement.setEftStatementDate(imp.getEftStatementDate()); @@ -460,7 +463,7 @@ public class ImportBankStatement extends SvrProcess line.setReferenceNo(imp.getReferenceNo()); line.setDescription(imp.getLineDescription()); line.setStatementLineDate(imp.getStatementLineDate()); - line.setDateAcct(imp.getStatementLineDate()); + // line.setDateAcct(imp.getStatementLineDate()); // set on beforeSave line.setValutaDate(imp.getValutaDate()); line.setIsReversal(imp.isReversal()); line.setC_Currency_ID(imp.getC_Currency_ID()); diff --git a/org.adempiere.base/src/org/compiere/model/MBankStatement.java b/org.adempiere.base/src/org/compiere/model/MBankStatement.java index fff3eb2bfb..d5a41708dc 100644 --- a/org.adempiere.base/src/org/compiere/model/MBankStatement.java +++ b/org.adempiere.base/src/org/compiere/model/MBankStatement.java @@ -100,6 +100,7 @@ public class MBankStatement extends X_C_BankStatement implements DocAction setClientOrg(account); setC_BankAccount_ID(account.getC_BankAccount_ID()); setStatementDate(new Timestamp(System.currentTimeMillis())); + setDateAcct(new Timestamp(System.currentTimeMillis())); setBeginningBalance(account.getCurrentBalance()); setName(getStatementDate().toString()); setIsManual(isManual);