diff options
author | ivan <ivan> | 2003-05-14 16:51:43 +0000 |
---|---|---|
committer | ivan <ivan> | 2003-05-14 16:51:43 +0000 |
commit | ac15b7153b154f5bb951f0ce62731f8216ff9fc4 (patch) | |
tree | ff1949e3c7cebe22b3294b51f30952505132d2e4 | |
parent | d1fe599b5646d693c99908b0288a76744103b5a2 (diff) |
display recurring custom line items on invoices as well as one-shot ones
-rw-r--r-- | FS/FS/cust_bill.pm | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 76c0752ab..a0634d918 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -983,13 +983,20 @@ sub print_text { push @buf, map { [ " $_", '' ] } $cust_bill_pkg->details; - } else { #pkgnum tax + } else { #pkgnum tax or one-shot line item my $itemdesc = defined $cust_bill_pkg->dbdef_table->column('itemdesc') ? ( $cust_bill_pkg->itemdesc || 'Tax' ) : 'Tax'; - push @buf, [ $itemdesc, - $money_char. sprintf("%10.2f", $cust_bill_pkg->setup) ] - if $cust_bill_pkg->setup != 0; + if ( $cust_bill_pkg->setup != 0 ) { + push @buf, [ $itemdesc, + $money_char. sprintf("%10.2f", $cust_bill_pkg->setup) ]; + } + if ( $cust_bill_pkg->recur != 0 ) { + push @buf, [ "$itemdesc (". time2str("%x", $cust_bill_pkg->sdate). " - " + . time2str("%x", $cust_bill_pkg->edate). ")", + $money_char. sprintf("%10.2f", $cust_bill_pkg->recur) + ]; + } } } |