Package org.compiere.model

Examples of org.compiere.model.MTax


      BigDecimal PriceList = line.getPriceList();
      int C_Tax_ID = docLine.getC_Tax_ID();
      //  Correct included Tax
      if (isTaxIncluded() && C_Tax_ID != 0)
      {
        MTax tax = MTax.get(getCtx(), C_Tax_ID);
        if (!tax.isZeroTax())
        {
          BigDecimal LineNetAmtTax = tax.calculateTax(LineNetAmt, true, getStdPrecision());
          log.fine("LineNetAmt=" + LineNetAmt + " - Tax=" + LineNetAmtTax);
          LineNetAmt = LineNetAmt.subtract(LineNetAmtTax);
          for (int t = 0; t < m_taxes.length; t++)
          {
            if (m_taxes[t].getC_Tax_ID() == C_Tax_ID)
            {
              m_taxes[t].addIncludedTax(LineNetAmtTax);
              break;
            }
          }
          BigDecimal PriceListTax = tax.calculateTax(PriceList, true, getStdPrecision());
          PriceList = PriceList.subtract(PriceListTax);
        }
      }  //  correct included Tax
     
      docLine.setAmount (LineNetAmt, PriceList, Qty)//  qty for discount calc
View Full Code Here

TOP

Related Classes of org.compiere.model.MTax

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.