Bug Fix #1702235
This commit is contained in:
parent
c17c1ae08c
commit
49d4a971c3
|
@ -324,6 +324,11 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
|
||||||
maxDate = line.getDateAcct();
|
maxDate = line.getDateAcct();
|
||||||
}
|
}
|
||||||
setStatementDifference(total);
|
setStatementDifference(total);
|
||||||
|
//AZ Goodwill
|
||||||
|
//refresh current balance
|
||||||
|
MBankAccount ba = MBankAccount.get(getCtx(), getC_BankAccount_ID());
|
||||||
|
setBeginningBalance(ba.getCurrentBalance());
|
||||||
|
//end AZ
|
||||||
setEndingBalance(getBeginningBalance().add(total));
|
setEndingBalance(getBeginningBalance().add(total));
|
||||||
if (!MPeriod.isOpen(getCtx(), minDate, MDocType.DOCBASETYPE_BankStatement)
|
if (!MPeriod.isOpen(getCtx(), minDate, MDocType.DOCBASETYPE_BankStatement)
|
||||||
|| !MPeriod.isOpen(getCtx(), maxDate, MDocType.DOCBASETYPE_BankStatement))
|
|| !MPeriod.isOpen(getCtx(), maxDate, MDocType.DOCBASETYPE_BankStatement))
|
||||||
|
@ -457,6 +462,13 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
|
||||||
if (MFactAcct.delete(Table_ID, getC_BankStatement_ID(), get_TrxName()) < 0)
|
if (MFactAcct.delete(Table_ID, getC_BankStatement_ID(), get_TrxName()) < 0)
|
||||||
return false; // could not delete
|
return false; // could not delete
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Added Lines by AZ Goodwill
|
||||||
|
//Recover Bank Account
|
||||||
|
MBankAccount ba = MBankAccount.get(getCtx(), getC_BankAccount_ID());
|
||||||
|
ba.setCurrentBalance(ba.getCurrentBalance().subtract(getStatementDifference()));
|
||||||
|
ba.save(get_TrxName());
|
||||||
|
//End of Added Lines
|
||||||
|
|
||||||
// Set lines to 0
|
// Set lines to 0
|
||||||
MBankStatementLine[] lines = getLines(true);
|
MBankStatementLine[] lines = getLines(true);
|
||||||
|
@ -488,6 +500,11 @@ public class MBankStatement extends X_C_BankStatement implements DocAction
|
||||||
MPayment payment = new MPayment (getCtx(), line.getC_Payment_ID(), get_TrxName());
|
MPayment payment = new MPayment (getCtx(), line.getC_Payment_ID(), get_TrxName());
|
||||||
payment.setIsReconciled(false);
|
payment.setIsReconciled(false);
|
||||||
payment.save(get_TrxName());
|
payment.save(get_TrxName());
|
||||||
|
// MZ (Goodwill)
|
||||||
|
// set Payment to NULL
|
||||||
|
line.setC_Payment_ID(0);
|
||||||
|
line.save(get_TrxName());
|
||||||
|
// end MZ
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue