[freeside-commits] branch master updated. adfc623691f9de2feacdb62b5b596112509e2ce9

Mitch Jackson mitch at freeside.biz
Sun Apr 15 14:56:05 PDT 2018


The branch, master has been updated
       via  adfc623691f9de2feacdb62b5b596112509e2ce9 (commit)
       via  8441edfbe769a7086f8062913ad840255cdf4b63 (commit)
      from  5828f9ef8d7c9e424423ba2063840060d2da8b6e (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 adfc623691f9de2feacdb62b5b596112509e2ce9
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Sun Apr 15 16:41:32 2018 -0500

    RT# 78190,42357 Correct layout discrepancies for bill summary

diff --git a/conf/invoice_htmlsummary b/conf/invoice_htmlsummary
index 249db9b07..c07d7e229 100644
--- a/conf/invoice_htmlsummary
+++ b/conf/invoice_htmlsummary
@@ -35,15 +35,6 @@
           <td align="right"><b><%= $dollar.$current_less_finance %></b></td>
         </tr>
         <tr><th colspan=2><br></th></tr>
-        <tr>
-          <td><b><u><br>Summary of Payments and Credits<br></u></b></td>
-          <td></td>
-        </tr>
-        <tr>
-          <td><b>Payments and Credits</b></td>
-          <td align="right"><b>-<%= $dollar.$balance_adjustments %></b></td>
-        </tr>
-        <tr><th colspan=2><br></th></tr>
         <tr><td colspan=2><br></td></tr>
         <tr>
           <td><b><u>Invoice Summary</u></b></td>
@@ -61,16 +52,14 @@
           <td><b>New Charges</b></td>
           <td align="right"><b><%= $dollar.$current_less_finance %></b></td>
         </tr>
-        <%=
-          foreach my $section ( grep $_->{adjust_section}, @sections) {
-            $OUT .= '<tr><td><b>'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '</b></td>';
-            $OUT .= qq(<th align="right"><b>). $section->{'subtotal'}. "</b></th></tr>";
-          }
-        %>
-        <tr>
-          <td><b>Payments and Credits</b></td>
-          <th align="right"><b>-<%= $dollar.sprintf('%.2f', $balance_adjustments) %></b></th>
-        </tr>
+        <%= if ( $balance_adjustments > 0 ) {
+          $OUT .= "
+            <tr>
+              <td><b>Payments and Credits</b></td>
+              <th align='right'><b>-$dollar" . sprintf('%.2f', $balance_adjustments). "</b></th>
+            </tr>
+          ";
+        } %>
         <tr>
           <td><b>Total Amount Due</b></td>
           <td align="right"><b><%= $dollar.sprintf('%.2f', $balance) %></b></td>
diff --git a/conf/invoice_latexsummary b/conf/invoice_latexsummary
index 52868419b..3b13327dc 100644
--- a/conf/invoice_latexsummary
+++ b/conf/invoice_latexsummary
@@ -9,12 +9,9 @@
 \begin{tabular}{lr}
 \hline
 &\\
-\textbf{\underline{Summary of Previous Balance and Payments}} & \\
+\textbf{\underline{Summary of Previous Balance}} & \\
 &\\
-\textbf{Previous Balance}&\textbf{\dollar[@-- $true_previous_balance --@]}\\
-\textbf{Payments}&\textbf{\dollar[@-- $balance_adjustments --@]}\\
-\cline{2-2}
-\textbf{Balance Outstanding}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance) --@]}\\
+\textbf{Previous Balance}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance) --@]}\\
 &\\
 \hline
 &\\
@@ -36,15 +33,11 @@
 \textbf{Previous Past Due Charges}&\textbf{\dollar[@-- sprintf('%.2f', $true_previous_balance) --@]}\\
 \textbf{Finance charges on overdue amount}&\textbf{\dollar[@-- $finance_amount --@]}\\
 \textbf{New Charges}&\textbf{\dollar[@-- $current_less_finance --@]}\\
-
 [@--
-  #false laziness w/invoice_htmlsummary and above
-  foreach my $section ( grep $_->{adjust_section}, @sections ) {
-    $OUT .= '\textbf{'. ($section->{'description'} ? $section->{'description'} : 'Charges' ). '}';
-    $OUT .= '&\textbf{'. $section->{'subtotal'}. '}\\\\';
+  if ( $balance_adjustments > 0 ) {
+    $OUT .= '\textbf{Payments and Credits}&\textbf{-\dollar'.$balance_adjustments.'}\\\\'
   }
 --@]
-
 \cline{2-2}
 \textbf{Total Amount Due}&\textbf{\dollar[@-- sprintf('%.2f', $balance) --@]}\\
 &\\

commit 8441edfbe769a7086f8062913ad840255cdf4b63
Author: Mitch Jackson <mitch at freeside.biz>
Date:   Sun Apr 15 16:13:21 2018 -0500

    RT# 78190 Fix format bug for invoices sectioned by location

diff --git a/conf/invoice_html b/conf/invoice_html
index d8a2d0a97..935c94346 100644
--- a/conf/invoice_html
+++ b/conf/invoice_html
@@ -134,7 +134,7 @@
       my $columncount = $unitprices ? 5 : 3;
       foreach my $section ( grep { !$summary || $_->{description} ne $finance_section } @sections ) {
         if ($section->{'pretotal'} && !$summary) {
-          $OUT .= '</table>' if $notfirst;
+          $OUT .= '</table>' if $notfirst++;
           $OUT .=
             '<table width="100%"><tr><td>'.
             '<p align="right"><b><font size="+1">'.
@@ -145,7 +145,10 @@
             '</td></tr>';
         }
         unless ($section->{'summarized'}) {
-          $OUT .= '</table>' if ( $notfirst || $section->{'pretotal'} && !$summary );
+          if ( $notfirst || $section->{'pretotal'} && !$summary ) {
+            $OUT .= '</table>';
+            $notfirst = 1;
+          }
           $OUT .= '<table><tr><td>';
           $OUT .= '<p class="allcaps"><b>';
           my $sectionhead;
@@ -292,9 +295,6 @@
             '<p>';
           $OUT .= '</td></tr>';
         }
-
-        $notfirst++;
-
       }
 
       my $style = 'border-top: 3px solid #000000;';

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

Summary of changes:
 conf/invoice_html         | 10 +++++-----
 conf/invoice_htmlsummary  | 27 ++++++++-------------------
 conf/invoice_latexsummary | 15 ++++-----------
 3 files changed, 17 insertions(+), 35 deletions(-)




More information about the freeside-commits mailing list