LP1800484: Substitute 0 for missing Totals values
authorJason Boyer <jboyer@library.in.gov>
Mon, 29 Oct 2018 14:53:41 +0000 (10:53 -0400)
committerGalen Charlton <gmc@equinoxinitiative.org>
Sat, 3 Aug 2019 15:50:29 +0000 (11:50 -0400)
If nothing is returned for the Totals on the patron Bills tab,
use a 0 rather than leaving the value missing.

Signed-off-by: Jason Boyer <jboyer@library.in.gov>
Signed-off-by: Rogan Hamby <rogan.hamby@gmail.com>
Signed-off-by: Galen Charlton <gmc@equinoxinitiative.org>
Open-ILS/src/templates/staff/circ/patron/t_bills.tt2

index 69d0439..b2d41cc 100644 (file)
@@ -4,19 +4,19 @@
 
     <div class="row">
       <div class="col-md-4">[% l('Total Owed:') %]</div>
-      <div class="col-md-2 strong-text">{{summary.balance_owed() | currency}}</div>
+      <div class="col-md-2 strong-text">{{(summary.balance_owed() || 0) | currency}}</div>
       <div class="col-md-4">[% l('Refunds Available:') %]</div>
       <div class="col-md-2">{{refunds_available() | currency}}</div>
     </div>
     <div class="row">
       <div class="col-md-4">[% l('Total Billed:') %]</div>
-      <div class="col-md-2">{{summary.total_owed() | currency}}</div>
+      <div class="col-md-2">{{(summary.total_owed() || 0) | currency}}</div>
       <div class="col-md-4">[% l('Credit Available:') %]</div>
       <div class="col-md-2">{{patron().credit_forward_balance() | currency}}</div>
     </div>
     <div class="row">
       <div class="col-md-4">[% l('Total Paid/Credited:') %]</div>
-      <div class="col-md-2">{{summary.total_paid() | currency}}</div>
+      <div class="col-md-2">{{(summary.total_paid() || 0) | currency}}</div>
       <div class="col-md-4">[% l('Session Voided:') %]</div>
       <div class="col-md-2">{{session_voided | currency}}</div>
     </div>