[ 1703207 ] Issue when push button Paymenet Rule fo Order Complete
Fix bug introduced in revision 2161 (NPE)
This commit is contained in:
parent
c2faba83d5
commit
b29b483ba1
|
@ -1023,19 +1023,23 @@ public class VPayment extends CDialog
|
||||||
if (cl.save())
|
if (cl.save())
|
||||||
{
|
{
|
||||||
log.config("CashCreated");
|
log.config("CashCreated");
|
||||||
if(invoice == null && C_Invoice_ID != 0)
|
if (invoice == null && C_Invoice_ID != 0)
|
||||||
{
|
{
|
||||||
invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, null);
|
invoice = new MInvoice (Env.getCtx(), C_Invoice_ID, null);
|
||||||
}
|
}
|
||||||
|
if (invoice != null) {
|
||||||
invoice.setC_CashLine_ID(cl.getC_CashLine_ID());
|
invoice.setC_CashLine_ID(cl.getC_CashLine_ID());
|
||||||
invoice.save();
|
invoice.save();
|
||||||
|
}
|
||||||
|
|
||||||
if(order == null && C_Order_ID != 0)
|
if (order == null && C_Order_ID != 0)
|
||||||
{
|
{
|
||||||
order = new MOrder (Env.getCtx(), C_Order_ID, null);
|
order = new MOrder (Env.getCtx(), C_Order_ID, null);
|
||||||
}
|
}
|
||||||
|
if (order != null) {
|
||||||
order.setC_CashLine_ID(cl.getC_CashLine_ID());
|
order.setC_CashLine_ID(cl.getC_CashLine_ID());
|
||||||
order.save();
|
order.save();
|
||||||
|
}
|
||||||
log.config("Update Order & Invoice with CashLine");
|
log.config("Update Order & Invoice with CashLine");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue