X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=25f9c495a210c3d49588fff1cdb9d54d7d8989b5;hb=06a1de4f0969dbbe1a689c1185393e664cdb907f;hp=082c92d03dc37ef211078932a1d33d1760354b8a;hpb=3f8dd846e92d44fc461d91d5fd5e012a770370d1;p=freeside.git diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index 082c92d03..25f9c495a 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2168,7 +2168,7 @@ sub print_text { $params{'time'} = $today if $today; $params{'template'} = $template if $template; $params{$_} = $opt{$_} - foreach grep $opt{$_}, qw( unsquealch_cdr notice_name ); + foreach grep $opt{$_}, qw( unsquelch_cdr notice_name ); $self->print_generic( %params ); } @@ -2210,7 +2210,7 @@ sub print_latex { $params{'time'} = $today if $today; $params{'template'} = $template if $template; $params{$_} = $opt{$_} - foreach grep $opt{$_}, qw( unsquealch_cdr notice_name ); + foreach grep $opt{$_}, qw( unsquelch_cdr notice_name ); $template ||= $self->_agent_template; @@ -4612,13 +4612,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 @@ -4647,6 +4655,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, @@ -4822,7 +4831,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; } }