- $tx = getTaxInfo($id);
-
- $rep->TextCol(0, 1, $tx['name'] . " " . number_format2($tx['rate'], $dec) . "%");
- $rep->TextCol(1, 2, number_format2($sum['out'], $dec));
- $rep->TextCol(2, 3,number_format2($sum['taxout'], $dec));
- $rep->TextCol(3, 4, number_format2($sum['in'], $dec));
- $rep->TextCol(4, 5,number_format2($sum['taxin'], $dec));
- $rep->TextCol(5, 6, number_format2($sum['taxout']-$sum['taxin'], $dec));
- $taxtotal += $sum['taxout']-$sum['taxin'];
+ if ($id)
+ {
+ $tx = getTaxInfo($id);
+ $rep->TextCol(0, 1, $tx['name'] . " " . number_format2($tx['rate'], $dec) . "%");
+ } else {
+ $rep->TextCol(0, 1, _('Exempt'));
+ }
+ $rep->AmountCol(1, 2, $sum['out'], $dec);
+ $rep->AmountCol(2, 3, $sum['taxout'], $dec);
+ $rep->AmountCol(3, 4, $sum['in'], $dec);
+ $rep->AmountCol(4, 5, $sum['taxin'], $dec);
+ $rep->AmountCol(5, 6, $sum['taxout']+$sum['taxin'], $dec);
+ $taxtotal += $sum['taxout']+$sum['taxin'];