From 637c02195404b7a63d2be5b0863f27c2ee47e6a6 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Tue, 9 Jun 2020 11:58:18 +0200 Subject: [PATCH] IDEMPIERE-4320 Wrong code found in MOrder.reactivateIt Just remove useless code --- .../src/org/compiere/model/MOrder.java | 22 ------------------- 1 file changed, 22 deletions(-) diff --git a/org.adempiere.base/src/org/compiere/model/MOrder.java b/org.adempiere.base/src/org/compiere/model/MOrder.java index 215206a994..773133e89e 100644 --- a/org.adempiere.base/src/org/compiere/model/MOrder.java +++ b/org.adempiere.base/src/org/compiere/model/MOrder.java @@ -2709,32 +2709,10 @@ public class MOrder extends X_C_Order implements DocAction m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); if (m_processMsg != null) return false; - - MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); String DocSubTypeSO = dt.getDocSubTypeSO(); - // Replace Prepay with POS to revert all doc - if (MDocType.DOCSUBTYPESO_PrepayOrder.equals (DocSubTypeSO)) - { - MDocType newDT = null; - MDocType[] dts = MDocType.getOfClient (getCtx()); - for (int i = 0; i < dts.length; i++) - { - MDocType type = dts[i]; - if (MDocType.DOCSUBTYPESO_PrepayOrder.equals(type.getDocSubTypeSO())) - { - if (type.isDefault() || newDT == null) - newDT = type; - } - } - if (newDT == null) - return false; - else - setC_DocType_ID (newDT.getC_DocType_ID()); - } - // PO - just re-open if (!isSOTrx()) { if (log.isLoggable(Level.INFO)) log.info("Existing documents not modified - " + dt);