summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2018-04-10 17:54:15 -0700
committerIvan Kohler <ivan@freeside.biz>2018-04-10 17:54:15 -0700
commit37a3b713fa7015629f920e01ad16f4957d5aa085 (patch)
tree5a3c9b24b8b78e29e0ba2978b067514a848f7e81
parent49bcb9d87faaaceecf6a2d3f84985fd7e252584c (diff)
fix v3 perf regression from #79636, RT#80177
-rw-r--r--FS/FS/Template_Mixin.pm6
1 files changed, 4 insertions, 2 deletions
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