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:
Heng Sin Low 2011-08-04 21:36:24 -05:00
parent 2959a43ad9
commit f9fd4b80c5
1 changed files with 3 additions and 3 deletions

View File

@ -108,8 +108,8 @@ public class InOutCreateInvoice extends SvrProcess
throw new IllegalArgumentException("Cannot save Invoice Line");
}
if (invoice.getC_Order_ID() > 0) {
MOrder order = new MOrder(getCtx(), invoice.getC_Order_ID(), get_TrxName());
if (order != null) {
invoice.setPaymentRule(order.getPaymentRule());
invoice.setC_PaymentTerm_ID(order.getC_PaymentTerm_ID());
invoice.saveEx();