IDEMPIERE-4220 payment could not be committed due to wrong invoice date #resolve #comment Fixed trx issue (#26)

This commit is contained in:
Carlos Ruiz 2020-05-03 15:38:47 +02:00 committed by GitHub
parent 5c523c5f12
commit 58187cdc05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2339,7 +2339,7 @@ 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());
MInvoice invoice = new MInvoice(getCtx(), getC_Invoice_ID(), get_TrxName());
if (invoice.getDateAcct().after(alloc.getDateAcct())) {
alloc.setDateAcct(invoice.getDateAcct());
}