X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FTemplate_Mixin.pm;h=7018223b4d5ac64cdbece29d82b3bd940838b559;hb=4a56e0d606cb6071a5830966687284b277f1fd2d;hp=29c50b2ee776a714e67309954799dbfc9e39a4ed;hpb=014e2c547f63bcd283eac4d0210a7976ca5fcb90;p=freeside.git diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 29c50b2ee..7018223b4 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -2740,6 +2740,10 @@ sub _items_cust_bill_pkg { 'pkgnum' => $cust_bill_pkg->pkgpart, #so it displays in Ref 'description' => "$desc (". $cust_bill_pkg->part_pkg->freq_pretty.")", 'amount' => sprintf("%.2f", $cust_bill_pkg->recur), + 'preref_html' => ( $opt{preref_callback} + ? &{ $opt{preref_callback} }( $cust_bill_pkg ) + : '' + ), }; } @@ -3036,6 +3040,14 @@ sub _items_cust_bill_pkg { ) { my @discounts = $cust_bill_pkg->cust_bill_pkg_discount; + # special case: if there are old "discount details" on this line + # item, don't show discount line items + if ( FS::cust_bill_pkg_detail->count( + "detail LIKE 'Includes discount%' AND billpkgnum = " . + $cust_bill_pkg->billpkgnum + ) > 0 ) { + @discounts = (); + } if( @discounts ) { warn "$me _items_cust_bill_pkg including discounts for ". $cust_bill_pkg->billpkgnum."\n"