IDEMPIERE-985 NPE In Callout for Payment Window
This commit is contained in:
parent
2bbff2bf5c
commit
f24ff19805
|
@ -363,14 +363,24 @@ public class CalloutPayment extends CalloutEngine
|
||||||
+ ", C_Currency_ID=" + C_Currency_Invoice_ID);
|
+ ", C_Currency_ID=" + C_Currency_Invoice_ID);
|
||||||
// Get Info from Tab
|
// Get Info from Tab
|
||||||
BigDecimal PayAmt = (BigDecimal)mTab.getValue ("PayAmt");
|
BigDecimal PayAmt = (BigDecimal)mTab.getValue ("PayAmt");
|
||||||
|
if (PayAmt == null)
|
||||||
|
PayAmt = Env.ZERO;
|
||||||
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue ("DiscountAmt");
|
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue ("DiscountAmt");
|
||||||
|
if (DiscountAmt == null)
|
||||||
|
DiscountAmt = Env.ZERO;
|
||||||
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue ("WriteOffAmt");
|
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue ("WriteOffAmt");
|
||||||
|
if (WriteOffAmt == null)
|
||||||
|
WriteOffAmt = Env.ZERO;
|
||||||
BigDecimal OverUnderAmt = (BigDecimal)mTab.getValue ("OverUnderAmt");
|
BigDecimal OverUnderAmt = (BigDecimal)mTab.getValue ("OverUnderAmt");
|
||||||
|
if (OverUnderAmt == null)
|
||||||
|
OverUnderAmt = Env.ZERO;
|
||||||
if (log.isLoggable(Level.FINE)) log.fine ("Pay=" + PayAmt + ", Discount=" + DiscountAmt + ", WriteOff="
|
if (log.isLoggable(Level.FINE)) log.fine ("Pay=" + PayAmt + ", Discount=" + DiscountAmt + ", WriteOff="
|
||||||
+ WriteOffAmt + ", OverUnderAmt=" + OverUnderAmt);
|
+ WriteOffAmt + ", OverUnderAmt=" + OverUnderAmt);
|
||||||
// Get Currency Info
|
// Get Currency Info
|
||||||
int C_Currency_ID = ((Integer)mTab.getValue ("C_Currency_ID"))
|
Integer curr_int = (Integer) mTab.getValue ("C_Currency_ID");
|
||||||
.intValue ();
|
if (curr_int == null)
|
||||||
|
curr_int = Integer.valueOf(0);
|
||||||
|
int C_Currency_ID = curr_int.intValue ();
|
||||||
MCurrency currency = MCurrency.get (ctx, C_Currency_ID);
|
MCurrency currency = MCurrency.get (ctx, C_Currency_ID);
|
||||||
Timestamp ConvDate = (Timestamp)mTab.getValue ("DateTrx");
|
Timestamp ConvDate = (Timestamp)mTab.getValue ("DateTrx");
|
||||||
int C_ConversionType_ID = 0;
|
int C_ConversionType_ID = 0;
|
||||||
|
|
|
@ -152,9 +152,17 @@ public class CalloutPaymentAllocate extends CalloutEngine
|
||||||
return "";
|
return "";
|
||||||
// Get Info from Tab
|
// Get Info from Tab
|
||||||
BigDecimal Amount = (BigDecimal)mTab.getValue ("Amount");
|
BigDecimal Amount = (BigDecimal)mTab.getValue ("Amount");
|
||||||
|
if (Amount == null)
|
||||||
|
Amount = Env.ZERO;
|
||||||
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue ("DiscountAmt");
|
BigDecimal DiscountAmt = (BigDecimal)mTab.getValue ("DiscountAmt");
|
||||||
|
if (DiscountAmt == null)
|
||||||
|
DiscountAmt = Env.ZERO;
|
||||||
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue ("WriteOffAmt");
|
BigDecimal WriteOffAmt = (BigDecimal)mTab.getValue ("WriteOffAmt");
|
||||||
|
if (WriteOffAmt == null)
|
||||||
|
WriteOffAmt = Env.ZERO;
|
||||||
BigDecimal OverUnderAmt = (BigDecimal)mTab.getValue ("OverUnderAmt");
|
BigDecimal OverUnderAmt = (BigDecimal)mTab.getValue ("OverUnderAmt");
|
||||||
|
if (OverUnderAmt == null)
|
||||||
|
OverUnderAmt = Env.ZERO;
|
||||||
BigDecimal InvoiceAmt = (BigDecimal)mTab.getValue("InvoiceAmt");
|
BigDecimal InvoiceAmt = (BigDecimal)mTab.getValue("InvoiceAmt");
|
||||||
if (log.isLoggable(Level.FINE)) log.fine("Amt=" + Amount + ", Discount=" + DiscountAmt
|
if (log.isLoggable(Level.FINE)) log.fine("Amt=" + Amount + ", Discount=" + DiscountAmt
|
||||||
+ ", WriteOff=" + WriteOffAmt + ", OverUnder=" + OverUnderAmt
|
+ ", WriteOff=" + WriteOffAmt + ", OverUnder=" + OverUnderAmt
|
||||||
|
|
Loading…
Reference in New Issue