- # just transform each CBPTRL record into a tax line item.
- # calculate_taxes will consolidate them, but before that happens we have
- # to do tax on tax calculation.
- my @tax_items;
- foreach (@tax_locations) {
- next if $_->amount == 0;
- my $tax_item = FS::cust_bill_pkg->new({
- 'pkgnum' => 0,
- 'recur' => 0,
- 'setup' => $_->amount,
- 'sdate' => '', # $_->sdate?
- 'edate' => '',
- 'itemdesc' => $name,
- 'cust_bill_pkg_tax_rate_location' => [ $_ ],
- });
- $_->set('tax_cust_bill_pkg' => $tax_item);
- push @tax_items, $tax_item;
- }
-
- return @tax_items;