diff --git a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java index c8b7739211..cbbb2a38ec 100644 --- a/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java +++ b/org.adempiere.base/src/org/compiere/model/MInvoiceLine.java @@ -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);