diff options
author | Mark Wells <mark@freeside.biz> | 2014-11-16 19:27:52 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2014-11-16 19:27:52 -0800 |
commit | 77e772f611f080e537d5bc33a661e82dec0c3502 (patch) | |
tree | d71103a3d5a9976d4cd582a1f8757df94f39c167 /FS/FS | |
parent | bb22f46481173b008fc9cb98b108ef1da9c1dc4d (diff) |
avoid showing discounts redundantly on invoices, #31273
Diffstat (limited to 'FS/FS')
-rw-r--r-- | FS/FS/Template_Mixin.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index 29c50b2ee..0928ee52f 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -3036,6 +3036,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" |