public final void addInvBsTxExTxc(final List<SalesInvoiceServiceLine> pTxdLns,
    final Long pCatId, final Double pSubt, final Double pSubtFc,
      final Double pPercent, final AccSettings pAs,
        final TaxDestination pTxRules) {
    SalesInvoiceServiceLine txdLn = null;
    for (SalesInvoiceServiceLine tdl : pTxdLns) {
      if (tdl.getItsId().equals(pCatId)) {
        txdLn = tdl;
      }
    }
    if (txdLn == null) {
      txdLn = new SalesInvoiceServiceLine();
      txdLn.setItsId(pCatId);
      InvItemTaxCategory tc = new InvItemTaxCategory();
      tc.setItsId(pCatId);
      txdLn.setTaxCategory(tc);
      pTxdLns.add(txdLn);
    }
    BigDecimal bd100 = new BigDecimal("100.00");
    BigDecimal txv = BigDecimal.valueOf(pSubt).multiply(BigDecimal
      .valueOf(pPercent)).divide(bd100, pAs.getPricePrecision(),
        pTxRules.getSalTaxRoundMode());
    txdLn.setTotalTaxes(txdLn.getTotalTaxes().add(txv));
    BigDecimal txvf = BigDecimal.valueOf(pSubtFc).multiply(BigDecimal
      .valueOf(pPercent)).divide(bd100, pAs.getPricePrecision(),
        pTxRules.getSalTaxRoundMode());
    txdLn.setForeignTotalTaxes(txdLn.getForeignTotalTaxes().add(txvf));
  }
public final void addInvBsTxExTxc ( final List < SalesInvoiceServiceLine > pTxdLns , final Long pCatId , final Double pSubt , final Double pSubtFc , final Double pPercent , final AccSettings pAs , final TaxDestination pTxRules ) { SalesInvoiceServiceLine txdLn = null ; for ( SalesInvoiceServiceLine tdl : pTxdLns ) { if ( tdl . getItsId ( ) . equals ( pCatId ) ) { txdLn = tdl ; } } if ( txdLn == null ) { txdLn = new SalesInvoiceServiceLine ( ) ; txdLn . setItsId ( pCatId ) ; InvItemTaxCategory tc = new InvItemTaxCategory ( ) ; tc . setItsId ( pCatId ) ; txdLn . setTaxCategory ( tc ) ; pTxdLns . add ( txdLn ) ; } BigDecimal bd100 = new BigDecimal ( "100.00" ) ; BigDecimal txv = BigDecimal . valueOf ( pSubt ) . multiply ( BigDecimal . valueOf ( pPercent ) ) . divide ( bd100 , pAs . getPricePrecision ( ) , pTxRules . getSalTaxRoundMode ( ) ) ; txdLn . setTotalTaxes ( txdLn . getTotalTaxes ( ) . add ( txv ) ) ; BigDecimal txvf = BigDecimal . valueOf ( pSubtFc ) . multiply ( BigDecimal . valueOf ( pPercent ) ) . divide ( bd100 , pAs . getPricePrecision ( ) , pTxRules . getSalTaxRoundMode ( ) ) ; txdLn . setForeignTotalTaxes ( txdLn . getForeignTotalTaxes ( ) . add ( txvf ) ) ; }
<p>Adds total tax by category for farther invoice adjusting.</p>
@param pTxdLns Tax Data lines
@param pCatId tax category ID
@param pSubt subtotal without taxes
@param pSubtFc subtotal FC without taxes
@param pPercent tax rate
@param pAs AS
@param pTxRules tax rules