From: Ivan Kohler Date: Wed, 11 Apr 2018 00:54:15 +0000 (-0700) Subject: fix v3 perf regression from #79636, RT#80177 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=37a3b713fa7015629f920e01ad16f4957d5aa085;p=freeside.git fix v3 perf regression from #79636, RT#80177 --- diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm index d86ce7169..e5a449aa7 100644 --- a/FS/FS/Template_Mixin.pm +++ b/FS/FS/Template_Mixin.pm @@ -1190,6 +1190,8 @@ sub print_generic { my %options = (); $options{'section'} = $section if $multisection; + $options{'section_with_taxes'} = 1 + if $conf->config_bool('invoice_sections_with_taxes', $cust_main->agentnum); $options{'format'} = $format; $options{'escape_function'} = $escape_function; $options{'no_usage'} = 1 unless $unsquelched; @@ -3131,7 +3133,7 @@ sub _items_fee { # but not escape the base description line my @pkg_tax = $cust_bill_pkg->_pkg_tax_list - if $self->conf->exists('invoice_sections_with_taxes'); + if $options{section_with_taxes}; push @items, { feepart => $cust_bill_pkg->feepart, @@ -3377,7 +3379,7 @@ sub _items_cust_bill_pkg { ); my @pkg_tax = $cust_bill_pkg->_pkg_tax_list - if $self->conf->exists('invoice_sections_with_taxes'); + if $opt{section_with_taxes}; if ( ref($cust_bill_pkg) eq 'FS::quotation_pkg' ) { # XXX this should be pulled out into quotation_pkg