Calculating total line tax amount on AR invoice
Hi,
I am trying to calculate the total tax amount per invoice line. But only the amount on line #1 is calculating. Any help is appreciated.
I am grouping per G_LINES with a condition on line_type (line), if there is a <LIST_G_TAX_RATE> <G_TAX_RATE>LINE_TAX_RATE1 exists, calculate the tax amount as below.
But, only first <LIST_G_TAX_RATE> <G_TAX_RATE>LINE_TAX_RATE1 is calculated.... not the sum of all 3 tax_rate lines
<?if:not(.//G_TAX_RATE/LINE_TAX_RATE1)?><?format-number(sum(LIST_G_TAX_RATE/G_TAX_RATE/LINE_TAX_RATE1 div 100 * LINE_EXTENDED_AMOUNT),'0.00')?><?end if?>