Bug 18805: Add ability to use up account credits
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / pay.tt
index cb49492..6d8c942 100644 (file)
 <tfoot>
 <tr>
     <td class="total" colspan="6">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>
 <tbody>
     <td class="debit" style="text-align: right;">[% line.amountoutstanding | $Price %]</td>
 </tr>
 [% END %]
+[% IF outstanding_credits.total_outstanding < 0 %]
+<tr>
+    <td class="total" colspan="6">Outstanding credits could be applied <input type="submit" id="apply_credits" name="apply_credits"  value="Apply credits" class="submit" /></td>
+    <td class="credit" style="text-align: right;">[% outstanding_credits.total_outstanding | $Price %]</td>
+</tr>
+[% END %]
 [% IF ( account_grp.total ) %]
 <tr>