[freeside-commits] branch FREESIDE_3_BRANCH updated. 462a9a2808f839c1b4ab676ece47d4d1cebec2ef
Mark Wells
mark at 420.am
Sun Nov 16 19:28:29 PST 2014
The branch, FREESIDE_3_BRANCH has been updated
via 462a9a2808f839c1b4ab676ece47d4d1cebec2ef (commit)
from 74e6dd693162bb44bcb9ee45c49f6d48d7b2072e (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 462a9a2808f839c1b4ab676ece47d4d1cebec2ef
Author: Mark Wells <mark at freeside.biz>
Date: Sun Nov 16 19:27:35 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