From 482cf51c571c3acfa39d7d0268166005e92648c5 Mon Sep 17 00:00:00 2001 From: vpj-cd Date: Wed, 28 Jan 2009 22:31:43 +0000 Subject: [PATCH] BF - error when completing Cost collector: Action Invalid value - -- - Reference_ID=302 - Z - C - F - V - W - X - T - R - P - D - M - B The filed right is DocAction vs Action --- base/src/org/eevolution/model/MPPCostCollector.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/base/src/org/eevolution/model/MPPCostCollector.java b/base/src/org/eevolution/model/MPPCostCollector.java index 6e961f5b81..38e660857d 100644 --- a/base/src/org/eevolution/model/MPPCostCollector.java +++ b/base/src/org/eevolution/model/MPPCostCollector.java @@ -507,7 +507,7 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction .setParameters(new Object[]{get_ID()}) .list(); String DocStatus = MPPOrderNode.DOCSTATUS_Completed; - StringBuffer msg = new StringBuffer("The quantity do not is complete for next Purchase Order :"); + StringBuffer msg = new StringBuffer("The quantity do not is complete for next Purchase Order : "); for (MOrderLine oline : olines) { if(oline.getQtyDelivered().compareTo(oline.getQtyOrdered()) < 0) @@ -526,12 +526,12 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction setDocAction(MPPOrderNode.DOCACTION_Close); setDocStatus(MPPOrderNode.DOCSTATUS_Completed); activity.setDocStatus(MPPOrderNode.DOCSTATUS_Completed); - activity.setAction(MPPOrderNode.DOCACTION_None); + activity.setDocAction(MPPOrderNode.DOCACTION_None); activity.saveEx(); m_processMsg = Msg.translate(getCtx(), "PP_Order_ID") - +":"+ getPP_Order().getDocumentNo() - +Msg.translate(getCtx(),"PP_Order_Node_ID") - +":"+getPP_Order_Node().getValue(); + +": "+ getPP_Order().getDocumentNo() + +" "+ Msg.translate(getCtx(),"PP_Order_Node_ID") + +": "+getPP_Order_Node().getValue(); return DocStatus; } else @@ -859,13 +859,14 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction .setParameters(new Object[]{activity.get_ID(), true}) .setOnlyActiveRecords(true) .list(); + for (MPPOrderNodeProduct subcontract : subcontracts) { // // If Product is not Purchased or is not Service, then it is not a subcontracting candidate [SKIP] MProduct product = MProduct.get(getCtx(), subcontract.getM_Product_ID()); if(!product.isPurchased() || !MProduct.PRODUCTTYPE_Service.equals(product.getProductType())) - continue; + throw new AdempiereException("The Product: " + product.getName() + " Do not is Purchase or Service Type"); // // Find Vendor and Product PO data