IDEMPIERE-610 Import of BankStatement does not work (can not create new bank statements) - thanks to Thomas Bayen

This commit is contained in:
Carlos Ruiz 2013-02-06 10:10:26 -05:00
parent de43068dee
commit 8d66ca7fe7
2 changed files with 9 additions and 5 deletions

View File

@ -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());

View File

@ -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);