IDEMPIERE-4220 payment could not be committed due to wrong invoice date
This commit is contained in:
parent
281912af45
commit
0b663af8ab
|
@ -2339,6 +2339,10 @@ public class MPayment extends X_C_Payment
|
|||
Msg.translate(getCtx(), "C_Payment_ID") + ": " + getDocumentNo() + " [1]", get_TrxName());
|
||||
alloc.setAD_Org_ID(getAD_Org_ID());
|
||||
alloc.setDateAcct(getDateAcct()); // in case date acct is different from datetrx in payment
|
||||
MInvoice invoice = MInvoice.get(getCtx(), getC_Invoice_ID());
|
||||
if (invoice.getDateAcct().after(alloc.getDateAcct())) {
|
||||
alloc.setDateAcct(invoice.getDateAcct());
|
||||
}
|
||||
alloc.saveEx();
|
||||
MAllocationLine aLine = null;
|
||||
if (isReceipt())
|
||||
|
|
Loading…
Reference in New Issue