IDEMPIERE-814 POS Sales Order generating Cash transactions

This commit is contained in:
Carlos Ruiz 2013-04-23 18:43:32 -05:00
parent 53c8d8d9d9
commit d22a69c1f6
1 changed files with 5 additions and 0 deletions

View File

@ -2290,6 +2290,11 @@ public class MOrder extends X_C_Order implements DocAction
// end added // end added
invoice.saveEx(get_TrxName()); invoice.saveEx(get_TrxName());
setC_CashLine_ID(invoice.getC_CashLine_ID()); setC_CashLine_ID(invoice.getC_CashLine_ID());
if (PAYMENTRULE_Cash.equals(invoice.getPaymentRule()) && getC_POS_ID() == 0) {
if (invoice.testAllocation()) {
invoice.saveEx();
}
}
if (!DOCSTATUS_Completed.equals(invoice.getDocStatus())) if (!DOCSTATUS_Completed.equals(invoice.getDocStatus()))
{ {
m_processMsg = "@C_Invoice_ID@: " + invoice.getProcessMsg(); m_processMsg = "@C_Invoice_ID@: " + invoice.getProcessMsg();