Validate Invoice commit when complete it in GenerateInvoice - fixes #36

http://bitbucket.org/idempiere/idempiere/issue/36
This commit is contained in:
Fernando Saavedra 2011-06-10 14:00:29 -05:00
parent 0cc73a03fd
commit 5cfcc86631
1 changed files with 7 additions and 2 deletions

View File

@ -491,8 +491,13 @@ public class InvoiceGenerate extends SvrProcess
log.warning("completeInvoice - failed: " + m_invoice);
addLog("completeInvoice - failed: " + m_invoice); // Elaine 2008/11/25
}
m_invoice.save();
//
///fercho m_invoice.save();
if (!m_invoice.save())
{
log.warning("completeInvoice - failed: " + m_invoice);
addLog("completeInvoice - failed: " + m_invoice);
}
///fercho
addLog(m_invoice.getC_Invoice_ID(), m_invoice.getDateInvoiced(), null, m_invoice.getDocumentNo());
m_created++;
}