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
|
@ -107,9 +107,9 @@ public class InOutCreateInvoice extends SvrProcess
|
|||
if (!line.save())
|
||||
throw new IllegalArgumentException("Cannot save Invoice Line");
|
||||
}
|
||||
|
||||
MOrder order = new MOrder(getCtx(), invoice.getC_Order_ID(), get_TrxName());
|
||||
if (order != null) {
|
||||
|
||||
if (invoice.getC_Order_ID() > 0) {
|
||||
MOrder order = new MOrder(getCtx(), invoice.getC_Order_ID(), get_TrxName());
|
||||
invoice.setPaymentRule(order.getPaymentRule());
|
||||
invoice.setC_PaymentTerm_ID(order.getC_PaymentTerm_ID());
|
||||
invoice.saveEx();
|
||||
|
|
Loading…
Reference in New Issue