BF [1933948] - CalloutPayment working just with Draft Status
https://sourceforge.net/tracker/index.php?func=detail&aid=1933948&group_id=176962&atid=879332
This commit is contained in:
parent
65842a7312
commit
ce4d1b2ca3
|
@ -35,6 +35,8 @@ import org.compiere.util.Env;
|
|||
* <li>BF [ 1803316 ] CalloutPayment: use C_Order.Bill_BPartner_ID
|
||||
* @author j2garcia - GlobalQSS
|
||||
* <li>BF [ 2021745 ] Cannot assign project to payment with charge
|
||||
* @author Carlos Ruiz - GlobalQSS
|
||||
* <li>BF [ 1933948 ] CalloutPayment working just with Draft Status
|
||||
*/
|
||||
public class CalloutPayment extends CalloutEngine
|
||||
{
|
||||
|
@ -429,31 +431,25 @@ public class CalloutPayment extends CalloutEngine
|
|||
mTab.setValue ("WriteOffAmt", Env.ZERO);
|
||||
if (Env.ZERO.compareTo (OverUnderAmt) != 0)
|
||||
mTab.setValue ("OverUnderAmt", Env.ZERO);
|
||||
}
|
||||
// PayAmt - calculate write off
|
||||
// Added Lines By Goodwill (02-03-2006)
|
||||
// Reason: we must make the callout is called just when docstatus is
|
||||
// draft
|
||||
// Old Code : else if (colName.equals("PayAmt"))
|
||||
// New Code :
|
||||
else if (colName.equals ("PayAmt")
|
||||
&& mTab.get_ValueAsString ("DocStatus").equals ("DR")
|
||||
&& "Y"
|
||||
.equals (Env.getContext (ctx, WindowNo, "IsOverUnderPayment")))
|
||||
} else {
|
||||
boolean processed = mTab.getValueAsBoolean(MPayment.COLUMNNAME_Processed);
|
||||
if (colName.equals ("PayAmt")
|
||||
&& (!processed)
|
||||
&& "Y".equals (Env.getContext (ctx, WindowNo, "IsOverUnderPayment")))
|
||||
{
|
||||
OverUnderAmt = InvoiceOpenAmt.subtract (PayAmt).subtract (
|
||||
DiscountAmt).subtract (WriteOffAmt);
|
||||
mTab.setValue ("OverUnderAmt", OverUnderAmt);
|
||||
}
|
||||
else if (colName.equals ("PayAmt")
|
||||
&& mTab.get_ValueAsString ("DocStatus").equals ("DR"))
|
||||
&& (!processed))
|
||||
{
|
||||
WriteOffAmt = InvoiceOpenAmt.subtract (PayAmt).subtract (
|
||||
DiscountAmt).subtract (OverUnderAmt);
|
||||
mTab.setValue ("WriteOffAmt", WriteOffAmt);
|
||||
}
|
||||
else if (colName.equals ("IsOverUnderPayment")
|
||||
&& mTab.get_ValueAsString ("DocStatus").equals ("DR"))
|
||||
&& (!processed))
|
||||
{
|
||||
boolean overUnderPaymentActive = "Y".equals (Env.getContext (ctx,
|
||||
WindowNo, "IsOverUnderPayment"));
|
||||
|
@ -475,7 +471,7 @@ public class CalloutPayment extends CalloutEngine
|
|||
// draft
|
||||
// Old Code : else // calculate PayAmt
|
||||
// New Code :
|
||||
else if (mTab.get_ValueAsString ("DocStatus").equals ("DR")) // calculate
|
||||
else if ((!processed)) // calculate
|
||||
// PayAmt
|
||||
// End By Goodwill
|
||||
{
|
||||
|
@ -483,6 +479,7 @@ public class CalloutPayment extends CalloutEngine
|
|||
WriteOffAmt).subtract (OverUnderAmt);
|
||||
mTab.setValue ("PayAmt", PayAmt);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
} // amounts
|
||||
} // CalloutPayment
|
||||
|
|
Loading…
Reference in New Issue