Lines 182-197
Link Here
|
182 |
</form> |
182 |
</form> |
183 |
[% END %] |
183 |
[% END %] |
184 |
[% IF account.is_credit && account.status != 'VOID' %] |
184 |
[% IF account.is_credit && account.status != 'VOID' %] |
185 |
<form method="post" action="/cgi-bin/koha/members/boraccount.pl"> |
185 |
<button |
186 |
[% INCLUDE 'csrf-token.inc' %] |
186 |
type="button" |
187 |
<input type="hidden" name="op" value="cud-void" /> |
187 |
data-toggle="modal" |
188 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]" /> |
188 |
data-target="#voidPaymentModal" |
189 |
<input type="hidden" name="accountlines_id" value="[% account.accountlines_id | html %]" /> |
189 |
data-accountline="[% account.accountlines_id | html %]" |
190 |
<button type="submit" class="btn btn-default btn-xs void-action"> |
190 |
data-member="[% account.borrowernumber | html %]" |
191 |
<i class="fa fa-ban"></i> |
191 |
class="btn btn-default btn-xs void-action" |
192 |
Void payment |
192 |
><i class="fa fa-ban"></i> Void payment</button |
193 |
</button> |
193 |
> |
194 |
</form> |
|
|
195 |
[% END %] |
194 |
[% END %] |
196 |
[% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %] |
195 |
[% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %] |
197 |
<form method="post" action="/cgi-bin/koha/members/cancel-charge.pl"> |
196 |
<form method="post" action="/cgi-bin/koha/members/cancel-charge.pl"> |
Lines 435-440
Link Here
|
435 |
</div> |
434 |
</div> |
436 |
<!-- /#applyDiscountModal --> |
435 |
<!-- /#applyDiscountModal --> |
437 |
|
436 |
|
|
|
437 |
<!-- Void payment modal --> |
438 |
<div class="modal" id="voidPaymentModal" tabindex="-1" role="dialog" aria-labelledby="voidPaymentLabel"> |
439 |
<form id="void_form" action="/cgi-bin/koha/members/boraccount.pl" method="post" enctype="multipart/form-data" class="validated"> |
440 |
[% INCLUDE 'csrf-token.inc' %] |
441 |
<input type="hidden" name="accountlines_id" value="" id="voidline" /> |
442 |
<input type="hidden" name="op" value="cud-void" /> |
443 |
<input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]" /> |
444 |
<div class="modal-dialog" role="document"> |
445 |
<div class="modal-content"> |
446 |
<div class="modal-header"> |
447 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
448 |
<h4 class="modal-title" id="voidPaymentLabel">Void payment</h4> |
449 |
</div> |
450 |
<div class="modal-body"> |
451 |
<fieldset class="rows"> |
452 |
<ol> |
453 |
<li> |
454 |
<label for="apply_discount_note">Note: </label> |
455 |
<input type="text" id="void_note" name="void_note" /> |
456 |
</li> |
457 |
</ol> |
458 |
</fieldset> |
459 |
<!-- /.rows --> |
460 |
</div> |
461 |
<!-- /.modal-body --> |
462 |
<div class="modal-footer"> |
463 |
<button type="submit" class="btn btn-default">Confirm</button> |
464 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
465 |
</div> |
466 |
<!-- /.modal-footer --> |
467 |
</div> |
468 |
<!-- /.modal-content --> |
469 |
</div> |
470 |
<!-- /.modal-dialog --> |
471 |
</form> |
472 |
<!-- /#void_form --> |
473 |
</div> |
474 |
<!-- /#voidPaymentModal --> |
475 |
|
438 |
[% MACRO jsinclude BLOCK %] |
476 |
[% MACRO jsinclude BLOCK %] |
439 |
[% INCLUDE 'datatables.inc' %] |
477 |
[% INCLUDE 'datatables.inc' %] |
440 |
[% INCLUDE 'format_price.inc' %] |
478 |
[% INCLUDE 'format_price.inc' %] |
Lines 471-484
Link Here
|
471 |
$(this).toggleClass('filtered'); |
509 |
$(this).toggleClass('filtered'); |
472 |
}); |
510 |
}); |
473 |
|
511 |
|
474 |
$(".void-action").on("click",function(e){ |
|
|
475 |
if( confirm( _("Are you sure you want to void this credit?") ) ) { |
476 |
return true; |
477 |
} else { |
478 |
e.preventDefault(); |
479 |
} |
480 |
}); |
481 |
|
482 |
$("#issuePayoutModal").on("shown.bs.modal", function(e){ |
512 |
$("#issuePayoutModal").on("shown.bs.modal", function(e){ |
483 |
var button = $(e.relatedTarget); |
513 |
var button = $(e.relatedTarget); |
484 |
var accountline = button.data('accountline'); |
514 |
var accountline = button.data('accountline'); |
Lines 520-525
Link Here
|
520 |
$("#discount").attr({ "value": (0).format_price(), "max": amountoutstanding, "min": 0 }); |
550 |
$("#discount").attr({ "value": (0).format_price(), "max": amountoutstanding, "min": 0 }); |
521 |
$("#discount").focus(); |
551 |
$("#discount").focus(); |
522 |
}); |
552 |
}); |
|
|
553 |
|
554 |
$("#voidPaymentModal").on("shown.bs.modal", function(e){ |
555 |
var button = $(e.relatedTarget); |
556 |
var item = button.data('item'); |
557 |
$("#item + span").replaceWith(item); |
558 |
var accountline = button.data('accountline'); |
559 |
$('#voidline').val(accountline); |
560 |
}); |
561 |
|
562 |
$(".receipt-email-action").on("click", function(e){ |
563 |
e.preventDefault(); |
564 |
return $(this).siblings('form').submit(); |
565 |
}); |
523 |
}); |
566 |
}); |
524 |
</script> |
567 |
</script> |
525 |
[% END %] |
568 |
[% END %] |