[freeside-commits] branch master updated. 77e772f611f080e537d5bc33a661e82dec0c3502

Mark Wells mark at 420.am
Sun Nov 16 19:28:34 PST 2014


The branch, master has been updated
       via  77e772f611f080e537d5bc33a661e82dec0c3502 (commit)
      from  bb22f46481173b008fc9cb98b108ef1da9c1dc4d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 77e772f611f080e537d5bc33a661e82dec0c3502
Author: Mark Wells <mark at freeside.biz>
Date:   Sun Nov 16 19:27:52 2014 -0800

    avoid showing discounts redundantly on invoices, #31273

diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 29c50b2..0928ee5 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"

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Template_Mixin.pm |    8 ++++++++
 1 file changed, 8 insertions(+)




More information about the freeside-commits mailing list