From 421f88cdb3e3852ea11bb4237099bbdef6444619 Mon Sep 17 00:00:00 2001 From: Heng Sin Low Date: Thu, 4 Jun 2009 09:20:58 +0000 Subject: [PATCH] https://sourceforge.net/tracker/?func=detail&aid=2800967&group_id=176962&atid=879332 - Initial cost from m_product_po is wrong if m_product_po.c_uom_id <> m_product.c_uom_id - fixed a typo error: should be i instead of 0 - Need to do checking after uom conversion --- base/src/org/compiere/model/MCost.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/base/src/org/compiere/model/MCost.java b/base/src/org/compiere/model/MCost.java index 016e49d259..5e275acd5a 100644 --- a/base/src/org/compiere/model/MCost.java +++ b/base/src/org/compiere/model/MCost.java @@ -400,6 +400,9 @@ public class MCost extends X_M_Cost price = MUOMConversion.convertProductTo (Env.getCtx(), product.getM_Product_ID(), pos[i].getC_UOM_ID(), price); } + } + if (price != null && price.signum() != 0) + { retValue = price; s_log.fine(product.getName() + ", Product_PO = " + retValue); return retValue;