projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix CDRs showing on typeset (but not printed) invoices w/squelch_cdr, RT#13561
[freeside.git]
/
FS
/
FS
/
cust_bill.pm
diff --git
a/FS/FS/cust_bill.pm
b/FS/FS/cust_bill.pm
index
082c92d
..
25f9c49
100644
(file)
--- 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{$_}
$params{'time'} = $today if $today;
$params{'template'} = $template if $template;
$params{$_} = $opt{$_}
- foreach grep $opt{$_}, qw( unsque
a
lch_cdr notice_name );
+ foreach grep $opt{$_}, qw( unsquelch_cdr notice_name );
$self->print_generic( %params );
}
$self->print_generic( %params );
}
@@
-2210,7
+2210,7
@@
sub print_latex {
$params{'time'} = $today if $today;
$params{'template'} = $template if $template;
$params{$_} = $opt{$_}
$params{'time'} = $today if $today;
$params{'template'} = $template if $template;
$params{$_} = $opt{$_}
- foreach grep $opt{$_}, qw( unsque
a
lch_cdr notice_name );
+ foreach grep $opt{$_}, qw( unsquelch_cdr notice_name );
$template ||= $self->_agent_template;
$template ||= $self->_agent_template;
@@
-4612,13
+4612,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
@@
-4647,6
+4655,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,
@@
-4822,7
+4831,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;
}
}