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