|
Lines 176-191
Link Here
|
| 176 |
</form> |
176 |
</form> |
| 177 |
[% END %] |
177 |
[% END %] |
| 178 |
[% IF account.is_credit && account.status != 'VOID' %] |
178 |
[% IF account.is_credit && account.status != 'VOID' %] |
| 179 |
<form method="post" action="/cgi-bin/koha/members/boraccount.pl"> |
179 |
<button type="button" data-toggle="modal" data-target="#voidPaymentModal" data-account="[%- PROCESS account_type_description account=account -%]" data-accountline="[% account.accountlines_id | html %]" data-amount="[% account.amount | $Price on_editing => 1 %]" class="btn btn-default btn-xs void-action"><i class="fa-solid fa-ban"></i> Void payment</button> |
| 180 |
[% INCLUDE 'csrf-token.inc' %] |
|
|
| 181 |
<input type="hidden" name="op" value="cud-void" /> |
| 182 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"> |
| 183 |
<input type="hidden" name="accountlines_id" value="[% account.accountlines_id | html %]"> |
| 184 |
<button type="submit" class="btn btn-default btn-xs void-action"> |
| 185 |
<i class="fa fa-ban"></i> |
| 186 |
Void payment |
| 187 |
</button> |
| 188 |
</form> |
| 189 |
[% END %] |
180 |
[% END %] |
| 190 |
[% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %] |
181 |
[% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %] |
| 191 |
<form method="post" action="/cgi-bin/koha/members/cancel-charge.pl"> |
182 |
<form method="post" action="/cgi-bin/koha/members/cancel-charge.pl"> |
|
Lines 245-250
Link Here
|
| 245 |
[% INCLUDE 'modals/issue_payout.inc' %] |
236 |
[% INCLUDE 'modals/issue_payout.inc' %] |
| 246 |
[% INCLUDE 'modals/issue_refund.inc' %] |
237 |
[% INCLUDE 'modals/issue_refund.inc' %] |
| 247 |
[% INCLUDE 'modals/issue_refund.inc' %] |
238 |
[% INCLUDE 'modals/issue_refund.inc' %] |
|
|
239 |
[% INCLUDE 'modals/void_payment.inc' %] |
| 248 |
|
240 |
|
| 249 |
[% MACRO jsinclude BLOCK %] |
241 |
[% MACRO jsinclude BLOCK %] |
| 250 |
[% INCLUDE 'datatables.inc' %] |
242 |
[% INCLUDE 'datatables.inc' %] |
|
Lines 280-293
Link Here
|
| 280 |
$(this).toggleClass('filtered'); |
272 |
$(this).toggleClass('filtered'); |
| 281 |
}); |
273 |
}); |
| 282 |
|
274 |
|
| 283 |
$(".void-action").on("click",function(e){ |
|
|
| 284 |
if( confirm( _("Are you sure you want to void this credit?") ) ) { |
| 285 |
return true; |
| 286 |
} else { |
| 287 |
e.preventDefault(); |
| 288 |
} |
| 289 |
}); |
| 290 |
|
| 291 |
$("#issuePayoutModal").on("shown.bs.modal", function(e){ |
275 |
$("#issuePayoutModal").on("shown.bs.modal", function(e){ |
| 292 |
var button = $(e.relatedTarget); |
276 |
var button = $(e.relatedTarget); |
| 293 |
var accountline = button.data('accountline'); |
277 |
var accountline = button.data('accountline'); |
|
Lines 330-335
Link Here
|
| 330 |
$("#discount").focus(); |
314 |
$("#discount").focus(); |
| 331 |
}); |
315 |
}); |
| 332 |
|
316 |
|
|
|
317 |
$("#voidPaymentModal").on("shown.bs.modal", function(e){ |
| 318 |
var button = $(e.relatedTarget); |
| 319 |
var accountline = button.data('accountline'); |
| 320 |
$('#voidline').val(accountline); |
| 321 |
var amount = button.data('amount'); |
| 322 |
$('#void_amount').text(amount); |
| 323 |
}); |
| 324 |
|
| 333 |
$(".receipt-email-action").on("click", function(e){ |
325 |
$(".receipt-email-action").on("click", function(e){ |
| 334 |
e.preventDefault(); |
326 |
e.preventDefault(); |
| 335 |
return $(this).siblings('form').submit(); |
327 |
return $(this).siblings('form').submit(); |