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:
tspc 2010-04-02 22:05:17 +00:00
parent 8095e68239
commit fdf32a1370
3 changed files with 11 additions and 3 deletions

View File

@ -127,8 +127,14 @@ import org.compiere.util.Msg;
setC_Currency_ID (payment.getC_Currency_ID());
//
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);
setStmtAmt(amt);
setStmtAmt(amt.add(chargeAmt).add(interestAmt));
//
setDescription(payment.getDescription());
} // setPayment

View File

@ -1004,7 +1004,7 @@ public class MInvoiceLine extends X_C_InvoiceLine
if (lcs.length == 1)
{
MLandedCost lc = lcs[0];
if (lc.getM_InOut_ID() != 0)
if (lc.getM_InOut_ID() != 0 && lc.getM_InOutLine_ID() == 0)
{
// Create List
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());
lca.setM_Product_ID(iol.getM_Product_ID());
lca.setM_AttributeSetInstance_ID(iol.getM_AttributeSetInstance_ID());
BigDecimal base = iol.getBase(lc.getLandedCostDistribution());
lca.setBase(base);
lca.setAmt(getLineNetAmt());
// MZ Goodwill
// add set Qty from InOutLine

View File

@ -98,7 +98,7 @@ public class BankStatementPayment extends SvrProcess
ibs.setC_Payment_ID(payment.getC_Payment_ID());
ibs.setC_Currency_ID (payment.getC_Currency_ID());
ibs.setTrxAmt(payment.getPayAmt());
ibs.setTrxAmt(payment.getPayAmt(true));
ibs.save();
//
String retString = "@C_Payment_ID@ = " + payment.getDocumentNo();