IDEMPIERE-4320 Wrong code found in MOrder.reactivateIt (#108)

Just remove useless code
This commit is contained in:
Diego Ruiz 2020-06-09 12:26:46 +02:00 committed by GitHub
commit 0c918a973a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 22 deletions

View File

@ -2709,32 +2709,10 @@ public class MOrder extends X_C_Order implements DocAction
m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE); m_processMsg = ModelValidationEngine.get().fireDocValidate(this,ModelValidator.TIMING_BEFORE_REACTIVATE);
if (m_processMsg != null) if (m_processMsg != null)
return false; return false;
MDocType dt = MDocType.get(getCtx(), getC_DocType_ID()); MDocType dt = MDocType.get(getCtx(), getC_DocType_ID());
String DocSubTypeSO = dt.getDocSubTypeSO(); 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 // PO - just re-open
if (!isSOTrx()) { if (!isSOTrx()) {
if (log.isLoggable(Level.INFO)) log.info("Existing documents not modified - " + dt); if (log.isLoggable(Level.INFO)) log.info("Existing documents not modified - " + dt);