From 26b664e0d76cb2104a4cafeb4ffc69c1c89b1cfc Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Thu, 26 Feb 2015 14:04:54 -0500 Subject: [PATCH] IDEMPIERE-1771 Sysconfig Invoice_ReverseUseNewNumber does not work when doc_type has "Overwrite Sequence on Complete" --- org.adempiere.base/src/org/compiere/model/MInvoice.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.adempiere.base/src/org/compiere/model/MInvoice.java b/org.adempiere.base/src/org/compiere/model/MInvoice.java index d2f051fe66..e309535460 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoice.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoice.java @@ -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()));