Fix bug in generation allocation header, when payment has datetrx <> dateacct the allocation was being generated with wrong dateacct
This commit is contained in:
parent
cc8e13b32f
commit
9da89f5101
|
@ -2072,6 +2072,7 @@ public final class MPayment extends X_C_Payment
|
||||||
getDateTrx(), getC_Currency_ID(),
|
getDateTrx(), getC_Currency_ID(),
|
||||||
Msg.translate(getCtx(), "C_Payment_ID") + ": " + getDocumentNo() + " [1]", get_TrxName());
|
Msg.translate(getCtx(), "C_Payment_ID") + ": " + getDocumentNo() + " [1]", get_TrxName());
|
||||||
alloc.setAD_Org_ID(getAD_Org_ID());
|
alloc.setAD_Org_ID(getAD_Org_ID());
|
||||||
|
alloc.setDateAcct(getDateAcct()); // in case date acct is different from datetrx in payment
|
||||||
alloc.saveEx();
|
alloc.saveEx();
|
||||||
MAllocationLine aLine = null;
|
MAllocationLine aLine = null;
|
||||||
if (isReceipt())
|
if (isReceipt())
|
||||||
|
@ -2109,6 +2110,7 @@ public final class MPayment extends X_C_Payment
|
||||||
getDateTrx(), getC_Currency_ID(),
|
getDateTrx(), getC_Currency_ID(),
|
||||||
Msg.translate(getCtx(), "C_Payment_ID") + ": " + getDocumentNo() + " [n]", get_TrxName());
|
Msg.translate(getCtx(), "C_Payment_ID") + ": " + getDocumentNo() + " [n]", get_TrxName());
|
||||||
alloc.setAD_Org_ID(getAD_Org_ID());
|
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
|
String sql = "SELECT psc.C_BPartner_ID, psl.C_Invoice_ID, psl.IsSOTrx, " // 1..3
|
||||||
+ " psl.PayAmt, psl.DiscountAmt, psl.DifferenceAmt, psl.OpenAmt "
|
+ " psl.PayAmt, psl.DiscountAmt, psl.DifferenceAmt, psl.OpenAmt "
|
||||||
|
|
Loading…
Reference in New Issue