From: ivan Date: Wed, 14 May 2003 16:51:43 +0000 (+0000) Subject: display recurring custom line items on invoices as well as one-shot ones X-Git-Tag: freeside_1_5_0pre2~19 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=ac15b7153b154f5bb951f0ce62731f8216ff9fc4 display recurring custom line items on invoices as well as one-shot ones --- 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) + ]; + } } }