From 9da89f5101759e28ed50c87acf312e7b375f086e Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 7 Mar 2011 10:23:43 -0500 Subject: [PATCH] Fix bug in generation allocation header, when payment has datetrx <> dateacct the allocation was being generated with wrong dateacct --- org.adempiere.base/src/org/compiere/model/MPayment.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/MPayment.java b/org.adempiere.base/src/org/compiere/model/MPayment.java index 72e4838268..27705fc375 100644 --- a/org.adempiere.base/src/org/compiere/model/MPayment.java +++ b/org.adempiere.base/src/org/compiere/model/MPayment.java @@ -2072,6 +2072,7 @@ public final class MPayment extends X_C_Payment getDateTrx(), getC_Currency_ID(), 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 alloc.saveEx(); MAllocationLine aLine = null; if (isReceipt()) @@ -2109,7 +2110,8 @@ public final class MPayment extends X_C_Payment getDateTrx(), getC_Currency_ID(), Msg.translate(getCtx(), "C_Payment_ID") + ": " + getDocumentNo() + " [n]", get_TrxName()); alloc.setAD_Org_ID(getAD_Org_ID()); - + alloc.setDateAcct(getDateAcct()); // in case date acct is different from datetrx in payment + String sql = "SELECT psc.C_BPartner_ID, psl.C_Invoice_ID, psl.IsSOTrx, " // 1..3 + " psl.PayAmt, psl.DiscountAmt, psl.DifferenceAmt, psl.OpenAmt " + "FROM C_PaySelectionLine psl"