Merge bug fixes from release to trunk
merge 11866, 11868, 11892 11866 -> Fix [2383795] DistributeLandedCost to a single line does not work - thanks to SCalderon Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2383795 11868 -> Fix [2383866] Distribute LandedCost to a single line, base is not set - thanks to SCalderon Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2383866 11892 -> Fix [2980523] create payment sets charge to 0 Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=2980523 Tony
This commit is contained in:
parent
8095e68239
commit
fdf32a1370
|
@ -127,8 +127,14 @@ import org.compiere.util.Msg;
|
||||||
setC_Currency_ID (payment.getC_Currency_ID());
|
setC_Currency_ID (payment.getC_Currency_ID());
|
||||||
//
|
//
|
||||||
BigDecimal amt = payment.getPayAmt(true);
|
BigDecimal amt = payment.getPayAmt(true);
|
||||||
|
BigDecimal chargeAmt = getChargeAmt();
|
||||||
|
if (chargeAmt == null)
|
||||||
|
chargeAmt = Env.ZERO;
|
||||||
|
BigDecimal interestAmt = getInterestAmt();
|
||||||
|
if (interestAmt == null)
|
||||||
|
interestAmt = Env.ZERO;
|
||||||
setTrxAmt(amt);
|
setTrxAmt(amt);
|
||||||
setStmtAmt(amt);
|
setStmtAmt(amt.add(chargeAmt).add(interestAmt));
|
||||||
//
|
//
|
||||||
setDescription(payment.getDescription());
|
setDescription(payment.getDescription());
|
||||||
} // setPayment
|
} // setPayment
|
||||||
|
|
|
@ -1004,7 +1004,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
|
||||||
if (lcs.length == 1)
|
if (lcs.length == 1)
|
||||||
{
|
{
|
||||||
MLandedCost lc = lcs[0];
|
MLandedCost lc = lcs[0];
|
||||||
if (lc.getM_InOut_ID() != 0)
|
if (lc.getM_InOut_ID() != 0 && lc.getM_InOutLine_ID() == 0)
|
||||||
{
|
{
|
||||||
// Create List
|
// Create List
|
||||||
ArrayList<MInOutLine> list = new ArrayList<MInOutLine>();
|
ArrayList<MInOutLine> list = new ArrayList<MInOutLine>();
|
||||||
|
@ -1065,6 +1065,8 @@ public class MInvoiceLine extends X_C_InvoiceLine
|
||||||
MLandedCostAllocation lca = new MLandedCostAllocation (this, lc.getM_CostElement_ID());
|
MLandedCostAllocation lca = new MLandedCostAllocation (this, lc.getM_CostElement_ID());
|
||||||
lca.setM_Product_ID(iol.getM_Product_ID());
|
lca.setM_Product_ID(iol.getM_Product_ID());
|
||||||
lca.setM_AttributeSetInstance_ID(iol.getM_AttributeSetInstance_ID());
|
lca.setM_AttributeSetInstance_ID(iol.getM_AttributeSetInstance_ID());
|
||||||
|
BigDecimal base = iol.getBase(lc.getLandedCostDistribution());
|
||||||
|
lca.setBase(base);
|
||||||
lca.setAmt(getLineNetAmt());
|
lca.setAmt(getLineNetAmt());
|
||||||
// MZ Goodwill
|
// MZ Goodwill
|
||||||
// add set Qty from InOutLine
|
// add set Qty from InOutLine
|
||||||
|
|
|
@ -98,7 +98,7 @@ public class BankStatementPayment extends SvrProcess
|
||||||
|
|
||||||
ibs.setC_Payment_ID(payment.getC_Payment_ID());
|
ibs.setC_Payment_ID(payment.getC_Payment_ID());
|
||||||
ibs.setC_Currency_ID (payment.getC_Currency_ID());
|
ibs.setC_Currency_ID (payment.getC_Currency_ID());
|
||||||
ibs.setTrxAmt(payment.getPayAmt());
|
ibs.setTrxAmt(payment.getPayAmt(true));
|
||||||
ibs.save();
|
ibs.save();
|
||||||
//
|
//
|
||||||
String retString = "@C_Payment_ID@ = " + payment.getDocumentNo();
|
String retString = "@C_Payment_ID@ = " + payment.getDocumentNo();
|
||||||
|
|
Loading…
Reference in New Issue