diff --git a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java index ba0b757567..5d99c0c42a 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java +++ b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java @@ -206,40 +206,6 @@ public class AcctSchemaDefaultCopy extends SvrProcess addLog(0, null, new BigDecimal(created), "@Created@ @C_BP_Group_ID@"); createdTotal += created; -//IDEMPIERE-362 Hide things that don't work on iDempiere - // Update Business Partner - Employee - /* - if (p_CopyOverwriteAcct) - { - sql = new StringBuilder("UPDATE C_BP_Employee_Acct a ") - .append("SET E_Expense_Acct=").append(acct.getE_Expense_Acct()) - .append(", E_Prepayment_Acct=").append(acct.getE_Prepayment_Acct()) - .append(", Updated=getDate(), UpdatedBy=0 ") - .append("WHERE a.C_AcctSchema_ID=").append(p_C_AcctSchema_ID) - .append(" AND EXISTS (SELECT * FROM C_BP_Employee_Acct x ") - .append("WHERE x.C_BPartner_ID=a.C_BPartner_ID)"); - updated = DB.executeUpdate(sql.toString(), get_TrxName()); - addLog(0, null, new BigDecimal(updated), "@Updated@ @C_BPartner_ID@ @IsEmployee@"); - updatedTotal += updated; - } - // Insert new Business Partner - Employee - sql = new StringBuilder("INSERT INTO C_BP_Employee_Acct ") - .append("(C_BPartner_ID, C_AcctSchema_ID,") - .append(" AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,") - .append(" E_Expense_Acct, E_Prepayment_Acct) ") - .append("SELECT x.C_BPartner_ID, acct.C_AcctSchema_ID,") - .append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,") - .append(" acct.E_Expense_Acct, acct.E_Prepayment_Acct ") - .append("FROM C_BPartner x") - .append(" INNER JOIN C_AcctSchema_Default acct ON (x.AD_Client_ID=acct.AD_Client_ID) ") - .append("WHERE acct.C_AcctSchema_ID=").append(p_C_AcctSchema_ID) - .append(" AND NOT EXISTS (SELECT * FROM C_BP_Employee_Acct a ") - .append("WHERE a.C_BPartner_ID=x.C_BPartner_ID") - .append(" AND a.C_AcctSchema_ID=acct.C_AcctSchema_ID)"); - created = DB.executeUpdate(sql.toString(), get_TrxName()); - addLog(0, null, new BigDecimal(created), "@Created@ @C_BPartner_ID@ @IsEmployee@"); - createdTotal += created; - */ // if (!p_CopyOverwriteAcct) { @@ -415,40 +381,6 @@ public class AcctSchemaDefaultCopy extends SvrProcess created = DB.executeUpdate(sql.toString(), get_TrxName()); addLog(0, null, new BigDecimal(created), "@Created@ @C_BankAccount_ID@"); createdTotal += created; - -//IDEMPIERE-362 Hide things that don't work on iDempiere - // Update Withholding - /* - if (p_CopyOverwriteAcct) - { - sql = new StringBuilder("UPDATE C_Withholding_Acct a ") - .append("SET Withholding_Acct=").append(acct.getWithholding_Acct()) - .append(", Updated=getDate(), UpdatedBy=0 ") - .append("WHERE a.C_AcctSchema_ID=").append(p_C_AcctSchema_ID) - .append(" AND EXISTS (SELECT * FROM C_Withholding_Acct x ") - .append("WHERE x.C_Withholding_ID=a.C_Withholding_ID)"); - updated = DB.executeUpdate(sql.toString(), get_TrxName()); - addLog(0, null, new BigDecimal(updated), "@Updated@ @C_Withholding_ID@"); - updatedTotal += updated; - } - // Insert new Withholding - sql = new StringBuilder("INSERT INTO C_Withholding_Acct ") - .append("(C_Withholding_ID, C_AcctSchema_ID,") - .append(" AD_Client_ID, AD_Org_ID, IsActive, Created, CreatedBy, Updated, UpdatedBy,") - .append(" Withholding_Acct) ") - .append("SELECT x.C_Withholding_ID, acct.C_AcctSchema_ID,") - .append(" x.AD_Client_ID, x.AD_Org_ID, 'Y', getDate(), 0, getDate(), 0,") - .append(" acct.Withholding_Acct ") - .append("FROM C_Withholding x") - .append(" INNER JOIN C_AcctSchema_Default acct ON (x.AD_Client_ID=acct.AD_Client_ID) ") - .append("WHERE acct.C_AcctSchema_ID=").append(p_C_AcctSchema_ID) - .append(" AND NOT EXISTS (SELECT * FROM C_Withholding_Acct a ") - .append("WHERE a.C_Withholding_ID=x.C_Withholding_ID") - .append(" AND a.C_AcctSchema_ID=acct.C_AcctSchema_ID)"); - created = DB.executeUpdate(sql.toString(), get_TrxName()); - addLog(0, null, new BigDecimal(created), "@Created@ @C_Withholding_ID@"); - createdTotal += created; - */ // Update Charge if (p_CopyOverwriteAcct) diff --git a/org.adempiere.base.process/src/org/compiere/process/Aging.java b/org.adempiere.base.process/src/org/compiere/process/Aging.java index 0d557e028f..7a3d789809 100644 --- a/org.adempiere.base.process/src/org/compiere/process/Aging.java +++ b/org.adempiere.base.process/src/org/compiere/process/Aging.java @@ -198,15 +198,12 @@ public class Aging extends SvrProcess int C_Currency_ID = rs.getInt(5); boolean IsSOTrx = "Y".equals(rs.getString(6)); // - //Timestamp DateInvoiced = rs.getTimestamp(7); - //int NetDays = rs.getInt(8); Timestamp DueDate = rs.getTimestamp(9); // Days Due int DaysDue = rs.getInt(10) // based on today + m_statementOffset; // BigDecimal GrandTotal = rs.getBigDecimal(11); - //BigDecimal PaidAmt = rs.getBigDecimal(12); BigDecimal OpenAmt = rs.getBigDecimal(13); // int C_Activity_ID = p_IsListInvoices ? rs.getInt(14) : 0; diff --git a/org.adempiere.base.process/src/org/compiere/process/AllocationAuto.java b/org.adempiere.base.process/src/org/compiere/process/AllocationAuto.java index d98a253c77..a436a9057f 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AllocationAuto.java +++ b/org.adempiere.base.process/src/org/compiere/process/AllocationAuto.java @@ -318,7 +318,7 @@ public class AllocationAuto extends SvrProcess MInvoice invoice = m_invoices[i]; if (invoice.isPaid()) continue; - // log.fine("allocateIndividualPayments - " + invoice); + if (payment.getC_Invoice_ID() == invoice.getC_Invoice_ID()) { if (payment.getC_Currency_ID() == invoice.getC_Currency_ID()) @@ -470,7 +470,7 @@ public class AllocationAuto extends SvrProcess if (payment.isAllocated()) continue; BigDecimal allocatedAmt = payment.getAllocatedAmt(); - // log.info("allocateBPartnerAll - " + payment + ", Allocated=" + allocatedAmt); + if (allocatedAmt != null && allocatedAmt.signum() != 0) continue; BigDecimal availableAmt = payment.getPayAmt() @@ -482,7 +482,6 @@ public class AllocationAuto extends SvrProcess // Foreign currency if (payment.getC_Currency_ID() != C_Currency_ID) continue; - // log.fine("allocateBPartnerAll - Available=" + availableAmt); if (dateAcct == null || payment.getDateAcct().after(dateAcct)) dateAcct = payment.getDateAcct(); totalPayments = totalPayments.add(availableAmt); @@ -494,14 +493,12 @@ public class AllocationAuto extends SvrProcess MInvoice invoice = m_invoices[i]; if (invoice.isPaid()) continue; - // log.info("allocateBPartnerAll - " + invoice); BigDecimal openAmt = invoice.getOpenAmt(true, null); if (!invoice.isSOTrx()) openAmt = openAmt.negate(); // Foreign currency if (invoice.getC_Currency_ID() != C_Currency_ID) continue; - // log.fine("allocateBPartnerAll - Open=" + openAmt); if (dateAcct == null || invoice.getDateAcct().after(dateAcct)) dateAcct = invoice.getDateAcct(); totalInvoices = totalInvoices.add(openAmt); @@ -647,9 +644,6 @@ public class AllocationAuto extends SvrProcess BigDecimal allocatedAmt = payment.getAllocatedAmt(); if (allocatedAmt == null) allocatedAmt = Env.ZERO; - // comment following lines to allow partial allocation - // if (allocatedAmt != null && allocatedAmt.signum() != 0) - // continue; BigDecimal availableAmt = payment.getPayAmt() .add(payment.getDiscountAmt()) .add(payment.getWriteOffAmt()) diff --git a/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java b/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java index 08dcdfc4c1..96e10354cc 100644 --- a/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java +++ b/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java @@ -197,24 +197,5 @@ public class AllocationReset extends SvrProcess m_trx.rollback(); return success; } // delete - - - /** - * Set BPartner (may not be required - */ - /*private void setBPartner() - { - - UPDATE C_AllocationLine al - SET C_BPartner_ID=(SELECT C_BPartner_ID FROM C_Payment p WHERE al.C_Payment_ID=p.C_Payment_ID) - WHERE C_BPartner_ID IS NULL AND C_Payment_ID IS NOT NULL; - UPDATE C_AllocationLine al - SET C_BPartner_ID=(SELECT C_BPartner_ID FROM C_Invoice i WHERE al.C_Invoice_ID=i.C_Invoice_ID) - WHERE C_BPartner_ID IS NULL AND C_Invoice_ID IS NOT NULL; - UPDATE C_AllocationLine al - SET C_BPartner_ID=(SELECT C_BPartner_ID FROM C_Order o WHERE al.C_Order_ID=o.C_Order_ID) - WHERE C_BPartner_ID IS NULL AND C_Order_ID IS NOT NULL; - COMMIT - } // setBPartner*/ } // AllocationReset diff --git a/org.adempiere.base.process/src/org/compiere/process/BPartnerValidate.java b/org.adempiere.base.process/src/org/compiere/process/BPartnerValidate.java index ad94215f12..e429cbbd37 100644 --- a/org.adempiere.base.process/src/org/compiere/process/BPartnerValidate.java +++ b/org.adempiere.base.process/src/org/compiere/process/BPartnerValidate.java @@ -116,7 +116,6 @@ public class BPartnerValidate extends SvrProcess bp.setActualLifeTimeValue(); bp.saveEx(); // - // if (bp.getSO_CreditUsed().signum() != 0) addLog(0, null, bp.getSO_CreditUsed(), Msg.getElement(getCtx(), "SO_CreditUsed")); addLog(0, null, bp.getTotalOpenBalance(), Msg.getElement(getCtx(), "TotalOpenBalance")); addLog(0, null, bp.getActualLifeTimeValue(), Msg.getElement(getCtx(), "ActualLifeTimeValue")); diff --git a/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java b/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java index db486cfd72..886dedc456 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java +++ b/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java @@ -199,7 +199,6 @@ public class ChangeLogProcess extends SvrProcess m_oldRecord_ID = cLog.getRecord_ID(); // Insert - new value is null and UnDo only - // m_isInsert = cLog.isNewNull() && p_CheckNewValue != null; m_isInsert = MChangeLog.EVENTCHANGELOG_Insert.equals(cLog.getEventChangeLog()); if (m_isInsert) { @@ -312,7 +311,6 @@ public class ChangeLogProcess extends SvrProcess no = DB.executeUpdate(m_sqlInsert.toString(), get_TrxName()); if (no == -1) { - // log.warning("Insert failed - " + m_sqlInsert); m_errors++; } else if (no == 0) @@ -331,7 +329,6 @@ public class ChangeLogProcess extends SvrProcess no = DB.executeUpdate(m_sqlUpdate.toString(), get_TrxName()); if (no == -1) { - // log.warning("Failed - " + m_sqlUpdate); m_errors++; } else if (no == 0) diff --git a/org.adempiere.base.process/src/org/compiere/process/CommissionAPInvoice.java b/org.adempiere.base.process/src/org/compiere/process/CommissionAPInvoice.java index 1b4922c2f4..07e87710d4 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CommissionAPInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/CommissionAPInvoice.java @@ -81,7 +81,6 @@ public class CommissionAPInvoice extends SvrProcess invoice.setClientOrg(com.getAD_Client_ID(), com.getAD_Org_ID()); invoice.setC_DocTypeTarget_ID(MDocType.DOCBASETYPE_APInvoice); // API invoice.setBPartner(bp); - // invoice.setDocumentNo (comRun.getDocumentNo()); // may cause unique constraint invoice.setSalesRep_ID(getAD_User_ID()); // caller // if (com.getC_Currency_ID() != invoice.getC_Currency_ID()) diff --git a/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java b/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java index 38a0b67218..0c1f27bd47 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java +++ b/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java @@ -256,9 +256,6 @@ public class CommissionCalc extends SvrProcess comAmt.saveEx(); } // for all commission lines - // comRun.updateFromAmt(); - // comRun.saveEx(); - // Save Last Run m_com.setDateLastRun (p_StartDate); m_com.saveEx(); @@ -329,17 +326,6 @@ public class CommissionCalc extends SvrProcess } if (log.isLoggable(Level.FINE)) log.fine("setStartEndDate = " + p_StartDate + " - " + m_EndDate); - /** - String sd = DB.TO_DATE(p_StartDate, true); - StringBuilder sql = new StringBuilder ("SELECT "); - if (MCommission.FREQUENCYTYPE_Quarterly.equals(m_com.getFrequencyType())) - sql.append("TRUNC(").append(sd).append(", 'Q'), TRUNC(").append(sd).append("+92, 'Q')-1"); - else if (MCommission.FREQUENCYTYPE_Weekly.equals(m_com.getFrequencyType())) - sql.append("TRUNC(").append(sd).append(", 'DAY'), TRUNC(").append(sd).append("+7, 'DAY')-1"); - else // Month - sql.append("TRUNC(").append(sd).append(", 'MM'), TRUNC(").append(sd).append("+31, 'MM')-1"); - sql.append(" FROM DUAL"); - **/ } // setStartEndDate /** diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java b/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java index 91eee63fde..f95945ce9a 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java @@ -112,8 +112,6 @@ public class CopyOrder extends SvrProcess original.saveEx(); } // - // Env.setSOTrx(getCtx(), newOrder.isSOTrx()); - // return "@C_Order_ID@ " + newOrder.getDocumentNo(); StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(": ").append(newOrder.getDocumentNo()); addLog(0, null, null, msgreturn.toString(), newOrder.get_Table_ID(), newOrder.getC_Order_ID()); return "@C_Order_ID@ @Created@"; diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyProduct.java b/org.adempiere.base.process/src/org/compiere/process/CopyProduct.java index 592391ba09..29005c72a5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CopyProduct.java +++ b/org.adempiere.base.process/src/org/compiere/process/CopyProduct.java @@ -137,45 +137,7 @@ public class CopyProduct extends SvrProcess { } count += replenish.size(); - - // Don't copy purchasing since it demands a unique vendor product no - /* - List poList = new Query(getCtx(), MProductPO.Table_Name, "M_Product_ID=? AND Discontinued='N'", get_TrxName()) - .setParameters(new Object[]{m_copyFromId}) - .setOnlyActiveRecords(true) - .list(); - MProductPO poSrc; - MProductPO poDst; - for (Iterator it = poList.iterator(); it.hasNext();) { - poSrc = it.next(); - poDst = new MProductPO(getCtx(), 0, get_TrxName()); - poDst.setM_Product_ID(toMProductID); - poDst.setC_BPartner_ID(poSrc.getC_BPartner_ID()); - poDst.setC_Currency_ID(poSrc.getC_Currency_ID()); - poDst.setC_UOM_ID(poSrc.getC_UOM_ID()); - poDst.setCostPerOrder(poSrc.getCostPerOrder()); - poDst.setDeliveryTime_Actual(poSrc.getDeliveryTime_Actual()); - poDst.setDeliveryTime_Promised(poSrc.getDeliveryTime_Promised()); - poDst.setIsCurrentVendor(poSrc.isCurrentVendor()); - poDst.setManufacturer(poSrc.getManufacturer()); - poDst.setOrder_Min(poSrc.getOrder_Min()); - poDst.setOrder_Pack(poSrc.getOrder_Pack()); - poDst.setPriceEffective(poSrc.getPriceEffective()); - poDst.setPriceLastInv(poSrc.getPriceLastInv()); - poDst.setPriceLastPO(poSrc.getPriceLastPO()); - poDst.setPriceList(poSrc.getPriceList()); - poDst.setPricePO(poSrc.getPricePO()); - poDst.setQualityRating(poSrc.getQualityRating()); - poDst.setRoyaltyAmt(poSrc.getRoyaltyAmt()); - // Don't set vendor product no or UPC since that's likely to be different - poDst.setVendorCategory(poSrc.getVendorCategory()); - poDst.saveEx(get_TrxName()); - } - - count += poList.size(); - */ - - + // Copy business partner List bpList = new Query(getCtx(), MBPartnerProduct.Table_Name, "M_Product_ID=?", get_TrxName()) .setParameters(new Object[]{m_copyFromId}) @@ -218,52 +180,6 @@ public class CopyProduct extends SvrProcess { dlDst.saveEx(get_TrxName()); } count += dlList.size(); - - // Don't copy accounting because of constraints. - /* - // Delete any current accounting records - DB.executeUpdate("delete from " + X_M_Product_Acct.Table_Name + " where M_Product_ID=" + toMProductID, get_TrxName()); - - // Copy accounting - List acctList = new Query(getCtx(), X_M_Product_Acct.Table_Name, "M_Product_ID=?", get_TrxName()) - .setParameters(new Object[]{m_copyFromId}) - .setOnlyActiveRecords(true) - .list(); - - X_M_Product_Acct acctSrc; - X_M_Product_Acct acctDst; - for (Iterator it = acctList.iterator(); it.hasNext();) { - acctSrc = it.next(); - acctDst = new X_M_Product_Acct(getCtx(), 0, get_TrxName()); - acctDst.setC_AcctSchema_ID(acctSrc.getC_AcctSchema_ID()); - acctDst.setM_Product_ID(toMProductID); - acctDst.setP_Asset_Acct(acctSrc.getP_Asset_Acct()); - acctDst.setP_AverageCostVariance_Acct(acctSrc.getP_AverageCostVariance_Acct()); - acctDst.setP_Burden_Acct(acctSrc.getP_Burden_Acct()); - acctDst.setP_COGS_Acct(acctSrc.getP_COGS_Acct()); - acctDst.setP_CostAdjustment_Acct(acctSrc.getP_CostAdjustment_Acct()); - acctDst.setP_CostOfProduction_Acct(acctSrc.getP_CostOfProduction_Acct()); - acctDst.setP_Expense_Acct(acctSrc.getP_Expense_Acct()); - acctDst.setP_FloorStock_Acct(acctSrc.getP_FloorStock_Acct()); - acctDst.setP_InventoryClearing_Acct(acctSrc.getP_InventoryClearing_Acct()); - acctDst.setP_InvoicePriceVariance_Acct(acctSrc.getP_InvoicePriceVariance_Acct()); - acctDst.setP_Labor_Acct(acctSrc.getP_Labor_Acct()); - acctDst.setP_MethodChangeVariance_Acct(acctSrc.getP_MethodChangeVariance_Acct()); - acctDst.setP_MixVariance_Acct(acctSrc.getP_MixVariance_Acct()); - acctDst.setP_OutsideProcessing_Acct(acctSrc.getP_OutsideProcessing_Acct()); - acctDst.setP_Overhead_Acct(acctSrc.getP_Overhead_Acct()); - acctDst.setP_PurchasePriceVariance_Acct(acctSrc.getP_PurchasePriceVariance_Acct()); - acctDst.setP_RateVariance_Acct(acctSrc.getP_RateVariance_Acct()); - acctDst.setP_Revenue_Acct(acctSrc.getP_Revenue_Acct()); - acctDst.setP_Scrap_Acct(acctSrc.getP_Scrap_Acct()); - acctDst.setP_TradeDiscountGrant_Acct(acctSrc.getP_TradeDiscountGrant_Acct()); - acctDst.setP_TradeDiscountRec_Acct(acctSrc.getP_TradeDiscountRec_Acct()); - acctDst.setP_UsageVariance_Acct(acctSrc.getP_UsageVariance_Acct()); - acctDst.setP_WIP_Acct(acctSrc.getP_WIP_Acct()); - acctDst.saveEx(get_TrxName()); - } - count += acctList.size(); - */ // TODO Auto-generated method stub return "@Copied@=" + count; diff --git a/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java b/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java index 71f12041a4..413f69eca4 100644 --- a/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java +++ b/org.adempiere.base.process/src/org/compiere/process/CostUpdate.java @@ -92,7 +92,6 @@ public class CostUpdate extends SvrProcess for (int i = 0; i < para.length; i++) { String name = para[i].getParameterName(); - // log.fine("prepare - " + para[i]); if (para[i].getParameter() == null) ; else if (name.equals("M_Product_Category_ID")) diff --git a/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java b/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java index 15491fd797..357bb7bbc2 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/DistributionCreate.java @@ -52,9 +52,6 @@ public class DistributionCreate extends SvrProcess /** Distribution List */ private int p_M_DistributionList_ID; -// DatePromised -// C_DocType_ID - /** Distribution List */ private MDistributionList m_dl; /** Single Order */ diff --git a/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java b/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java index 81072c82b8..050fffe63e 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java +++ b/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java @@ -62,8 +62,6 @@ public class DistributionRun extends SvrProcess private int p_M_DistributionRun_ID = 0; /** Date Promised */ private Timestamp p_DatePromised = null; - /** Date Promised To */ - //private Timestamp p_DatePromised_To = null; /** Document Type */ private int p_C_DocType_ID = 0; /** Test Mode */ @@ -101,7 +99,7 @@ public class DistributionRun extends SvrProcess for (int i = 0; i < para.length; i++) { String name = para[i].getParameterName(); - // log.fine("prepare - " + para[i]); + if (para[i].getParameter() == null) ; else if (name.equals("C_DocType_ID")) @@ -112,7 +110,6 @@ public class DistributionRun extends SvrProcess else if (name.equals("DatePromised")) { p_DatePromised = (Timestamp)para[i].getParameter(); - //p_DatePromised_To = (Timestamp)para[i].getParameter_To(); } else if (name.equals("IsTest")) p_IsTest = "Y".equals(para[i].getParameter()); @@ -673,7 +670,6 @@ public class DistributionRun extends SvrProcess { pstmt = DB.prepareStatement (sql, get_TrxName()); pstmt.setTimestamp(1, p_DatePromised); - //pstmt.setTimestamp(2, p_DatePromised_To); pstmt.setInt(2, p_M_Warehouse_ID); pstmt.setInt(3, M_Product_ID); @@ -733,7 +729,6 @@ public class DistributionRun extends SvrProcess .append("INNER JOIN M_DistributionListLine ll ON (rl.M_DistributionList_ID=ll.M_DistributionList_ID) ") .append("INNER JOIN DD_Order o ON (o.C_BPartner_ID=ll.C_BPartner_ID) ") .append("INNER JOIN DD_OrderLine ol ON (ol.DD_Order_ID=o.DD_Order_ID AND ol.M_Product_ID=rl.M_Product_ID) AND ol.DatePromised") - //+ " BETWEEN " + DB.TO_DATE(p_DatePromised) +" AND "+ DB.TO_DATE(p_DatePromised_To) .append( "<=").append(DB.TO_DATE(p_DatePromised)) .append(" INNER JOIN M_Locator loc ON (loc.M_Locator_ID=ol.M_Locator_ID AND loc.M_Warehouse_ID=").append(p_M_Warehouse_ID).append(") ") .append(" WHERE rl.M_DistributionRun_ID=").append(p_M_DistributionRun_ID).append(" AND l.RatioTotal<>0 AND rl.IsActive='Y' AND ll.IsActive='Y'"); @@ -815,8 +810,6 @@ public class DistributionRun extends SvrProcess line.setDescription(m_run.getName()); line.saveEx(); break; - //addLog(0,null, detail.getActualAllocation(), order.getDocumentNo() - // + ": " + bp.getName() + " - " + product.getName()); } } @@ -1027,7 +1020,6 @@ public class DistributionRun extends SvrProcess line.setQty(QtyAllocation); line.setQtyEntered(QtyAllocation); - //line.setTargetQty(detail.getActualAllocation()); line.setTargetQty(Env.ZERO); String Description =""; if (m_run.getName() != null) @@ -1035,7 +1027,6 @@ public class DistributionRun extends SvrProcess StringBuilder msgline = new StringBuilder(Description).append(" ").append(Msg.translate(getCtx(), "Qty")) .append(" = ").append(QtyAllocation).append(" "); line.setDescription(msgline.toString()); - //line.setConfirmedQty(QtyAllocation); line.saveEx(); } else @@ -1052,7 +1043,6 @@ public class DistributionRun extends SvrProcess StringBuilder msgline = new StringBuilder(Description).append(" ").append(Msg.translate(getCtx(), "Qty")).append(" = ").append(QtyAllocation).append(" "); line.setDescription(msgline.toString()); line.setQty(line.getQtyEntered().add(QtyAllocation)); - //line.setConfirmedQty(line.getConfirmedQty().add( QtyAllocation)); line.saveEx(); } } @@ -1062,12 +1052,6 @@ public class DistributionRun extends SvrProcess MDDOrderLine line = new MDDOrderLine(order); if (counter && bp.getAD_OrgBP_ID() > 0) ; // don't overwrite counter doc - /*else // normal - optionally overwrite - { - line.setC_BPartner_ID(detail.getC_BPartner_ID()); - if (detail.getC_BPartner_Location_ID() != 0) - line.setC_BPartner_Location_ID(detail.getC_BPartner_Location_ID()); - }*/ // line.setAD_Org_ID(bp.getAD_OrgBP_ID()); line.setM_Locator_ID(m_locator.getM_Locator_ID()); @@ -1076,9 +1060,7 @@ public class DistributionRun extends SvrProcess line.setProduct(product); line.setQty(detail.getActualAllocation()); line.setQtyEntered(detail.getActualAllocation()); - //line.setTargetQty(detail.getActualAllocation()); line.setTargetQty(Env.ZERO); - //line.setConfirmedQty(detail.getActualAllocation()); String Description =""; if (m_run.getName() != null) Description =Description.concat(m_run.getName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java b/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java index 3a0a974202..4dfd629d4c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java +++ b/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java @@ -97,14 +97,13 @@ public class DunningPrint extends SvrProcess // Need to have Template if (p_EMailPDF && p_R_MailText_ID == 0) throw new AdempiereUserError ("@NotFound@: @R_MailText_ID@"); -// String subject = ""; + MMailText mText = null; if (p_EMailPDF) { mText = new MMailText (getCtx(), p_R_MailText_ID, get_TrxName()); if (p_EMailPDF && mText.get_ID() == 0) throw new AdempiereUserError ("@NotFound@: @R_MailText_ID@ - " + p_R_MailText_ID); -// subject = mText.getMailHeader(); } // MDunningRun run = new MDunningRun (getCtx(), p_C_DunningRun_ID, get_TrxName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java b/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java index bb3a76d483..8d0e1380b0 100644 --- a/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java @@ -169,7 +169,6 @@ public class DunningRunCreate extends SvrProcess sql.append(" AND i.C_Currency_ID=").append(p_C_Currency_ID); if ( p_AD_Org_ID != 0 ) sql.append(" AND i.AD_Org_ID=").append(p_AD_Org_ID); - // if (log.isLoggable(Level.INFO)) log.info(sql); String sql2= ""; diff --git a/org.adempiere.base.process/src/org/compiere/process/EntityTypeRegister.java b/org.adempiere.base.process/src/org/compiere/process/EntityTypeRegister.java index 92968c9a83..3edfe256b8 100644 --- a/org.adempiere.base.process/src/org/compiere/process/EntityTypeRegister.java +++ b/org.adempiere.base.process/src/org/compiere/process/EntityTypeRegister.java @@ -57,7 +57,6 @@ public class EntityTypeRegister extends SvrProcess throw new AdempiereSystemError("To register an Entity Type, contact Adempiere directly"); - // return "Not Supported Yet"; } // doIt } // EntityTypeRegister diff --git a/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java b/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java index 530b44f992..5cd4295c00 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java @@ -183,7 +183,6 @@ public class ExpenseAPInvoice extends SvrProcess il.setC_Activity_ID(line.getC_Activity_ID()); il.setC_Campaign_ID(line.getC_Campaign_ID()); // - // il.setPrice(); // not really a list/limit price for reimbursements il.setPrice(line.getPriceReimbursed()); // il.setTax(); diff --git a/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java b/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java index a102439847..71b41112a7 100644 --- a/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java +++ b/org.adempiere.base.process/src/org/compiere/process/FactAcctReset.java @@ -217,8 +217,6 @@ public class FactAcctReset extends SvrProcess docBaseType = "= '" + MPeriodControl.DOCBASETYPE_PaymentAllocation + "'"; else if (AD_Table_ID == MJournal.Table_ID) docBaseType = "= '" + MPeriodControl.DOCBASETYPE_GLJournal + "'"; - // else if (AD_Table_ID == M.Table_ID) - // docBaseType = "= '" + MPeriodControl.DOCBASETYPE_GLDocument + "'"; else if (AD_Table_ID == MMovement.Table_ID) docBaseType = "= '" + MPeriodControl.DOCBASETYPE_MaterialMovement + "'"; else if (AD_Table_ID == MRequisition.Table_ID) diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java b/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java index 3ce5b8950e..a0fb8ab9e4 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportAccount.java @@ -376,7 +376,6 @@ public class ImportAccount extends SvrProcess String updateSQL = "UPDATE AD_TreeNode SET Parent_ID=?, SeqNo=? " + "WHERE AD_Tree_ID=? AND Node_ID=?"; //begin e-evolution vpj-cd 15 nov 2005 PostgreSQL - //PreparedStatement updateStmt = DB.prepareStatement(updateSQL, get_TrxName()); PreparedStatement updateStmt = DB.prepareStatement(updateSQL, ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_UPDATABLE, get_TrxName()); //end // diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java b/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java index b15ceb93fe..819ca4f174 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportBPartner.java @@ -149,16 +149,6 @@ implements ImportProcess if (log.isLoggable(Level.CONFIG)) log.config("Invalid Group=" + no); // Set Country - /** - sql = new StringBuilder ("UPDATE I_BPartner i " - + "SET CountryCode=(SELECT CountryCode FROM C_Country c WHERE c.IsDefault='Y'" - + " AND c.AD_Client_ID IN (0, i.AD_Client_ID) AND ROWNUM=1) " - + "WHERE CountryCode IS NULL AND C_Country_ID IS NULL" - + " AND I_IsImported<>'Y'").append(clientCheck); - no = DB.executeUpdateEx(sql.toString(), get_TrxName()); - log.fine("Set Country Default=" + no); - **/ - // sql = new StringBuilder ("UPDATE I_BPartner i ") .append("SET C_Country_ID=(SELECT C_Country_ID FROM C_Country c") .append(" WHERE i.CountryCode=c.CountryCode AND c.AD_Client_ID IN (0, i.AD_Client_ID)) ") @@ -353,8 +343,6 @@ implements ImportProcess else // Update existing BPartner { bp = new MBPartner(getCtx(), impBP.getC_BPartner_ID(), get_TrxName()); - // if (impBP.getValue() != null) // not to overwite - // bp.setValue(impBP.getValue()); if (impBP.getName() != null) { bp.setName(impBP.getName()); diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java b/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java index 082ac7e179..8099f8e8cd 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportBankStatement.java @@ -460,12 +460,9 @@ public class ImportBankStatement extends SvrProcess MBankStatementLine line = new MBankStatementLine(statement, lineNo); // Copy statement line data - //line.setC_BPartner_ID(imp.getC_BPartner_ID()); - //line.setC_Invoice_ID(imp.getC_Invoice_ID()); line.setReferenceNo(imp.getReferenceNo()); line.setDescription(imp.getLineDescription()); line.setStatementLineDate(imp.getStatementLineDate()); - // line.setDateAcct(imp.getStatementLineDate()); // set on beforeSave line.setValutaDate(imp.getValutaDate()); line.setIsReversal(imp.isReversal()); line.setC_Currency_ID(imp.getC_Currency_ID()); diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportConversionRate.java b/org.adempiere.base.process/src/org/compiere/process/ImportConversionRate.java index e4c6657112..ede8a7e8c2 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportConversionRate.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportConversionRate.java @@ -221,14 +221,7 @@ public class ImportConversionRate extends SvrProcess no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) log.warning ("Invalid Rates =" + no); - // sql = new StringBuilder ("UPDATE I_Conversion_Rate i " // Rate diff > 10% - // + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=Inconsistent Rates='||(MultiplyRate - (1/DivideRate)) " - // + "WHERE ((MultiplyRate - (1/DivideRate)) > (MultiplyRate * .1))" - // + " AND I_IsImported<>'Y'").append (clientCheck); - // no = DB.executeUpdate(sql.toString(), get_TrxName()); - // if (no != 0) - // log.warn ("Inconsistent Rates =" + no); - + commitEx(); /*********************************************************************/ diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java b/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java index 3385929b58..c15630e0bf 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java @@ -570,17 +570,6 @@ public class ImportGLJournal extends SvrProcess no = DB.executeUpdate(sql.toString(), get_TrxName()); if (no != 0) log.warning ("Zero Acct Balance=" + no); - //AZ Goodwill - //BF: 2391401 Remove account balance limitation in Import GL Journal - /* - sql = new StringBuilder ("UPDATE I_GLJournal i " - + "SET I_ErrorMsg=I_ErrorMsg||'WARN=Check Acct Balance, ' " - + "WHERE ABS(AmtAcctDr-AmtAcctCr)>100000000" // 100 mio - + " AND I_IsImported<>'Y'").append (clientCheck); - no = DB.executeUpdate(sql.toString(), get_TrxName()); - if (no != 0) - log.warning ("Check Acct Balance=" + no); - */ /*********************************************************************/ diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportInvoice.java b/org.adempiere.base.process/src/org/compiere/process/ImportInvoice.java index ead95fe720..0cbec059ba 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportInvoice.java @@ -368,15 +368,6 @@ public class ImportInvoice extends SvrProcess log.warning ("No BP Location=" + no); // Set Country - /** - sql = new StringBuilder ("UPDATE I_Invoice o " - + "SET CountryCode=(SELECT MAX(CountryCode) FROM C_Country c WHERE c.IsDefault='Y'" - + " AND c.AD_Client_ID IN (0, o.AD_Client_ID)) " - + "WHERE C_BPartner_ID IS NULL AND CountryCode IS NULL AND C_Country_ID IS NULL" - + " AND I_IsImported<>'Y'").append (clientCheck); - no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.fine("Set Country Default=" + no); - **/ sql = new StringBuilder ("UPDATE I_Invoice o ") .append("SET C_Country_ID=(SELECT C_Country_ID FROM C_Country c") .append(" WHERE o.CountryCode=c.CountryCode AND c.AD_Client_ID IN (0, o.AD_Client_ID)) ") diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java b/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java index fb7d122ed4..85054aa3ea 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportOrder.java @@ -369,15 +369,6 @@ public class ImportOrder extends SvrProcess log.warning ("No BP Location=" + no); // Set Country - /** - sql = new StringBuilder ("UPDATE I_Order o " - + "SET CountryCode=(SELECT MAX(CountryCode) FROM C_Country c WHERE c.IsDefault='Y'" - + " AND c.AD_Client_ID IN (0, o.AD_Client_ID)) " - + "WHERE C_BPartner_ID IS NULL AND CountryCode IS NULL AND C_Country_ID IS NULL" - + " AND I_IsImported<>'Y'").append (clientCheck); - no = DB.executeUpdate(sql.toString(), get_TrxName()); - log.fine("Set Country Default=" + no); - **/ sql = new StringBuilder ("UPDATE I_Order o ") .append("SET C_Country_ID=(SELECT C_Country_ID FROM C_Country c") .append(" WHERE o.CountryCode=c.CountryCode AND c.AD_Client_ID IN (0, o.AD_Client_ID)) ") diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java b/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java index bf9ba55631..99311b201c 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java @@ -458,13 +458,10 @@ public class ImportPayment extends SvrProcess payment.setDateAcct(imp.getDateTrx()); payment.setDateTrx(imp.getDateTrx()); - // payment.setDescription(imp.getDescription()); - // payment.setC_BPartner_ID(imp.getC_BPartner_ID()); payment.setC_Invoice_ID(imp.getC_Invoice_ID()); payment.setC_DocType_ID(imp.getC_DocType_ID()); payment.setC_Currency_ID(imp.getC_Currency_ID()); - // payment.setC_ConversionType_ID(imp.getC_ConversionType_ID()); payment.setC_Charge_ID(imp.getC_Charge_ID()); payment.setChargeAmt(imp.getChargeAmt()); payment.setTaxAmt(imp.getTaxAmt()); diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportProduct.java b/org.adempiere.base.process/src/org/compiere/process/ImportProduct.java index ccc029d3bb..43bfd97f48 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportProduct.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportProduct.java @@ -384,12 +384,6 @@ public class ImportProduct extends SvrProcess implements ImportProcess log.warning("No Mandatory Value=" + no); // Vendor Product No - // sql = new StringBuilder ("UPDATE I_Product i " - // + "SET I_IsImported='E', I_ErrorMsg=I_ErrorMsg||'ERR=No Mandatory VendorProductNo,' " - // + "WHERE I_IsImported<>'Y'" - // + " AND VendorProductNo IS NULL AND (C_BPartner_ID IS NOT NULL OR BPartner_Value IS NOT NULL)").append(clientCheck); - // no = DB.executeUpdate(sql.toString(), get_TrxName()); - // log.info(log.l3_Util, "No Mandatory VendorProductNo=" + no); sql = new StringBuilder ("UPDATE I_Product ") .append("SET VendorProductNo=Value ") .append("WHERE C_BPartner_ID IS NOT NULL AND VendorProductNo IS NULL") @@ -449,56 +443,6 @@ public class ImportProduct extends SvrProcess implements ImportProcess PreparedStatement pstmt_insertProductPO = null; try { - /* Insert Product from Import - PreparedStatement pstmt_insertProduct = conn.prepareStatement - ("INSERT INTO M_Product (M_Product_ID," - + "AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy," - + "Value,Name,Description,DocumentNote,Help," - + "UPC,SKU,C_UOM_ID,IsSummary,M_Product_Category_ID,C_TaxCategory_ID," - + "ProductType,ImageURL,DescriptionURL) " - + "SELECT ?," - + "AD_Client_ID,AD_Org_ID,'Y',getDate(),CreatedBy,getDate(),UpdatedBy," - + "Value,Name,Description,DocumentNote,Help," - + "UPC,SKU,C_UOM_ID,'N',M_Product_Category_ID," + C_TaxCategory_ID + "," - + "ProductType,ImageURL,DescriptionURL " - + "FROM I_Product " - + "WHERE I_Product_ID=?"); - */ - // Update Product from Import - //jz moved - /* - String sqlt = "UPDATE M_PRODUCT " - + "SET (Value,Name,Description,DocumentNote,Help," - + "UPC,SKU,C_UOM_ID,M_Product_Category_ID,Classification,ProductType," - + "Volume,Weight,ShelfWidth,ShelfHeight,ShelfDepth,UnitsPerPallet," - + "Discontinued,DiscontinuedBy,Updated,UpdatedBy)= " - + "(SELECT Value,Name,Description,DocumentNote,Help," - + "UPC,SKU,C_UOM_ID,M_Product_Category_ID,Classification,ProductType," - + "Volume,Weight,ShelfWidth,ShelfHeight,ShelfDepth,UnitsPerPallet," - + "Discontinued,DiscontinuedBy,getDate(),UpdatedBy" - + " FROM I_Product WHERE I_Product_ID=?) " - + "WHERE M_Product_ID=?"; - PreparedStatement pstmt_updateProduct = DB.prepareStatement - (sqlt, get_TrxName()); - - // Update Product_PO from Import - sqlt = "UPDATE M_Product_PO " - + "SET (IsCurrentVendor,C_UOM_ID,C_Currency_ID,UPC," - + "PriceList,PricePO,RoyaltyAmt,PriceEffective," - + "VendorProductNo,VendorCategory,Manufacturer," - + "Discontinued,DiscontinuedBy,Order_Min,Order_Pack," - + "CostPerOrder,DeliveryTime_Promised,Updated,UpdatedBy)= " - + "(SELECT 'Y',C_UOM_ID,C_Currency_ID,UPC," - + "PriceList,PricePO,RoyaltyAmt,PriceEffective," - + "VendorProductNo,VendorCategory,Manufacturer," - + "Discontinued,DiscontinuedBy,Order_Min,Order_Pack," - + "CostPerOrder,DeliveryTime_Promised,getDate(),UpdatedBy" - + " FROM I_Product" - + " WHERE I_Product_ID=?) " - + "WHERE M_Product_ID=? AND C_BPartner_ID=?"; - PreparedStatement pstmt_updateProductPO = DB.prepareStatement - (sqlt, get_TrxName()); -*/ // Insert Product from Import pstmt_insertProductPO = DB.prepareStatement ("INSERT INTO M_Product_PO (M_Product_ID,C_BPartner_ID, " @@ -575,8 +519,6 @@ public class ImportProduct extends SvrProcess implements ImportProcess PreparedStatement pstmt_updateProduct = DB.prepareStatement (sqlt.toString(), get_TrxName()); - //jz pstmt_updateProduct.setInt(1, I_Product_ID); - // pstmt_updateProduct.setInt(2, M_Product_ID); try { no = pstmt_updateProduct.executeUpdate(); @@ -624,9 +566,6 @@ public class ImportProduct extends SvrProcess implements ImportProcess .append("WHERE M_Product_ID=").append(M_Product_ID).append(" AND C_BPartner_ID=").append(C_BPartner_ID); PreparedStatement pstmt_updateProductPO = DB.prepareStatement (sqlt.toString(), get_TrxName()); - //jz pstmt_updateProductPO.setInt(1, I_Product_ID); - // pstmt_updateProductPO.setInt(2, M_Product_ID); - // pstmt_updateProductPO.setInt(3, C_BPartner_ID); try { no = pstmt_updateProductPO.executeUpdate(); diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportReportLine.java b/org.adempiere.base.process/src/org/compiere/process/ImportReportLine.java index 0e2dabbf66..1cc8d0a5ee 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ImportReportLine.java +++ b/org.adempiere.base.process/src/org/compiere/process/ImportReportLine.java @@ -279,13 +279,10 @@ public class ImportReportLine extends SvrProcess .append("SELECT ?,PA_ReportLineSet_ID,") .append("AD_Client_ID,AD_Org_ID,'Y',getDate(),CreatedBy,getDate(),UpdatedBy,") .append("Name,SeqNo,IsPrinted,IsSummary,LineType ") - //jz + "FROM I_ReportLine " - // + "WHERE PA_ReportLineSet_ID=? AND Name=? AND ROWNUM=1" // #2..3 .append("FROM I_ReportLine ") .append("WHERE I_ReportLine_ID=(SELECT MAX(I_ReportLine_ID) ") .append("FROM I_ReportLine ") .append("WHERE PA_ReportLineSet_ID=? AND Name=? ") // #2..3 - //jz + clientCheck, get_TrxName()); .append(clientCheck).append(")"); pstmt_insertLine = DB.prepareStatement(dbpst.toString(), get_TrxName()); @@ -382,20 +379,6 @@ public class ImportReportLine extends SvrProcess .append(clientCheck); pstmt_insertSource = DB.prepareStatement(dbpst.toString(), get_TrxName()); - // Update ReportSource - //jz - /* - String sqlt="UPDATE PA_ReportSource " - + "SET (ElementType,C_ElementValue_ID,Updated,UpdatedBy)=" - + " (SELECT 'AC',C_ElementValue_ID,getDate(),UpdatedBy" - + " FROM I_ReportLine" - + " WHERE I_ReportLine_ID=?) " - + "WHERE PA_ReportSource_ID=?" - + clientCheck; - PreparedStatement pstmt_updateSource = DB.prepareStatement - (sqlt, get_TrxName()); - */ - // Delete ReportSource - afalcone 22/02/2007 - F.R. [ 1642250 ] Import ReportLine / Very Slow Reports dbpst = new StringBuilder("DELETE FROM PA_ReportSource ") .append("WHERE C_ElementValue_ID IS NULL") @@ -453,12 +436,9 @@ public class ImportReportLine extends SvrProcess .append(clientCheck); PreparedStatement pstmt_updateSource = DB.prepareStatement (sqlt.toString(), get_TrxName()); - //pstmt_updateSource.setInt(1, I_ReportLine_ID); - //pstmt_updateSource.setInt(2, PA_ReportSource_ID); try { no = pstmt_updateSource.executeUpdate(); - //no = DB.executeUpdate(sqlt, get_TrxName()); if (log.isLoggable(Level.FINEST)) log.finest("Update ReportSource = " + no + ", I_ReportLine_ID=" + I_ReportLine_ID + ", PA_ReportSource_ID=" + PA_ReportSource_ID); noUpdateSource++; } diff --git a/org.adempiere.base.process/src/org/compiere/process/InOutGenerate.java b/org.adempiere.base.process/src/org/compiere/process/InOutGenerate.java index 12011dd63b..a806269769 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InOutGenerate.java +++ b/org.adempiere.base.process/src/org/compiere/process/InOutGenerate.java @@ -174,7 +174,6 @@ public class InOutGenerate extends SvrProcess m_sql.append(" AND o.C_BPartner_ID=?"); // #3 } m_sql.append(" ORDER BY M_Warehouse_ID, PriorityRule, M_Shipper_ID, C_BPartner_ID, C_BPartner_Location_ID, C_Order_ID"); - // m_sql += " FOR UPDATE"; PreparedStatement pstmt = null; try diff --git a/org.adempiere.base.process/src/org/compiere/process/InventoryCountCreate.java b/org.adempiere.base.process/src/org/compiere/process/InventoryCountCreate.java index 88ec72c08f..b3cc27d7e4 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InventoryCountCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/InventoryCountCreate.java @@ -195,7 +195,6 @@ public class InventoryCountCreate extends SvrProcess .append(" AND il.M_Product_ID=s.M_Product_ID") .append(" AND il.M_Locator_ID=s.M_Locator_ID") .append(" AND COALESCE(il.M_AttributeSetInstance_ID,0)=COALESCE(s.M_AttributeSetInstance_ID,0))"); - // + " AND il.M_AttributeSetInstance_ID=s.M_AttributeSetInstance_ID)"); // sql.append(" ORDER BY l.Value, p.Value, s.M_AttributeSetInstance_ID, s.DateMaterialPolicy, s.QtyOnHand DESC"); // Locator/Product // diff --git a/org.adempiere.base.process/src/org/compiere/process/InventoryValue.java b/org.adempiere.base.process/src/org/compiere/process/InventoryValue.java index 4f8c4fc5fd..e23f11157f 100644 --- a/org.adempiere.base.process/src/org/compiere/process/InventoryValue.java +++ b/org.adempiere.base.process/src/org/compiere/process/InventoryValue.java @@ -115,9 +115,6 @@ public class InventoryValue extends SvrProcess .append("WHERE w.M_Warehouse_ID=").append(p_M_Warehouse_ID); int noInsertStd = DB.executeUpdateEx(sql.toString(), get_TrxName()); if (log.isLoggable(Level.FINE)) log.fine("Inserted Std=" + noInsertStd); - //IDEMPIERE-2500 - This may be invalid check. Removing still some one not admit reason - /*if (noInsertStd == 0) - return "No Standard Costs found";*/ // Insert addl Costs int noInsertCost = 0; diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderBatchProcess.java b/org.adempiere.base.process/src/org/compiere/process/OrderBatchProcess.java index adb555cf12..966940a782 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderBatchProcess.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderBatchProcess.java @@ -178,10 +178,6 @@ public class OrderBatchProcess extends SvrProcess throw new IllegalStateException("Order Process Failed: " + order + " - " + order.getProcessMsg()); } - // commented by zuhri - unreachable code - //addLog (0, null, null, order.getDocumentNo() + ": Error " + order.getProcessMsg()); - //return false; - // end commented out by zuhri } // process } // OrderBatchProcess diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderLineCreateShipment.java b/org.adempiere.base.process/src/org/compiere/process/OrderLineCreateShipment.java index 89c685b61f..c45e6f4c9a 100644 --- a/org.adempiere.base.process/src/org/compiere/process/OrderLineCreateShipment.java +++ b/org.adempiere.base.process/src/org/compiere/process/OrderLineCreateShipment.java @@ -99,7 +99,6 @@ public class OrderLineCreateShipment extends SvrProcess MInOutLine sline = new MInOutLine( shipment ); sline.setOrderLine(line, 0, line.getQtyReserved()); - //sline.setDatePromised(line.getDatePromised()); sline.setQtyEntered(line.getQtyReserved()); sline.setC_UOM_ID(line.getC_UOM_ID()); sline.setQty(line.getQtyReserved()); diff --git a/org.adempiere.base.process/src/org/compiere/process/PackageCreate.java b/org.adempiere.base.process/src/org/compiere/process/PackageCreate.java index 775f19214e..9041d3e222 100644 --- a/org.adempiere.base.process/src/org/compiere/process/PackageCreate.java +++ b/org.adempiere.base.process/src/org/compiere/process/PackageCreate.java @@ -60,11 +60,6 @@ public class PackageCreate extends SvrProcess log.log(Level.SEVERE, "prepare - Unknown Parameter: " + name); } - // Bug [ 1754889 ] Create Package error - // Commenting these lines because this process is called also from window "Ship/Receipt Confirm" - // if (p_M_InOut_ID == 0) - // p_M_InOut_ID = getRecord_ID(); - } // prepare /** diff --git a/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateFrom.java b/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateFrom.java index 4b48a91ee6..a320750fce 100644 --- a/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateFrom.java +++ b/org.adempiere.base.process/src/org/compiere/process/PaySelectionCreateFrom.java @@ -173,7 +173,6 @@ public class PaySelectionCreateFrom extends SvrProcess sqlWhere.append(" OR "); else sqlWhere.append(" AND "); - // sql.append("paymentTermDueDays(C_PaymentTerm_ID, DateInvoiced, ?) >= 0"); // ## sqlWhere.append("i.DueDate<=?"); // ## if (p_OnlyDiscount) sqlWhere.append(")"); diff --git a/org.adempiere.base.process/src/org/compiere/process/ProductionProcess.java b/org.adempiere.base.process/src/org/compiere/process/ProductionProcess.java index 8242b11e05..9b17ba5cbc 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProductionProcess.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProductionProcess.java @@ -35,7 +35,6 @@ public class ProductionProcess extends SvrProcess { for (int i = 0; i < para.length; i++) { String name = para[i].getParameterName(); - // log.fine("prepare - " + para[i]); if (para[i].getParameter() == null) ; else if (name.equals("MovementDate")) diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectIssue.java b/org.adempiere.base.process/src/org/compiere/process/ProjectIssue.java index 54d94e40b2..6d99e9dbdb 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ProjectIssue.java +++ b/org.adempiere.base.process/src/org/compiere/process/ProjectIssue.java @@ -238,9 +238,7 @@ public class ProjectIssue extends SvrProcess // Find Location int M_Locator_ID = 0; - // MProduct product = new MProduct (getCtx(), expenseLines[i].getM_Product_ID()); - // if (product.isStocked()) - M_Locator_ID = MStorageOnHand.getM_Locator_ID(expense.getM_Warehouse_ID(), + M_Locator_ID = MStorageOnHand.getM_Locator_ID(expense.getM_Warehouse_ID(), expenseLines[i].getM_Product_ID(), 0, // no ASI expenseLines[i].getQty(), null); if (M_Locator_ID == 0) // Service/Expense - get default (and fallback) diff --git a/org.adempiere.base.process/src/org/compiere/process/ReplenishReport.java b/org.adempiere.base.process/src/org/compiere/process/ReplenishReport.java index 14b5a7e0d8..e765bfa0e9 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReplenishReport.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReplenishReport.java @@ -650,7 +650,6 @@ public class ReplenishReport extends SvrProcess // Set BPartner Link to Org order.setBPartner(bp); order.setDateOrdered(new Timestamp(System.currentTimeMillis())); - //order.setDatePromised(DatePromised); order.setDeliveryRule(MDDOrder.DELIVERYRULE_Availability); order.setDeliveryViaRule(MDDOrder.DELIVERYVIARULE_Delivery); order.setPriorityRule(MDDOrder.PRIORITYRULE_Medium); @@ -688,46 +687,6 @@ public class ReplenishReport extends SvrProcess if(M_LocatorTo_ID == 0 || M_Locator_ID==0) throw new AdempiereUserError(Msg.translate(getCtx(), "M_Locator_ID")+" @FillMandatory@ "); - // From: Look-up Storage - /*MProduct product = MProduct.get(getCtx(), replenish.getM_Product_ID()); - MProductCategory pc = MProductCategory.get(getCtx(), product.getM_Product_Category_ID()); - String MMPolicy = pc.getMMPolicy(); - if (MMPolicy == null || MMPolicy.length() == 0) - MMPolicy = client.getMMPolicy(); - // - MStorage[] storages = MStorage.getWarehouse(getCtx(), - whSource.getM_Warehouse_ID(), replenish.getM_Product_ID(), 0, 0, - true, null, - MClient.MMPOLICY_FiFo.equals(MMPolicy), get_TrxName()); - - - BigDecimal target = replenish.getQtyToOrder(); - for (int j = 0; j < storages.length; j++) - { - MStorage storage = storages[j]; - if (storage.getQtyOnHand().signum() <= 0) - continue; - BigDecimal moveQty = target; - if (storage.getQtyOnHand().compareTo(moveQty) < 0) - moveQty = storage.getQtyOnHand(); - // - MDDOrderLine line = new MDDOrderLine(order); - line.setM_Product_ID(replenish.getM_Product_ID()); - line.setQtyEntered(moveQty); - if (replenish.getQtyToOrder().compareTo(moveQty) != 0) - line.setDescription("Total: " + replenish.getQtyToOrder()); - line.setM_Locator_ID(storage.getM_Locator_ID()); // from - line.setM_AttributeSetInstance_ID(storage.getM_AttributeSetInstance_ID()); - line.setM_LocatorTo_ID(M_LocatorTo_ID); // to - line.setM_AttributeSetInstanceTo_ID(storage.getM_AttributeSetInstance_ID()); - line.setIsInvoiced(false); - line.saveEx(); - // - target = target.subtract(moveQty); - if (target.signum() == 0) - break; - }*/ - MDDOrderLine line = new MDDOrderLine(order); line.setM_Product_ID(replenish.getM_Product_ID()); line.setQty(replenish.getQtyToOrder()); diff --git a/org.adempiere.base.process/src/org/compiere/process/ReplenishReportProduction.java b/org.adempiere.base.process/src/org/compiere/process/ReplenishReportProduction.java index 8d7e9a847f..ab182711d1 100644 --- a/org.adempiere.base.process/src/org/compiere/process/ReplenishReportProduction.java +++ b/org.adempiere.base.process/src/org/compiere/process/ReplenishReportProduction.java @@ -686,7 +686,6 @@ public class ReplenishReportProduction extends SvrProcess // Set BPartner Link to Org order.setBPartner(bp); order.setDateOrdered(new Timestamp(System.currentTimeMillis())); - //order.setDatePromised(DatePromised); order.setDeliveryRule(MDDOrder.DELIVERYRULE_Availability); order.setDeliveryViaRule(MDDOrder.DELIVERYVIARULE_Delivery); order.setPriorityRule(MDDOrder.PRIORITYRULE_Medium); @@ -724,46 +723,6 @@ public class ReplenishReportProduction extends SvrProcess if(M_LocatorTo_ID == 0 || M_Locator_ID==0) throw new AdempiereUserError(Msg.translate(getCtx(), "M_Locator_ID")+" @FillMandatory@ "); - // From: Look-up Storage - /*MProduct product = MProduct.get(getCtx(), replenish.getM_Product_ID()); - MProductCategory pc = MProductCategory.get(getCtx(), product.getM_Product_Category_ID()); - String MMPolicy = pc.getMMPolicy(); - if (MMPolicy == null || MMPolicy.length() == 0) - MMPolicy = client.getMMPolicy(); - // - MStorage[] storages = MStorage.getWarehouse(getCtx(), - whSource.getM_Warehouse_ID(), replenish.getM_Product_ID(), 0, 0, - true, null, - MClient.MMPOLICY_FiFo.equals(MMPolicy), get_TrxName()); - - - BigDecimal target = replenish.getQtyToOrder(); - for (int j = 0; j < storages.length; j++) - { - MStorage storage = storages[j]; - if (storage.getQtyOnHand().signum() <= 0) - continue; - BigDecimal moveQty = target; - if (storage.getQtyOnHand().compareTo(moveQty) < 0) - moveQty = storage.getQtyOnHand(); - // - MDDOrderLine line = new MDDOrderLine(order); - line.setM_Product_ID(replenish.getM_Product_ID()); - line.setQtyEntered(moveQty); - if (replenish.getQtyToOrder().compareTo(moveQty) != 0) - line.setDescription("Total: " + replenish.getQtyToOrder()); - line.setM_Locator_ID(storage.getM_Locator_ID()); // from - line.setM_AttributeSetInstance_ID(storage.getM_AttributeSetInstance_ID()); - line.setM_LocatorTo_ID(M_LocatorTo_ID); // to - line.setM_AttributeSetInstanceTo_ID(storage.getM_AttributeSetInstance_ID()); - line.setIsInvoiced(false); - line.saveEx(); - // - target = target.subtract(moveQty); - if (target.signum() == 0) - break; - }*/ - MDDOrderLine line = new MDDOrderLine(order); line.setM_Product_ID(replenish.getM_Product_ID()); line.setQty(replenish.getQtyToOrder()); diff --git a/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java b/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java index 56954d8dea..7544b9db92 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java +++ b/org.adempiere.base.process/src/org/compiere/process/RequestEMailProcessor.java @@ -88,10 +88,6 @@ public class RequestEMailProcessor extends SvrProcess implements ProcessEmailHan protected static final int ERROR = 0; /** Process Request */ protected static final int REQUEST = 1; - /** Process Workflow */ - // private static final int WORKFLOW = 2; - /** Process Delivery Confirm */ - // private static final int DELIVERY = 9; protected Folder errorFolder; protected Folder requestFolder; @@ -205,7 +201,6 @@ public class RequestEMailProcessor extends SvrProcess implements ProcessEmailHan if (log.isLoggable(Level.INFO)) log.info("doIt - IMAPHost=" + p_IMAPHost + " IMAPPort=" + p_IMAPPort + " IMAPUser=" + p_IMAPUser + - // " IMAPPwd=" + p_IMAPPwd + " RequestFolder=" + p_RequestFolder + " InboxFolder=" + p_InboxFolder + " ErrorFolder=" + p_ErrorFolder); diff --git a/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java b/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java index a262127650..30548234ff 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java +++ b/org.adempiere.base.process/src/org/compiere/process/RequestInvoice.java @@ -104,9 +104,7 @@ public class RequestInvoice extends SvrProcess .append(" INNER JOIN R_Status s ON (r.R_Status_ID=s.R_Status_ID) ") .append("WHERE s.IsClosed='Y'") .append(" AND r.R_RequestType_ID=?"); - // globalqss -- avoid double invoicing - // + " AND EXISTS (SELECT 1 FROM R_RequestUpdate ru " + - // "WHERE ru.R_Request_ID=r.R_Request_ID AND NVL(C_InvoiceLine_ID,0)=0"; + if (p_R_Group_ID != 0) sql.append(" AND r.R_Group_ID=?"); if (p_R_Category_ID != 0) @@ -216,8 +214,6 @@ public class RequestInvoice extends SvrProcess BigDecimal qty = updates[i].getQtyInvoiced(); if (qty == null || qty.signum() == 0) continue; - // if (updates[i].getC_InvoiceLine_ID() > 0) - // continue; MInvoiceLine il = new MInvoiceLine(m_invoice); m_linecount++; @@ -232,8 +228,6 @@ public class RequestInvoice extends SvrProcess // il.setPrice(); il.saveEx(); - // updates[i].setC_InvoiceLine_ID(il.getC_InvoiceLine_ID()); - // updates[i].saveEx(); } } // invoiceLine diff --git a/org.adempiere.base.process/src/org/compiere/process/RfQCopyLines.java b/org.adempiere.base.process/src/org/compiere/process/RfQCopyLines.java index b52828b153..95b9ffbed4 100644 --- a/org.adempiere.base.process/src/org/compiere/process/RfQCopyLines.java +++ b/org.adempiere.base.process/src/org/compiere/process/RfQCopyLines.java @@ -84,8 +84,6 @@ public class RfQCopyLines extends SvrProcess newLine.setHelp(lines[i].getHelp()); newLine.setM_Product_ID(lines[i].getM_Product_ID()); newLine.setM_AttributeSetInstance_ID(lines[i].getM_AttributeSetInstance_ID()); - // newLine.setDateWorkStart(); - // newLine.setDateWorkComplete(); newLine.setDeliveryDays(lines[i].getDeliveryDays()); newLine.saveEx(); // Copy Qtys diff --git a/org.adempiere.base.process/src/org/compiere/process/SequenceCheck.java b/org.adempiere.base.process/src/org/compiere/process/SequenceCheck.java index 9672719477..85f49250a5 100644 --- a/org.adempiere.base.process/src/org/compiere/process/SequenceCheck.java +++ b/org.adempiere.base.process/src/org/compiere/process/SequenceCheck.java @@ -22,10 +22,8 @@ import java.util.Properties; import java.util.logging.Level; import org.adempiere.exceptions.AdempiereException; -import org.compiere.Adempiere; import org.compiere.model.MClient; import org.compiere.model.MSequence; -import org.compiere.util.CLogMgt; import org.compiere.util.CLogger; import org.compiere.util.DB; import org.compiere.util.Env; @@ -265,21 +263,4 @@ public class SequenceCheck extends SvrProcess } // checkClientSequences - //add main method, preparing for nightly build - public static void main(String[] args) - { - Adempiere.startupEnvironment(false); - CLogMgt.setLevel(Level.FINE); - s_log.info("Sequence Check"); - s_log.info("--------------"); - ProcessInfo pi = new ProcessInfo("Sequence Check", 258); - pi.setAD_Client_ID(0); - pi.setAD_User_ID(100); - - SequenceCheck sc = new SequenceCheck(); - sc.startProcess(Env.getCtx(), pi, null); - - StringBuilder msgout = new StringBuilder("Process=").append(pi.getTitle()).append(" Error=").append(pi.isError()).append(" Summary=").append(pi.getSummary()); - System.out.println(msgout.toString()); - } } // SequenceCheck diff --git a/org.adempiere.base.process/src/org/compiere/process/StorageCleanup.java b/org.adempiere.base.process/src/org/compiere/process/StorageCleanup.java index 5b8af84f42..43879286c3 100644 --- a/org.adempiere.base.process/src/org/compiere/process/StorageCleanup.java +++ b/org.adempiere.base.process/src/org/compiere/process/StorageCleanup.java @@ -90,11 +90,6 @@ public class StorageCleanup extends SvrProcess + " AND EXISTS (SELECT * FROM M_Product p" + " INNER JOIN M_AttributeSet mas ON (p.M_AttributeSet_ID=mas.M_AttributeSet_ID) " + "WHERE s.M_Product_ID=p.M_Product_ID AND mas.IsInstanceAttribute='Y')" - // Stock in same location - // + " AND EXISTS (SELECT * FROM M_Storage sl " - // + "WHERE sl.QtyOnHand > 0" - // + " AND s.M_Product_ID=sl.M_Product_ID" - // + " AND s.M_Locator_ID=sl.M_Locator_ID)" // Stock in same Warehouse + " AND EXISTS (SELECT * FROM M_StorageOnHand sw" + " INNER JOIN M_Locator swl ON (sw.M_Locator_ID=swl.M_Locator_ID), M_Locator sl " @@ -198,53 +193,6 @@ public class StorageCleanup extends SvrProcess */ private void eliminateReservation(MStorageOnHand target) { - /* - // Negative Ordered / Reserved Qty - if (target.getQtyReserved().signum() != 0 || target.getQtyOrdered().signum() != 0) - { - int M_Locator_ID = target.getM_Locator_ID(); - MStorageOnHand storage0 = MStorageOnHand.get(getCtx(), M_Locator_ID, - target.getM_Product_ID(), 0, get_TrxName()); - if (storage0 == null) - { - MLocator defaultLoc = MLocator.getDefault(getCtx(), M_Locator_ID); - if (M_Locator_ID != defaultLoc.getM_Locator_ID()) - { - M_Locator_ID = defaultLoc.getM_Locator_ID(); - storage0 = MStorageOnHand.get(getCtx(), M_Locator_ID, - target.getM_Product_ID(), 0, get_TrxName()); - } - } - if (storage0 != null) - { - BigDecimal reserved = Env.ZERO; - BigDecimal ordered = Env.ZERO; - if (target.getQtyReserved().add(storage0.getQtyReserved()).signum() >= 0) - reserved = target.getQtyReserved(); // negative - if (target.getQtyOrdered().add(storage0.getQtyOrdered()).signum() >= 0) - ordered = target.getQtyOrdered(); // negative - // Eliminate Reservation - if (reserved.signum() != 0 || ordered.signum() != 0) - { - if (MStorageOnHand.add(getCtx(), target.getM_Warehouse_ID(), target.getM_Locator_ID(), - target.getM_Product_ID(), - target.getM_AttributeSetInstance_ID(), target.getM_AttributeSetInstance_ID(), - Env.ZERO, get_TrxName())) - { - if (MStorageOnHand.add(getCtx(), storage0.getM_Warehouse_ID(), storage0.getM_Locator_ID(), - storage0.getM_Product_ID(), - storage0.getM_AttributeSetInstance_ID(), storage0.getM_AttributeSetInstance_ID(), - Env.ZERO, get_TrxName())) - log.info("Reserved=" + reserved + ",Ordered=" + ordered); - else - log.warning("Failed Storage0 Update"); - } - else - log.warning("Failed Target Update"); - } - } - } - */ } // eliminateReservation /** diff --git a/org.adempiere.base.process/src/org/compiere/process/SynchronizeTerminology.java b/org.adempiere.base.process/src/org/compiere/process/SynchronizeTerminology.java index 134c51a43c..d4ee574030 100644 --- a/org.adempiere.base.process/src/org/compiere/process/SynchronizeTerminology.java +++ b/org.adempiere.base.process/src/org/compiere/process/SynchronizeTerminology.java @@ -17,12 +17,8 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.util.logging.Level; -import org.compiere.Adempiere; import org.compiere.model.M_Element; -import org.compiere.util.CLogMgt; -import org.compiere.util.CLogger; import org.compiere.util.DB; -import org.compiere.util.Env; import org.compiere.util.Trx; /** @@ -33,9 +29,7 @@ import org.compiere.util.Trx; @org.adempiere.base.annotation.Process public class SynchronizeTerminology extends SvrProcess { - /** Static Logger */ - private static final CLogger s_log = CLogger.getCLogger (SynchronizeTerminology.class); - + /** * Prepare - e.g., get Parameters. */ @@ -80,33 +74,7 @@ public class SynchronizeTerminology extends SvrProcess DB.close(rs, pstmt); rs = null; pstmt = null; trx.commit(true); - // Create Elements for Process Parameters which are centrally maintained - /* IDEMPIERE 109 - this create unwanted Element - sql="SELECT DISTINCT ColumnName, Name, Description, Help, EntityType " - +" FROM AD_PROCESS_PARA p " - +" WHERE NOT EXISTS " - +" (SELECT 1 FROM AD_ELEMENT e " - +" WHERE UPPER(p.ColumnName)=UPPER(e.ColumnName))" - +" AND p.isCentrallyMaintained = 'Y'" - +" AND p.isActive = 'Y'"; - pstmt = DB.prepareStatement(sql, get_TrxName()); - rs = pstmt.executeQuery (); - while (rs.next()){ - String columnName = rs.getString(1); - String name = rs.getString(2); - String desc = rs.getString(3); - String help =rs.getString(4); - String entityType=rs.getString(5); - //TODO AD_SEQ system !!! - M_Element elem = new M_Element(getCtx(),columnName,entityType,get_TrxName()); - elem.setDescription(desc); - elem.setHelp(help); - elem.setPrintName(name); - elem.saveEx(); - } - pstmt.close(); - rs.close(); - trx.commit(true);*/ + log.info("Adding missing Element Translations"); sql="INSERT INTO AD_ELEMENT_TRL (AD_Element_ID, AD_LANGUAGE, AD_Client_ID, AD_Org_ID," +" IsActive, Created, CreatedBy, Updated, UpdatedBy," @@ -632,15 +600,6 @@ public class SynchronizeTerminology extends SvrProcess if (log.isLoggable(Level.INFO)) log.info(" rows updated: "+no); trx.commit(true); - /** - SELECT e.PrintName "Element", pfi.PrintName "FormatItem", trl.AD_Language, trl.PrintName "Trl" - FROM AD_Element e - INNER JOIN AD_Column c ON (e.AD_Element_ID=c.AD_Element_ID) - INNER JOIN AD_PrintFormatItem pfi ON (c.AD_Column_ID=pfi.AD_Column_ID) - INNER JOIN AD_PrintFormatItem_Trl trl ON (pfi.AD_PrintFormatItem_ID=trl.AD_PrintFormatItem_ID) - WHERE pfi.AD_PrintFormatItem_ID=? - **/ - // Sync Names - Window log.info("Synchronizing Menu with Window"); sql="UPDATE AD_MENU m" @@ -924,21 +883,4 @@ public class SynchronizeTerminology extends SvrProcess return "@OK@"; } - - //add main method, preparing for nightly build - public static void main(String[] args) - { - Adempiere.startupEnvironment(false); - CLogMgt.setLevel(Level.FINE); - s_log.info("Synchronize Terminology"); - s_log.info("-----------------------"); - ProcessInfo pi = new ProcessInfo("Synchronize Terminology", 172); - pi.setAD_Client_ID(0); - pi.setAD_User_ID(100); - - SynchronizeTerminology sc = new SynchronizeTerminology(); - sc.startProcess(Env.getCtx(), pi, null); - StringBuilder msgout = new StringBuilder("Process=").append(pi.getTitle()).append(" Error=").append(pi.isError()).append(" Summary=").append(pi.getSummary()); - System.out.println(msgout.toString()); - } }