Validate Invoice commit when complete it in GenerateInvoice - fixes #36
http://bitbucket.org/idempiere/idempiere/issue/36 Thanks to fercho_comus for pointing here
This commit is contained in:
parent
5cfcc86631
commit
21d5cc1e40
|
@ -213,7 +213,7 @@ public class InvoiceGenerate extends SvrProcess
|
|||
{
|
||||
log.warning("BPartner has no Schedule - set to After Delivery");
|
||||
order.setInvoiceRule(MOrder.INVOICERULE_AfterDelivery);
|
||||
order.save();
|
||||
order.saveEx();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -479,7 +479,7 @@ public class InvoiceGenerate extends SvrProcess
|
|||
ips.setAD_Org_ID(ops.getAD_Org_ID());
|
||||
ips.setProcessing(ops.isProcessing());
|
||||
ips.setIsActive(ops.isActive());
|
||||
ips.save();
|
||||
ips.saveEx();
|
||||
}
|
||||
m_invoice.validatePaySchedule();
|
||||
m_invoice.saveEx();
|
||||
|
@ -491,13 +491,8 @@ public class InvoiceGenerate extends SvrProcess
|
|||
log.warning("completeInvoice - failed: " + m_invoice);
|
||||
addLog("completeInvoice - failed: " + m_invoice); // Elaine 2008/11/25
|
||||
}
|
||||
///fercho m_invoice.save();
|
||||
if (!m_invoice.save())
|
||||
{
|
||||
log.warning("completeInvoice - failed: " + m_invoice);
|
||||
addLog("completeInvoice - failed: " + m_invoice);
|
||||
}
|
||||
///fercho
|
||||
m_invoice.saveEx();
|
||||
|
||||
addLog(m_invoice.getC_Invoice_ID(), m_invoice.getDateInvoiced(), null, m_invoice.getDocumentNo());
|
||||
m_created++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue