X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=4ffb8e210c5769de03d5be24f3596f2a0ab76072;hp=8480ceadc3f5c854efe1fafb5195505bcfa5d2ec;hb=1dc0755721b4f5989f798df4d37842c70662cf9f;hpb=f7caf50929669fdf317f1ab51767ac93a1f743fc diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 8480ceadc..4ffb8e210 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -64,6 +64,8 @@ FS::cust_bill - Object methods for cust_bill records @cust_pay_objects = $cust_bill->cust_pay; + $tax_amount = $record->tax; + @lines = $cust_bill->print_text; @lines = $cust_bill->print_text $time; @@ -231,6 +233,21 @@ sub cust_pay { ; } +=item tax + +Returns the tax amount (see L) 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 @@ -424,7 +441,7 @@ sub print_text { =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