projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
44dcd4a
)
on summary-format invoices, avoid duplicating the tax section, #72342
author
Mark Wells
<mark@freeside.biz>
Thu, 22 Sep 2016 22:48:16 +0000
(15:48 -0700)
committer
Mark Wells
<mark@freeside.biz>
Thu, 22 Sep 2016 22:48:16 +0000
(15:48 -0700)
FS/FS/Template_Mixin.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Template_Mixin.pm
b/FS/FS/Template_Mixin.pm
index
c8ddffd
..
caa31f7
100644
(file)
--- a/
FS/FS/Template_Mixin.pm
+++ b/
FS/FS/Template_Mixin.pm
@@
-1240,11
+1240,13
@@
sub print_generic {
if $DEBUG > 1;
# create a tax section if we don't yet have one
if $DEBUG > 1;
# create a tax section if we don't yet have one
+ my @items_tax = $self->_items_tax;
my $tax_description = 'Taxes, Surcharges, and Fees';
my $tax_section =
List::Util::first { $_->{description} eq $tax_description } @sections;
if (!$tax_section) {
$tax_section = { 'description' => $tax_description };
my $tax_description = 'Taxes, Surcharges, and Fees';
my $tax_section =
List::Util::first { $_->{description} eq $tax_description } @sections;
if (!$tax_section) {
$tax_section = { 'description' => $tax_description };
+ push @sections, $tax_section if $multisection and @items_tax > 0;
}
$tax_section->{tax_section} = 1; # mark this section as containing taxes
# if this is an existing tax section, we're merging the tax items into it.
}
$tax_section->{tax_section} = 1; # mark this section as containing taxes
# if this is an existing tax section, we're merging the tax items into it.
@@
-1259,9
+1261,6
@@
sub print_generic {
#$tax_section->{'summarized'} = ''; #why? $summarypage && !$tax_weight ? 'Y' : '';
#$tax_section->{'sort_weight'} = $tax_weight;
#$tax_section->{'summarized'} = ''; #why? $summarypage && !$tax_weight ? 'Y' : '';
#$tax_section->{'sort_weight'} = $tax_weight;
- my @items_tax = $self->_items_tax;
- push @sections, $tax_section if $multisection and @items_tax > 0;
-
foreach my $tax ( @items_tax ) {
$taxtotal += $tax->{'amount'};
foreach my $tax ( @items_tax ) {
$taxtotal += $tax->{'amount'};