diff options
author | Ivan Kohler <ivan@freeside.biz> | 2012-07-04 19:07:56 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2012-07-04 19:07:56 -0700 |
commit | cfaa68d87335cca3d998717b8653fdba60f4e6bc (patch) | |
tree | 383015b6b312faaa7058b01ed358c8f87a2d506b /FS | |
parent | 36f114fa4084bfcfb52ed4673d54d1a0a7e33d15 (diff) |
quotations, RT#16996
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/Template_Mixin.pm | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 64b9db560..d1bcec5d5 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -2186,7 +2186,30 @@ sub _items_cust_bill_pkg { 'no_usage' => $opt{'no_usage'}, ); - if ( $cust_bill_pkg->pkgnum > 0 ) { + if ( ref($cust_bill_pkg) eq 'FS::quotation_pkg' ) { + + warn "$me _items_cust_bill_pkg cust_bill_pkg is quotation_pkg\n" + if $DEBUG > 1; + + if ( $cust_bill_pkg->setup != 0 ) { + my $description = $desc; + $description .= ' Setup' + if $cust_bill_pkg->recur != 0 + || $discount_show_always + || $cust_bill_pkg->recur_show_zero; + push @b, { + 'description' => $description, + 'amount' => sprintf("%.2f", $cust_bill_pkg->setup), + }; + } + if ( $cust_bill_pkg->recur != 0 ) { + push @b, { + 'description' => "$desc (". $cust_bill_pkg->part_pkg->freq_pretty.")", + 'amount' => sprintf("%.2f", $cust_bill_pkg->recur), + }; + } + + } elsif ( $cust_bill_pkg->pkgnum > 0 ) { warn "$me _items_cust_bill_pkg cust_bill_pkg is non-tax\n" if $DEBUG > 1; |