projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
bb22f46
)
avoid showing discounts redundantly on invoices, #31273
author
Mark Wells
<mark@freeside.biz>
Mon, 17 Nov 2014 03:27:52 +0000
(19:27 -0800)
committer
Mark Wells
<mark@freeside.biz>
Mon, 17 Nov 2014 03:27:52 +0000
(19:27 -0800)
FS/FS/Template_Mixin.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Template_Mixin.pm
b/FS/FS/Template_Mixin.pm
index
29c50b2
..
0928ee5
100644
(file)
--- 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;
) {
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"
if( @discounts ) {
warn "$me _items_cust_bill_pkg including discounts for ".
$cust_bill_pkg->billpkgnum."\n"