@cust_pay_objects = $cust_bill->cust_pay;
+ $tax_amount = $record->tax;
+
@lines = $cust_bill->print_text;
@lines = $cust_bill->print_text $time;
;
}
+=item tax
+
+Returns the tax amount (see L<FS::cust_bill_pkg>) for this invoice.
+
+=cut
+
+sub tax {
+ my $self = shift;
+ my $total = 0;
+ my @taxlines = qsearch( 'cust_bill_pkg', { 'invnum' => $self->invnum ,
+ 'pkgnum' => 0 } );
+ foreach (@taxlines) { $total += $_->setup; }
+ $total;
+}
+
=item owed
Returns the amount owed (still outstanding) on this invoice, which is charged
=head1 VERSION
-$Id: cust_bill.pm,v 1.7 2001-04-09 23:05:15 ivan Exp $
+$Id: cust_bill.pm,v 1.8 2001-08-03 20:34:28 jeff Exp $
=head1 BUGS