- Initial cost from m_product_po is wrong if m_product_po.c_uom_id <> m_product.c_uom_id
This commit is contained in:
Heng Sin Low 2009-06-04 09:16:17 +00:00
parent e76f04dfe0
commit 197c5bd9e2
1 changed files with 177 additions and 172 deletions

View File

@ -395,6 +395,11 @@ public class MCost extends X_M_Cost
as.getAD_Client_ID(), Org_ID); as.getAD_Client_ID(), Org_ID);
if (price != null && price.signum() != 0) if (price != null && price.signum() != 0)
{ {
if (pos[i].getC_UOM_ID() != product.getC_UOM_ID())
{
price = MUOMConversion.convertProductTo (Env.getCtx(), product.getM_Product_ID(),
pos[i].getC_UOM_ID(), price);
}
retValue = price; retValue = price;
s_log.fine(product.getName() + ", Product_PO = " + retValue); s_log.fine(product.getName() + ", Product_PO = " + retValue);
return retValue; return retValue;