[freeside-commits] branch FREESIDE_3_BRANCH updated. 37a3b713fa7015629f920e01ad16f4957d5aa085

Ivan Kohler ivan at freeside.biz
Tue Apr 10 17:54:17 PDT 2018


The branch, FREESIDE_3_BRANCH has been updated
       via  37a3b713fa7015629f920e01ad16f4957d5aa085 (commit)
      from  49bcb9d87faaaceecf6a2d3f84985fd7e252584c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 37a3b713fa7015629f920e01ad16f4957d5aa085
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Apr 10 17:54:15 2018 -0700

    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

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/Template_Mixin.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list