|
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 469-482
Link Here
|
| 469 |
$(this).toggleClass('filtered'); |
507 |
$(this).toggleClass('filtered'); |
| 470 |
}); |
508 |
}); |
| 471 |
|
509 |
|
| 472 |
$(".void-action").on("click",function(e){ |
|
|
| 473 |
if( confirm( _("Are you sure you want to void this credit?") ) ) { |
| 474 |
return true; |
| 475 |
} else { |
| 476 |
e.preventDefault(); |
| 477 |
} |
| 478 |
}); |
| 479 |
|
| 480 |
$("#issuePayoutModal").on("shown.bs.modal", function(e){ |
510 |
$("#issuePayoutModal").on("shown.bs.modal", function(e){ |
| 481 |
var button = $(e.relatedTarget); |
511 |
var button = $(e.relatedTarget); |
| 482 |
var accountline = button.data('accountline'); |
512 |
var accountline = button.data('accountline'); |
|
Lines 519-524
Link Here
|
| 519 |
$("#discount").focus(); |
549 |
$("#discount").focus(); |
| 520 |
}); |
550 |
}); |
| 521 |
|
551 |
|
|
|
552 |
$("#voidPaymentModal").on("shown.bs.modal", function(e){ |
| 553 |
var button = $(e.relatedTarget); |
| 554 |
var item = button.data('item'); |
| 555 |
$("#item + span").replaceWith(item); |
| 556 |
var accountline = button.data('accountline'); |
| 557 |
$('#voidline').val(accountline); |
| 558 |
}); |
| 559 |
|
| 522 |
$(".receipt-email-action").on("click", function(e){ |
560 |
$(".receipt-email-action").on("click", function(e){ |
| 523 |
e.preventDefault(); |
561 |
e.preventDefault(); |
| 524 |
return $(this).siblings('form').submit(); |
562 |
return $(this).siblings('form').submit(); |