[freeside-commits] branch master updated. 5828f9ef8d7c9e424423ba2063840060d2da8b6e

Mitch Jackson mitch at freeside.biz
Sat Apr 14 18:19:53 PDT 2018


The branch, master has been updated
       via  5828f9ef8d7c9e424423ba2063840060d2da8b6e (commit)
       via  fe2fad859d8444565c0bb35f438accfdf4a240af (commit)
       via  49bedb2bc744edc47f5e189e449c7272da5510db (commit)
      from  24504360a41565105569992bf4ff5273b5f88bf7 (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 5828f9ef8d7c9e424423ba2063840060d2da8b6e
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Sat Apr 14 19:35:12 2018 -0500

    RT# 42357,78190 Fix Fees appearing twice within sectioned invoices

diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 4f5501d15..7ea22b55d 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -1216,6 +1216,17 @@ sub print_generic {
     foreach my $line_item ( $self->_items_pkg(%options),
                             $self->_items_fee(%options) ) {
 
+      # When bill is sectioned by location, fees may be displayed within the
+      # appropriate location section.  Suppress this fee from the taxes/fees
+      # end section, so it doesn't appear to be charged twice and make the
+      # subtotals seem incorrect
+      next
+        if $line_item->{locationnum}
+        && ref $options{section}
+        && !exists $options{section}->{locationnum}
+        && $self->has_sections
+        && $conf->config($tc.'sections_method') eq 'location';
+
       warn "$me     adding line item ".
            join(', ', map "$_=>".$line_item->{$_}, keys %$line_item). "\n"
         if $DEBUG > 1;

commit fe2fad859d8444565c0bb35f438accfdf4a240af
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Sat Apr 14 19:32:03 2018 -0500

    RT# 79636,42357 invoice_sections_with_taxes bugfix

diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 04ef4aab9..4f5501d15 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -1195,7 +1195,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);
+      if $multisection
+      && $conf->config_bool('invoice_sections_with_taxes', $cust_main->agentnum);
     $options{'format'} = $format;
     $options{'escape_function'} = $escape_function;
     $options{'no_usage'} = 1 unless $unsquelched;

commit 49bedb2bc744edc47f5e189e449c7272da5510db
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Sat Apr 14 17:29:03 2018 -0500

    RT# 79636,42357 Suppress $0.00 summary line items

diff --git a/FS/FS/Template_Mixin.pm b/FS/FS/Template_Mixin.pm
index 6c1e30e4a..04ef4aab9 100644
--- a/FS/FS/Template_Mixin.pm
+++ b/FS/FS/Template_Mixin.pm
@@ -1090,7 +1090,7 @@ sub print_generic {
     }
   } else {
     # subtotal sectioning is the same as for the actual invoice sections
-    @summary_subtotals = @sections;
+    @summary_subtotals = grep $_->{subtotal}, @sections;
   }
 
   # Hereafter, push sections to both @sections and @summary_subtotals

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

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




More information about the freeside-commits mailing list