</tr>
</thead>
<tbody id='myopac_trans_tbody'>
- [% c = 0; %]
+ [% c = 0; neg_or_zero = 0; %]
[% FOR f IN ctx.fines.grocery %]
<tr class ='myopac_trans_row'>
[% c = c + 1; %]
[% money(f.xact.balance_owed) %]
</strong>
<input type="hidden" class="fineAmount" value="[% f.xact.balance_owed %]" hidden />
+ [% IF f.xact.balance_owed <= 0; neg_or_zero = neg_or_zero + 1; END %]
</td>
<td>
[% UNLESS ctx.fines.grocery.size OR ctx.fines.circulation.size %]
<div>[% l('You have no current fines.') %]</div>
[% ELSIF myopac_cc_allowed %]
-
- <div class="my-3">
- <button type="submit" value="[% l('Pay selected charges') %] - [% money(ctx.user_stats.fines.balance_owed) %]" title="[% l('Pay selected charges') %]" class="btn btn-confirm my-1"
- id="selectPay"> <i class='fas fa-money-bill-wave' aria-hidden="true"></i> [% l('Pay Selected Charges') %] - [% money(ctx.user_stats.fines.balance_owed) %]</button>
- <button type="submit" class="btn btn-confirm my-1"><i class="fas fa-cash-register" aria-hidden="true"></i> [% l('Pay All Charges') %] - [% money(ctx.user_stats.fines.balance_owed) %]</button>
- </div>
+ [% IF neg_or_zero > 0 %]
+ <div class="my-3">[% l('There are negative bills on your account that must be resolved before you are able to make a payment. Please contact your library for assistance.') %]
+ [% ELSE %]
+ <div class="my-3">
+ <button type="submit" value="[% l('Pay selected charges') %] - [% money(ctx.user_stats.fines.balance_owed) %]" title="[% l('Pay selected charges') %]" class="btn btn-confirm my-1"
+ id="selectPay"> <i class='fas fa-money-bill-wave' aria-hidden="true"></i> [% l('Pay Selected Charges') %] - [% money(ctx.user_stats.fines.balance_owed) %]</button>
+ <button type="submit" class="btn btn-confirm my-1"><i class="fas fa-cash-register" aria-hidden="true"></i> [% l('Pay All Charges') %] - [% money(ctx.user_stats.fines.balance_owed) %]</button>
+ </div>
+ [% END %]
[% END %]
[% IF myopac_cc_allowed %]
</form>
</tr>
</thead>
<tbody id='myopac_trans_tbody'>
+ [% neg_or_zero = 0; %]
[% FOR f IN ctx.fines.grocery %]
<tr id='myopac_trans_row'>
<strong>
[% money(f.xact.balance_owed) %]
</strong>
+ [% IF f.xact.balance_owed <= 0; neg_or_zero = neg_or_zero + 1; END %]
</td>
<td>[% f.xact.last_billing_type %]</td>
[% UNLESS ctx.fines.grocery.size OR ctx.fines.circulation.size %]
<div>[% l('You have no current fines.') %]</div>
[% ELSIF myopac_cc_allowed %]
- <div class="text-left pad-top-ten">
- <input type="submit"
- value="[% l('Pay selected charges') %]"
- title="[% l('Pay selected charges') %]"
- class="opac-button" />
- </div>
+ [% IF neg_or_zero > 0 %]
+ <div class="text-left pad-top-ten">[% l('There are negative bills on your account that must be resolved before you are able to make a payment. Please contact your library for assistance.') %]
+ [% ELSE %]
+ <div class="text-left pad-top-ten">
+ <input type="submit"
+ value="[% l('Pay selected charges') %]"
+ title="[% l('Pay selected charges') %]"
+ class="opac-button" />
+ </div>
+ [% END %]
[% END %]
[% IF myopac_cc_allowed %]
</form>