Lines 175-190
Link Here
|
175 |
</form> |
175 |
</form> |
176 |
[% END %] |
176 |
[% END %] |
177 |
[% IF account.is_credit && account.status != 'VOID' %] |
177 |
[% IF account.is_credit && account.status != 'VOID' %] |
178 |
<form method="post" action="/cgi-bin/koha/members/boraccount.pl"> |
178 |
<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> |
179 |
[% INCLUDE 'csrf-token.inc' %] |
|
|
180 |
<input type="hidden" name="op" value="cud-void" /> |
181 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"> |
182 |
<input type="hidden" name="accountlines_id" value="[% account.accountlines_id | html %]"> |
183 |
<button type="submit" class="btn btn-default btn-xs void-action"> |
184 |
<i class="fa fa-ban"></i> |
185 |
Void payment |
186 |
</button> |
187 |
</form> |
188 |
[% END %] |
179 |
[% END %] |
189 |
[% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %] |
180 |
[% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %] |
190 |
<form method="post" action="/cgi-bin/koha/members/cancel-charge.pl"> |
181 |
<form method="post" action="/cgi-bin/koha/members/cancel-charge.pl"> |
Lines 398-403
Link Here
|
398 |
</form> <!-- /#discount_form --> |
389 |
</form> <!-- /#discount_form --> |
399 |
</div> <!-- /#applyDiscountModal --> |
390 |
</div> <!-- /#applyDiscountModal --> |
400 |
|
391 |
|
|
|
392 |
<!-- Void payment modal --> |
393 |
<div class="modal" id="voidPaymentModal" tabindex="-1" role="dialog" aria-labelledby="voidPaymentLabel"> |
394 |
<form id="void_form" action="/cgi-bin/koha/members/boraccount.pl" method="post" enctype="multipart/form-data" class="validated"> |
395 |
[% INCLUDE 'csrf-token.inc' %] |
396 |
<input type="hidden" name="accountlines_id" value="" id="voidline"> |
397 |
<input type="hidden" name="op" value="cud-void"> |
398 |
<input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]"> |
399 |
<div class="modal-dialog" role="document"> |
400 |
<div class="modal-content"> |
401 |
<div class="modal-header"> |
402 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
403 |
<h4 class="modal-title" id="voidPaymentLabel">Void payment</h4> |
404 |
</div> |
405 |
<div class="modal-body"> |
406 |
<fieldset class="rows"> |
407 |
<ol> |
408 |
<li> |
409 |
<label for="apply_discount_note">Note: </label> |
410 |
<input type="text" id="void_note" name="void_note"> |
411 |
</li> |
412 |
</ol> |
413 |
</fieldset> <!-- /.rows --> |
414 |
</div> <!-- /.modal-body --> |
415 |
<div class="modal-footer"> |
416 |
<button type="submit" class="btn btn-default">Confirm</button> |
417 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
418 |
</div> <!-- /.modal-footer --> |
419 |
</div> <!-- /.modal-content --> |
420 |
</div> <!-- /.modal-dialog --> |
421 |
</form> <!-- /#void_form --> |
422 |
</div> <!-- /#voidPaymentModal --> |
423 |
|
424 |
|
401 |
[% MACRO jsinclude BLOCK %] |
425 |
[% MACRO jsinclude BLOCK %] |
402 |
[% INCLUDE 'datatables.inc' %] |
426 |
[% INCLUDE 'datatables.inc' %] |
403 |
[% INCLUDE 'format_price.inc' %] |
427 |
[% INCLUDE 'format_price.inc' %] |
Lines 432-445
Link Here
|
432 |
$(this).toggleClass('filtered'); |
456 |
$(this).toggleClass('filtered'); |
433 |
}); |
457 |
}); |
434 |
|
458 |
|
435 |
$(".void-action").on("click",function(e){ |
|
|
436 |
if( confirm( _("Are you sure you want to void this credit?") ) ) { |
437 |
return true; |
438 |
} else { |
439 |
e.preventDefault(); |
440 |
} |
441 |
}); |
442 |
|
443 |
$("#issuePayoutModal").on("shown.bs.modal", function(e){ |
459 |
$("#issuePayoutModal").on("shown.bs.modal", function(e){ |
444 |
var button = $(e.relatedTarget); |
460 |
var button = $(e.relatedTarget); |
445 |
var accountline = button.data('accountline'); |
461 |
var accountline = button.data('accountline'); |
Lines 482-487
Link Here
|
482 |
$("#discount").focus(); |
498 |
$("#discount").focus(); |
483 |
}); |
499 |
}); |
484 |
|
500 |
|
|
|
501 |
$("#voidPaymentModal").on("shown.bs.modal", function(e){ |
502 |
var button = $(e.relatedTarget); |
503 |
var item = button.data('item'); |
504 |
$("#item + span").replaceWith(item); |
505 |
var accountline = button.data('accountline'); |
506 |
$('#voidline').val(accountline); |
507 |
}); |
508 |
|
485 |
$(".receipt-email-action").on("click", function(e){ |
509 |
$(".receipt-email-action").on("click", function(e){ |
486 |
e.preventDefault(); |
510 |
e.preventDefault(); |
487 |
return $(this).siblings('form').submit(); |
511 |
return $(this).siblings('form').submit(); |