IDEMPIERE-4020 Payment Reverse/Correct with C_Project_ID generating wrong GL postings
This commit is contained in:
parent
74a84a9fa4
commit
5b9f61ae52
|
@ -726,10 +726,20 @@ public class MPayment extends X_C_Payment
|
||||||
if (newRecord
|
if (newRecord
|
||||||
|| is_ValueChanged("C_Charge_ID") || is_ValueChanged("C_Invoice_ID")
|
|| is_ValueChanged("C_Charge_ID") || is_ValueChanged("C_Invoice_ID")
|
||||||
|| is_ValueChanged("C_Order_ID") || is_ValueChanged("C_Project_ID"))
|
|| is_ValueChanged("C_Order_ID") || is_ValueChanged("C_Project_ID"))
|
||||||
setIsPrepayment (getC_Charge_ID() == 0
|
{
|
||||||
&& getC_BPartner_ID() != 0
|
if (getReversal_ID() > 0)
|
||||||
&& (getC_Order_ID() != 0
|
{
|
||||||
|| (getC_Project_ID() != 0 && getC_Invoice_ID() == 0)));
|
setIsPrepayment(getReversal().isPrepayment());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
setIsPrepayment (getC_Charge_ID() == 0
|
||||||
|
&& getC_BPartner_ID() != 0
|
||||||
|
&& (getC_Order_ID() != 0
|
||||||
|
|| (getC_Project_ID() != 0 && getC_Invoice_ID() == 0)));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (isPrepayment())
|
if (isPrepayment())
|
||||||
{
|
{
|
||||||
if (newRecord
|
if (newRecord
|
||||||
|
|
Loading…
Reference in New Issue