X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=7bf4fd2ac49027a6cd4d5083a359aead775f257f;hb=5f7fe6b10990eee2d1e8a9608cfd2bb656912477;hp=2d7341efdf11696ba99f1e190b47a41e6a0add2b;hpb=26e91d6afcd21b7113cdc6aebb37ad5acd3d5de8;p=freeside.git diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 2d7341efd..7bf4fd2ac 100644 --- 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; - 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; - $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 @@ -4532,6 +4540,7 @@ sub _items_cust_bill_pkg { push @{ $s->{ext_description} }, @d; } else { $s = { + _is_setup => 1, 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 - || $cust_bill_pkg->recur_show_zero; + || ( ! $_->{_is_setup} && $cust_bill_pkg->recur_show_zero ) + || ( $_->{_is_setup} && $cust_bill_pkg->setup_show_zero ) + ; $_ = undef; } }