Fixed wrong checking on whether invoice is linked with order, reported at http://red1.org/adempiere/viewtopic.php?f=31&t=1337
Fixes IDEMPIERE-47 Customer Return - Generate Invoice error http://jira.idempiere.com/browse/IDEMPIERE-47
This commit is contained in:
parent
2959a43ad9
commit
f9fd4b80c5
|
@ -108,8 +108,8 @@ public class InOutCreateInvoice extends SvrProcess
|
||||||
throw new IllegalArgumentException("Cannot save Invoice Line");
|
throw new IllegalArgumentException("Cannot save Invoice Line");
|
||||||
}
|
}
|
||||||
|
|
||||||
MOrder order = new MOrder(getCtx(), invoice.getC_Order_ID(), get_TrxName());
|
if (invoice.getC_Order_ID() > 0) {
|
||||||
if (order != null) {
|
MOrder order = new MOrder(getCtx(), invoice.getC_Order_ID(), get_TrxName());
|
||||||
invoice.setPaymentRule(order.getPaymentRule());
|
invoice.setPaymentRule(order.getPaymentRule());
|
||||||
invoice.setC_PaymentTerm_ID(order.getC_PaymentTerm_ID());
|
invoice.setC_PaymentTerm_ID(order.getC_PaymentTerm_ID());
|
||||||
invoice.saveEx();
|
invoice.saveEx();
|
||||||
|
|
Loading…
Reference in New Issue