[ adempiere-Bugs-2022372 ] Reset Accounting process failure

This commit is contained in:
Carlos Ruiz 2008-08-01 03:02:43 +00:00
parent 7464e51ca5
commit 280a274fde
1 changed files with 33 additions and 24 deletions

View File

@ -1,5 +1,5 @@
/****************************************************************************** /******************************************************************************
* Product: Adempiere ERP & CRM Smart Business Solution * * Product: Adempiere ERP & CRM Smart Business Solution *
* Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. * * Copyright (C) 1999-2006 ComPiere, Inc. All Rights Reserved. *
* This program is free software; you can redistribute it and/or modify it * * This program is free software; you can redistribute it and/or modify it *
* under the terms version 2 of the GNU General Public License as published * * under the terms version 2 of the GNU General Public License as published *
@ -16,12 +16,28 @@
*****************************************************************************/ *****************************************************************************/
package org.compiere.process; package org.compiere.process;
import java.math.*; import java.math.BigDecimal;
import java.sql.*; import java.sql.PreparedStatement;
import java.util.logging.*; import java.sql.ResultSet;
import org.compiere.model.*; import java.util.logging.Level;
import org.compiere.report.*;
import org.compiere.util.*; import org.compiere.model.MAllocationHdr;
import org.compiere.model.MBankStatement;
import org.compiere.model.MCash;
import org.compiere.model.MInOut;
import org.compiere.model.MInventory;
import org.compiere.model.MInvoice;
import org.compiere.model.MJournal;
import org.compiere.model.MMatchInv;
import org.compiere.model.MMatchPO;
import org.compiere.model.MMovement;
import org.compiere.model.MOrder;
import org.compiere.model.MPayment;
import org.compiere.model.MPeriodControl;
import org.compiere.model.MProjectIssue;
import org.compiere.model.MRequisition;
import org.compiere.model.X_M_Production;
import org.compiere.util.DB;
import org.eevolution.model.MDDOrder; import org.eevolution.model.MDDOrder;
import org.eevolution.model.MHRProcess; import org.eevolution.model.MHRProcess;
import org.eevolution.model.MPPCostCollector; import org.eevolution.model.MPPCostCollector;
@ -68,7 +84,7 @@ public class FactAcctReset extends SvrProcess
} // prepare } // prepare
/** /**
* Perrform process. * Perform process.
* @return Message (clear text) * @return Message (clear text)
* @throws Exception if not successful * @throws Exception if not successful
*/ */
@ -192,23 +208,16 @@ public class FactAcctReset extends SvrProcess
else if (AD_Table_ID == MMatchPO.Table_ID) else if (AD_Table_ID == MMatchPO.Table_ID)
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_MatchPO + "'"; docBaseType = "= '" + MPeriodControl.DOCBASETYPE_MatchPO + "'";
else if (AD_Table_ID == MPPOrder.Table_ID) else if (AD_Table_ID == MPPOrder.Table_ID)
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_ManufacturingOrder + "'"; docBaseType = "IN ('" + MPeriodControl.DOCBASETYPE_ManufacturingOrder
else if (AD_Table_ID == MPPOrder.Table_ID) + "','" + MPeriodControl.DOCBASETYPE_MaintenanceOrder
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_MaintenanceOrder + "'"; + "','" + MPeriodControl.DOCBASETYPE_QualityOrder + "')";
else if (AD_Table_ID == MPPOrder.Table_ID)
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_QualityOrder + "'";
else if (AD_Table_ID == MPPCostCollector.Table_ID) else if (AD_Table_ID == MPPCostCollector.Table_ID)
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_ManufacturingOrderIssue + "'"; docBaseType = "IN ('" + MPeriodControl.DOCBASETYPE_ManufacturingOrderIssue
else if (AD_Table_ID == MPPCostCollector.Table_ID) + "','" + MPeriodControl.DOCBASETYPE_ManufacturingOrderMethodVariation
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_ManufacturingOrderMethodVariation+ "'"; + "','" + MPeriodControl.DOCBASETYPE_ManufacturingOrderRateVariation
else if (AD_Table_ID == MPPCostCollector.Table_ID) + "','" + MPeriodControl.DOCBASETYPE_ManufacturingOrderReceipt
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_ManufacturingOrderRateVariation+ "'"; + "','" + MPeriodControl.DOCBASETYPE_ManufacturingOrderUseVariation
else if (AD_Table_ID == MPPCostCollector.Table_ID) + "','" + MPeriodControl.DOCBASETYPE_ManufacturingOperationActivity + "')";
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_ManufacturingOrderReceipt+ "'";
else if (AD_Table_ID == MPPCostCollector.Table_ID)
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_ManufacturingOrderUseVariation+ "'";
else if (AD_Table_ID == MPPCostCollector.Table_ID)
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_ManufacturingOperationActivity+ "'";
else if (AD_Table_ID == MDDOrder.Table_ID) else if (AD_Table_ID == MDDOrder.Table_ID)
docBaseType = "= '" + MPeriodControl.DOCBASETYPE_DistributionOrder+ "'"; docBaseType = "= '" + MPeriodControl.DOCBASETYPE_DistributionOrder+ "'";
else if (AD_Table_ID == MHRProcess.Table_ID) else if (AD_Table_ID == MHRProcess.Table_ID)