IDEMPIERE-1771 Sysconfig Invoice_ReverseUseNewNumber does not work when doc_type has "Overwrite Sequence on Complete"

This commit is contained in:
Carlos Ruiz 2015-02-26 14:04:54 -05:00
parent 2bca265f59
commit 26b664e0d7
1 changed files with 2 additions and 0 deletions

View File

@ -2115,6 +2115,8 @@ public class MInvoice extends X_C_Invoice implements DocAction
* Set the definite document number after completed
*/
private void setDefiniteDocumentNo() {
if (isReversal() && ! MSysConfig.getBooleanValue(MSysConfig.Invoice_ReverseUseNewNumber, true, getAD_Client_ID())) // IDEMPIERE-1771
return;
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
if (dt.isOverwriteDateOnComplete()) {
setDateInvoiced(new Timestamp (System.currentTimeMillis()));