Bug 23106: Tweak display of totals on payment page
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 13 Jun 2019 09:02:35 +0000 (10:02 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 24 Jun 2019 13:21:18 +0000 (14:21 +0100)
This patch tweaks the display of totals on the fines payments page to
clarify between the totals before and after applying credits.

Test Plan:
1) Add some debts and credits to a patrons account
2) Look at the pay page before applying the patch
3) Look at the pay page after applying the patch
4) Verify the new layout is an improvment or not

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Maryse Simard <maryse.simard@inlibro.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt

index 10796dd..96d0d41 100644 (file)
 </tbody>
 
 <tfoot>
+    <tr>
+        <td class="total" colspan="10">Total due:</td>
+        <td style="text-align: right;">[% total | $Price %]</td>
+    </tr>
     [% IF outstanding_credits.total_outstanding < 0 %]
         <tr>
             <td class="total" colspan="10">Outstanding credits could be applied: </td>
             <td class="credit" style="text-align: right;"><button type="submit" id="apply_credits" name="apply_credits" value="apply_credits" class="btn btn-default btn-sm">Apply <strong class="credit">[% outstanding_credits.total_outstanding | $Price %]</strong></button></td>
         </tr>
+        <tr>
+            <td class="total" colspan="10">Total due if credit applied:</td>
+            <td style="text-align: right;">[% total + outstanding_credits.total_outstanding | $Price %]</td>
+        </tr>
     [% END %]
     [% IF ( account_grp.total ) %]
         <tr>
             <td style="text-align: right;">[% account_grp.total | $Price %]</td>
         </tr>
     [% END %]
-    <tr>
-        <td class="total" colspan="10">Total due:</td>
-        [% IF outstanding_credits.total_outstanding < 0 %]
-            <td style="text-align: right;">[% total + outstanding_credits.total_outstanding | $Price %]</td>
-        [% ELSE %]
-            <td style="text-align: right;">[% total | $Price %]</td>
-        [% END %]
-    </tr>
 </tfoot>
 
 </table>