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-accountline="[% account.accountlines_id | html %]" data-member="[% account.borrowernumber | html %]" class="btn btn-default btn-xs void-action"><i class="fa 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 402-407
Link Here
|
402 |
</form> <!-- /#discount_form --> |
393 |
</form> <!-- /#discount_form --> |
403 |
</div> <!-- /#applyDiscountModal --> |
394 |
</div> <!-- /#applyDiscountModal --> |
404 |
|
395 |
|
|
|
396 |
<!-- Void payment modal --> |
397 |
<div class="modal" id="voidPaymentModal" tabindex="-1" role="dialog" aria-labelledby="voidPaymentLabel"> |
398 |
<form id="void_form" action="/cgi-bin/koha/members/boraccount.pl" method="post" enctype="multipart/form-data" class="validated"> |
399 |
[% INCLUDE 'csrf-token.inc' %] |
400 |
<input type="hidden" name="accountlines_id" value="" id="voidline"> |
401 |
<input type="hidden" name="op" value="cud-void"> |
402 |
<input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]"> |
403 |
<div class="modal-dialog" role="document"> |
404 |
<div class="modal-content"> |
405 |
<div class="modal-header"> |
406 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
407 |
<h4 class="modal-title" id="voidPaymentLabel">Void payment</h4> |
408 |
</div> |
409 |
<div class="modal-body"> |
410 |
<fieldset class="rows"> |
411 |
<ol> |
412 |
<li> |
413 |
<label for="apply_discount_note">Note: </label> |
414 |
<input type="text" id="void_note" name="void_note"> |
415 |
</li> |
416 |
</ol> |
417 |
</fieldset> <!-- /.rows --> |
418 |
</div> <!-- /.modal-body --> |
419 |
<div class="modal-footer"> |
420 |
<button type="submit" class="btn btn-default">Confirm</button> |
421 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
422 |
</div> <!-- /.modal-footer --> |
423 |
</div> <!-- /.modal-content --> |
424 |
</div> <!-- /.modal-dialog --> |
425 |
</form> <!-- /#void_form --> |
426 |
</div> <!-- /#voidPaymentModal --> |
427 |
|
428 |
|
405 |
[% MACRO jsinclude BLOCK %] |
429 |
[% MACRO jsinclude BLOCK %] |
406 |
[% INCLUDE 'datatables.inc' %] |
430 |
[% INCLUDE 'datatables.inc' %] |
407 |
[% INCLUDE 'format_price.inc' %] |
431 |
[% INCLUDE 'format_price.inc' %] |
Lines 436-449
Link Here
|
436 |
$(this).toggleClass('filtered'); |
460 |
$(this).toggleClass('filtered'); |
437 |
}); |
461 |
}); |
438 |
|
462 |
|
439 |
$(".void-action").on("click",function(e){ |
|
|
440 |
if( confirm( _("Are you sure you want to void this credit?") ) ) { |
441 |
return true; |
442 |
} else { |
443 |
e.preventDefault(); |
444 |
} |
445 |
}); |
446 |
|
447 |
$("#issuePayoutModal").on("shown.bs.modal", function(e){ |
463 |
$("#issuePayoutModal").on("shown.bs.modal", function(e){ |
448 |
var button = $(e.relatedTarget); |
464 |
var button = $(e.relatedTarget); |
449 |
var accountline = button.data('accountline'); |
465 |
var accountline = button.data('accountline'); |
Lines 486-491
Link Here
|
486 |
$("#discount").focus(); |
502 |
$("#discount").focus(); |
487 |
}); |
503 |
}); |
488 |
|
504 |
|
|
|
505 |
$("#voidPaymentModal").on("shown.bs.modal", function(e){ |
506 |
var button = $(e.relatedTarget); |
507 |
var item = button.data('item'); |
508 |
$("#item + span").replaceWith(item); |
509 |
var accountline = button.data('accountline'); |
510 |
$('#voidline').val(accountline); |
511 |
}); |
512 |
|
489 |
$(".receipt-email-action").on("click", function(e){ |
513 |
$(".receipt-email-action").on("click", function(e){ |
490 |
e.preventDefault(); |
514 |
e.preventDefault(); |
491 |
return $(this).siblings('form').submit(); |
515 |
return $(this).siblings('form').submit(); |