IDEMPIERE-2906 method getTotalLines(boolean cm) on MInvoice

This commit is contained in:
Nicolas Micoud 2015-10-23 11:08:10 -05:00
parent baff7d5c87
commit d2d13437d6
1 changed files with 16 additions and 1 deletions

View File

@ -67,7 +67,7 @@ public class MInvoice extends X_C_Invoice implements DocAction
/** /**
* *
*/ */
private static final long serialVersionUID = -1061413366741817262L; private static final long serialVersionUID = -859760245939837565L;
/** /**
* Get Payments Of BPartner * Get Payments Of BPartner
@ -651,6 +651,21 @@ public class MInvoice extends X_C_Invoice implements DocAction
return amt; return amt;
} // getGrandTotal } // getGrandTotal
/**
* Get Total Lines
* @param creditMemoAdjusted adjusted for CM (negative)
* @return total lines
*/
public BigDecimal getTotalLines (boolean creditMemoAdjusted)
{
if (!creditMemoAdjusted)
return super.getTotalLines();
//
BigDecimal amt = getTotalLines();
if (isCreditMemo())
return amt.negate();
return amt;
} // getTotalLines
/** /**
* Get Invoice Lines of Invoice * Get Invoice Lines of Invoice