LP1981628 Follow up to Stripe payment intents bug
authorTerran McCanna <tmccanna@georgialibraries.org>
Wed, 13 Jul 2022 20:12:36 +0000 (16:12 -0400)
committerGalen Charlton <gmc@equinoxOLI.org>
Tue, 11 Oct 2022 21:01:55 +0000 (17:01 -0400)
The bug fix for 1965579 only resolved the negative bills problem
for grocery bills. This follow up resolves the problem for
circulation bills as well.

Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Jason Etheridge <jason@EquinoxOLI.org>
Signed-off-by: Galen Charlton <gmc@equinoxOLI.org>

Open-ILS/src/templates-bootstrap/opac/myopac/charges.tt2
Open-ILS/src/templates/opac/myopac/main.tt2

index 653740d..1a4a671 100755 (executable)
@@ -54,6 +54,7 @@
                 </tr>
             </thead>
             <tbody id='myopac_circ_trans_tbody'>
+                           [% c = 0; neg_or_zero = 0; %]
                 [% FOR f IN ctx.fines.circulation;
                     attrs = {marc_xml => f.marc_xml};
                     IF f.marc_xml;
@@ -75,6 +76,7 @@
                             [% money(f.xact.balance_owed) %]
                         </strong>
                         <input class="fineAmount" value="[% f.xact.balance_owed %]" hidden />
+                                               [% IF f.xact.balance_owed <= 0; neg_or_zero = neg_or_zero + 1; END %]
                     </td>
                     
                     <td>
                 </tr>
             </thead>
             <tbody id='myopac_trans_tbody'>
-                [% c = 0; neg_or_zero = 0; %]
                 [% FOR f IN ctx.fines.grocery %]
                 <tr class ='myopac_trans_row'>
                 [% c = c + 1; %]
index 87a3b3f..30e00ae 100644 (file)
@@ -55,6 +55,7 @@
                 </tr>
             </thead>
             <tbody id='myopac_circ_trans_tbody'>
+                [% neg_or_zero = 0; %]
                 [% FOR f IN ctx.fines.circulation;
                     attrs = {marc_xml => f.marc_xml};
                     IF f.marc_xml;
@@ -74,6 +75,7 @@
                     <td>
                         <strong class="alert">
                             [% money(f.xact.balance_owed)%]
+                            [% IF f.xact.balance_owed <= 0; neg_or_zero = neg_or_zero + 1; END %]
                         </strong>
                     </td>
                     
                 </tr>
             </thead>
             <tbody id='myopac_trans_tbody'>
-                [% neg_or_zero = 0; %]
                 [% FOR f IN ctx.fines.grocery %]
                 <tr id='myopac_trans_row'>