1003754 Landed cost issue -- related to IDEMPIERE-1285. Fix landed cost allocation to product not working.
This commit is contained in:
parent
03f22d1ca4
commit
86207e9729
|
@ -1142,6 +1142,16 @@ public class MInvoiceLine extends X_C_InvoiceLine
|
|||
MLandedCostAllocation lca = new MLandedCostAllocation (this, lc.getM_CostElement_ID());
|
||||
lca.setM_Product_ID(lc.getM_Product_ID()); // No ASI
|
||||
lca.setAmt(getLineNetAmt());
|
||||
if (lc.getLandedCostDistribution().equals(MLandedCost.LANDEDCOSTDISTRIBUTION_Costs))
|
||||
{
|
||||
lca.setBase(getLineNetAmt());
|
||||
lca.setQty(getLineNetAmt());
|
||||
}
|
||||
else
|
||||
{
|
||||
lca.setBase(getQtyInvoiced());
|
||||
lca.setQty(getQtyInvoiced());
|
||||
}
|
||||
if (lca.save())
|
||||
return "";
|
||||
msgreturn = new StringBuilder("Cannot save Product Allocation = ").append(lc);
|
||||
|
|
Loading…
Reference in New Issue