|
Lines 178-192
Link Here
|
| 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> |
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 |
[% END %] |
179 |
[% END %] |
| 180 |
[% 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') %] |
| 181 |
<form method="post" action="/cgi-bin/koha/members/cancel-charge.pl"> |
181 |
<button type="button" data-toggle="modal" data-target="#cancelChargeModal" data-accountlines_id="[% account.accountlines_id | html %]" data-borrowernumber="[% patron.borrowernumber | html %]" class="btn btn-default btn-xs void-action"><i class="fa fa-ban"></i> Cancel charge</button> |
| 182 |
[% INCLUDE 'csrf-token.inc' %] |
|
|
| 183 |
<input type="hidden" name="op" value="cud-cancel"> |
| 184 |
<input type="hidden" name="accountlines_id" value="[% account.accountlines_id | html %]"> |
| 185 |
<button type="submit" class="btn btn-default btn-xs cancel-action"> |
| 186 |
<i class="fa fa-ban"></i> |
| 187 |
Cancel charge |
| 188 |
</button> |
| 189 |
</form> |
| 190 |
[% END %] |
182 |
[% END %] |
| 191 |
[% IF CAN_user_updatecharges_payout && account.is_credit && ( account.amountoutstanding < 0 ) %] |
183 |
[% IF CAN_user_updatecharges_payout && account.is_credit && ( account.amountoutstanding < 0 ) %] |
| 192 |
<button type="button" data-bs-toggle="modal" data-bs-target="#issuePayoutModal" data-account="[%- PROCESS account_type_description account=account -%]" data-accountline="[% account.accountlines_id | html %]" data-amount="[% account.amountoutstanding | $Price on_editing => 1 %]" class="btn btn-default btn-xs payout-action"><i class="fa-solid fa-money-bill-1"></i> Issue payout</button> |
184 |
<button type="button" data-bs-toggle="modal" data-bs-target="#issuePayoutModal" data-account="[%- PROCESS account_type_description account=account -%]" data-accountline="[% account.accountlines_id | html %]" data-amount="[% account.amountoutstanding | $Price on_editing => 1 %]" class="btn btn-default btn-xs payout-action"><i class="fa-solid fa-money-bill-1"></i> Issue payout</button> |
|
Lines 424-429
Link Here
|
| 424 |
</form> <!-- /#void_form --> |
416 |
</form> <!-- /#void_form --> |
| 425 |
</div> <!-- /#voidPaymentModal --> |
417 |
</div> <!-- /#voidPaymentModal --> |
| 426 |
|
418 |
|
|
|
419 |
<!-- Cancel charge modal --> |
| 420 |
<div class="modal" id="cancelChargeModal" tabindex="-1" role="dialog" aria-labelledby="cancelChangreLabel"> |
| 421 |
<form method="post" action="/cgi-bin/koha/members/cancel-charge.pl"> |
| 422 |
[% INCLUDE 'csrf-token.inc' %] |
| 423 |
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]"> |
| 424 |
<input type="hidden" name="accountlines_id" id="accountlines_id" value=""> |
| 425 |
<div class="modal-dialog" role="document"> |
| 426 |
<div class="modal-content"> |
| 427 |
<div class="modal-header"> |
| 428 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
| 429 |
<h4 class="modal-title" id="cancelChargeLabel">Cancel charge</h4> |
| 430 |
</div> |
| 431 |
<div class="modal-body"> |
| 432 |
<fieldset class="rows"> |
| 433 |
<ol> |
| 434 |
<li> |
| 435 |
<label for="cancel_charge_note">Note: </label> |
| 436 |
<input type="text" id="cnacel_charge_note" name="cancel_charge_note"> |
| 437 |
</li> |
| 438 |
</ol> |
| 439 |
</fieldset> <!-- /.rows --> |
| 440 |
</div> <!-- /.modal-body --> |
| 441 |
<div class="modal-footer"> |
| 442 |
<button type="submit" class="btn btn-default">Confirm</button> |
| 443 |
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button> |
| 444 |
</div> <!-- /.modal-footer --> |
| 445 |
</div> <!-- /.modal-content --> |
| 446 |
</div> <!-- /.modal-dialog --> |
| 447 |
</form> <!-- /#cancel_charge_form --> |
| 448 |
</div> <!-- /#voidPaymentModal --> |
| 449 |
|
| 427 |
|
450 |
|
| 428 |
[% MACRO jsinclude BLOCK %] |
451 |
[% MACRO jsinclude BLOCK %] |
| 429 |
[% INCLUDE 'datatables.inc' %] |
452 |
[% INCLUDE 'datatables.inc' %] |
|
Lines 509-514
Link Here
|
| 509 |
$('#voidline').val(accountline); |
532 |
$('#voidline').val(accountline); |
| 510 |
}); |
533 |
}); |
| 511 |
|
534 |
|
|
|
535 |
$("#cancelChargeModal").on("shown.bs.modal", function(e){ |
| 536 |
var button = $(e.relatedTarget); |
| 537 |
var item = button.data('accountlines_id'); |
| 538 |
$('#accountlines_id').val(item); |
| 539 |
}); |
| 540 |
|
| 512 |
$(".receipt-email-action").on("click", function(e){ |
541 |
$(".receipt-email-action").on("click", function(e){ |
| 513 |
e.preventDefault(); |
542 |
e.preventDefault(); |
| 514 |
return $(this).siblings('form').submit(); |
543 |
return $(this).siblings('form').submit(); |