From 3a5886e1f1e8dd66bafa58c62c96eade64981b6a Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 28 Feb 2007 19:53:54 +0000 Subject: [PATCH] Reverted [ 1566090 ] Allow to reuse doc no sequence It has negative consequences on Recurring and possibly other collaterals --- base/src/org/compiere/model/MInOut.java | 22 ---------------------- base/src/org/compiere/model/MInvoice.java | 20 +------------------- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/base/src/org/compiere/model/MInOut.java b/base/src/org/compiere/model/MInOut.java index 5becc0fac5..d3d0e8a072 100644 --- a/base/src/org/compiere/model/MInOut.java +++ b/base/src/org/compiere/model/MInOut.java @@ -137,11 +137,6 @@ public class MInOut extends X_M_InOut implements DocAction return retValue; } // createFrom - // Goodwill.co.id (Goodwill) - /** Reversal Indicator */ - private static String REVERSE_INDICATOR = "^"; - // end Goodwill.co.id - /** * Create new Shipment by copying * @param from shipment @@ -161,14 +156,6 @@ public class MInOut extends X_M_InOut implements DocAction copyValues(from, to, from.getAD_Client_ID(), from.getAD_Org_ID()); to.set_ValueNoCheck ("M_InOut_ID", I_ZERO); to.set_ValueNoCheck ("DocumentNo", null); - - // Goodwill.co.id (Goodwill) - // old : - // to.set_ValueNoCheck ("DocumentNo", null); - // new : - to.setDocumentNo(REVERSE_INDICATOR + from.getDocumentNo()); - // end Goodwill.co.id - // to.setDocStatus (DOCSTATUS_Drafted); // Draft to.setDocAction(DOCACTION_Complete); @@ -1683,10 +1670,6 @@ public class MInOut extends X_M_InOut implements DocAction line.save(get_TrxName()); } } - // Goodwill.co.id (Goodwill) - // for voided Document, M_InOut_ID is added as suffix for Document No - setDocumentNo(getDocumentNo() + "#" + getM_InOut_ID()); - // end Goodwill.co.id } else { @@ -1763,11 +1746,6 @@ public class MInOut extends X_M_InOut implements DocAction } } } - - //Added New Lines By Goodwill.co.id - //Reason: To Change Document No when Reverse - setDocumentNo(getDocumentNo() + "#" + getM_InOut_ID()); - //End Of Added Lines // Deep Copy MInOut reversal = copyFrom (this, getMovementDate(), diff --git a/base/src/org/compiere/model/MInvoice.java b/base/src/org/compiere/model/MInvoice.java index f168d830af..7cbcef6b48 100644 --- a/base/src/org/compiere/model/MInvoice.java +++ b/base/src/org/compiere/model/MInvoice.java @@ -80,11 +80,6 @@ public class MInvoice extends X_C_Invoice implements DocAction list.toArray(retValue); return retValue; } // getOfBPartner - - // Goodwill.co.id (Goodwill) - /** Reversal Indicator */ - public static String REVERSE_INDICATOR = "^"; - // end Goodwill.co.id /** * Create new Invoice by copying @@ -105,12 +100,7 @@ public class MInvoice extends X_C_Invoice implements DocAction to.set_TrxName(trxName); PO.copyValues (from, to, from.getAD_Client_ID(), from.getAD_Org_ID()); to.set_ValueNoCheck ("C_Invoice_ID", I_ZERO); - // Goodwill.co.id (Goodwill) - // old : - //to.set_ValueNoCheck ("DocumentNo", null); - // new : - to.setDocumentNo(REVERSE_INDICATOR + from.getDocumentNo()); - // end Goodwill.co.id + to.set_ValueNoCheck ("DocumentNo", null); // to.setDocStatus (DOCSTATUS_Drafted); // Draft to.setDocAction(DOCACTION_Complete); @@ -1962,10 +1952,6 @@ public class MInvoice extends X_C_Invoice implements DocAction line.save(get_TrxName()); } } - // Goodwill.co.id (Goodwill) - // for voided Document, C_Invoice_ID is added as suffix for Document No - setDocumentNo(getDocumentNo() + "#" + getC_Invoice_ID()); - // end Goodwill.co.id addDescription(Msg.getMsg(getCtx(), "Voided")); setIsPaid(true); setC_Payment_ID(0); @@ -2055,10 +2041,6 @@ public class MInvoice extends X_C_Invoice implements DocAction // load(get_TrxName()); // reload allocation reversal info - // Added New Lines By Goodwill.co.id - //Reason: To Change The Document No when Reversed - setDocumentNo(getDocumentNo() + "#" + getC_Invoice_ID()); - // End Of Added Lines // Deep Copy MInvoice reversal = copyFrom (this, getDateInvoiced(), getC_DocType_ID(), isSOTrx(), false, get_TrxName(), true);