projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix UI for package editing w/recur_show_zero, add setup_show_zero, RT#9777
[freeside.git]
/
FS
/
FS
/
cust_bill.pm
diff --git
a/FS/FS/cust_bill.pm
b/FS/FS/cust_bill.pm
index
2d7341e
..
7bf4fd2
100644
(file)
--- a/
FS/FS/cust_bill.pm
+++ b/
FS/FS/cust_bill.pm
@@
-4497,13
+4497,21
@@
sub _items_cust_bill_pkg {
my $cust_pkg = $cust_bill_pkg->cust_pkg;
my $cust_pkg = $cust_bill_pkg->cust_pkg;
- if ( $cust_bill_pkg->setup != 0 && (!$type || $type eq 'S') ) {
+ if ( (!$type || $type eq 'S')
+ && ( $cust_bill_pkg->setup != 0
+ || $cust_bill_pkg->setup_show_zero
+ )
+ )
+ {
warn "$me _items_cust_bill_pkg adding setup\n"
if $DEBUG > 1;
my $description = $desc;
warn "$me _items_cust_bill_pkg adding setup\n"
if $DEBUG > 1;
my $description = $desc;
- $description .= ' Setup' if $cust_bill_pkg->recur != 0;
+ $description .= ' Setup'
+ if $cust_bill_pkg->recur != 0
+ || $discount_show_always
+ || $cust_bill_pkg->recur_show_zero;
my @d = ();
unless ( $cust_pkg->part_pkg->hide_svc_detail
my @d = ();
unless ( $cust_pkg->part_pkg->hide_svc_detail
@@
-4532,6
+4540,7
@@
sub _items_cust_bill_pkg {
push @{ $s->{ext_description} }, @d;
} else {
$s = {
push @{ $s->{ext_description} }, @d;
} else {
$s = {
+ _is_setup => 1,
description => $description,
#pkgpart => $part_pkg->pkgpart,
pkgnum => $cust_bill_pkg->pkgnum,
description => $description,
#pkgpart => $part_pkg->pkgpart,
pkgnum => $cust_bill_pkg->pkgnum,
@@
-4708,7
+4717,9
@@
sub _items_cust_bill_pkg {
push @b, { %$_ }
if $_->{amount} != 0
|| $discount_show_always
push @b, { %$_ }
if $_->{amount} != 0
|| $discount_show_always
- || $cust_bill_pkg->recur_show_zero;
+ || ( ! $_->{_is_setup} && $cust_bill_pkg->recur_show_zero )
+ || ( $_->{_is_setup} && $cust_bill_pkg->setup_show_zero )
+ ;
$_ = undef;
}
}
$_ = undef;
}
}