Bug 34478: Rename action with op - members/boraccount
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
4fd1bc729f
commit
b78641fd2f
|
|
@ -142,7 +142,15 @@
|
|||
<button class="btn btn-xs btn-default dropdown-toggle" data-toggle="dropdown"><i class="fa fa-receipt"></i> Receipt <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu dropdown-menu-right">
|
||||
<li><a target="_blank" href="printfeercpt.pl?accountlines_id=[% account.accountlines_id | uri %]" class="receipt-print-action"><i class="fa fa-print"></i> Print</a></li>
|
||||
<li><a href="boraccount.pl?action=send_receipt&accountlines_id=[% account.accountlines_id | uri %]&borrowernumber=[% account.borrowernumber | uri %]" class="receipt-email-action"><i class="fa fa-envelope"></i> Email</a></li>
|
||||
<li>
|
||||
<form method="post" action="/cgi-bin/koha/members/boraccount.pl">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-send_receipt" />
|
||||
<input type="hidden" name="accountlines_id" value="[% account.accountlines_id | html %]" />
|
||||
<input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]" />
|
||||
</form>
|
||||
<a href="#" class="receipt-email-action"><i class="fa fa-envelope"></i> Email</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
[% ELSE %]
|
||||
|
|
@ -156,7 +164,16 @@
|
|||
<a class="btn btn-default btn-xs pay-action" href="/cgi-bin/koha/members/paycollect.pl?borrowernumber=[% account.borrowernumber | html %]&pay_individual=1&debit_type_code=[% account.debit_type_code | html %]&amount=[% account.amount | html %]&amountoutstanding=[% account.amountoutstanding | html %]&description=[% account.description | html %]&itemnumber=[% account.itemnumber | html %]&accountlines_id=[% account.accountlines_id | html %]&csrf_token=[% csrf_token | html %]"><i class="fa-solid fa-money-bill-1"></i> Pay</a>
|
||||
[% END %]
|
||||
[% IF account.is_credit && account.status != 'VOID' %]
|
||||
<a href="boraccount.pl?action=void&accountlines_id=[% account.accountlines_id | uri %]&borrowernumber=[% account.borrowernumber | uri %]&csrf_token=[% csrf_token | uri %]" class="btn btn-default btn-xs void-action"><i class="fa fa-ban"></i> Void payment</a>
|
||||
<form method="post" action="/cgi-bin/koha/members/boraccount.pl">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="op" value="cud-void" />
|
||||
<input type="hidden" name="borrowernumber" value="[% patron.borrowernumber | html %]">
|
||||
<input type="hidden" name="accountlines_id" value="[% account.accountlines_id | html %]">
|
||||
<button type="submit" class="btn btn-default btn-xs void-action">
|
||||
<i class="fa fa-ban"></i>
|
||||
Void payment
|
||||
</button>
|
||||
</form>
|
||||
[% END %]
|
||||
[% IF account.is_debit && account.amount == account.amountoutstanding && account.status != 'CANCELLED' && !(account.debit_type_code == 'PAYOUT') %]
|
||||
<form method="post" action="/cgi-bin/koha/members/cancel-charge.pl">
|
||||
|
|
@ -218,7 +235,6 @@
|
|||
<form id="payout_form" action="/cgi-bin/koha/members/boraccount.pl" method="post" enctype="multipart/form-data" class="validated">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="accountlines_id" value="" id="payoutline">
|
||||
<input type="hidden" name="action" value="cud-payout">
|
||||
<input type="hidden" name="op" value="cud-payout">
|
||||
<input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]">
|
||||
<div class="modal-dialog" role="document">
|
||||
|
|
@ -274,7 +290,6 @@
|
|||
<form id="refund_form" action="/cgi-bin/koha/members/boraccount.pl" method="post" enctype="multipart/form-data" class="validated">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="accountlines_id" value="" id="refundline">
|
||||
<input type="hidden" name="action" value="cud-refund">
|
||||
<input type="hidden" name="op" value="cud-refund">
|
||||
<input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]">
|
||||
<div class="modal-dialog" role="document">
|
||||
|
|
@ -333,7 +348,6 @@
|
|||
<form id="discount_form" action="/cgi-bin/koha/members/boraccount.pl" method="post" enctype="multipart/form-data" class="validated">
|
||||
[% INCLUDE 'csrf-token.inc' %]
|
||||
<input type="hidden" name="accountlines_id" value="" id="discountline">
|
||||
<input type="hidden" name="action" value="cud-discount">
|
||||
<input type="hidden" name="op" value="cud-discount">
|
||||
<input type="hidden" name="borrowernumber" value="[% account.borrowernumber | html %]">
|
||||
<div class="modal-dialog" role="document">
|
||||
|
|
@ -452,6 +466,11 @@
|
|||
$("#discount").attr({ "max": amount, "min": 0 });
|
||||
$("#discount").focus();
|
||||
});
|
||||
|
||||
$(".receipt-email-action").on("click", function(e){
|
||||
e.preventDefault();
|
||||
return $(this).siblings('form').submit();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ my $schema = Koha::Database->new->schema;
|
|||
my $borrowernumber = $input->param('borrowernumber');
|
||||
my $payment_id = $input->param('payment_id');
|
||||
my $change_given = $input->param('change_given');
|
||||
my $action = $input->param('action') || '';
|
||||
my $op = $input->param('op') || '';
|
||||
my @renew_results = $input->multi_param('renew_result');
|
||||
|
||||
my $logged_in_user = Koha::Patrons->find( $loggedinuser );
|
||||
|
|
@ -69,7 +69,7 @@ output_and_exit_if_error( $input, $cookie, $template, { module => 'members', log
|
|||
|
||||
my $registerid = $input->param('registerid');
|
||||
|
||||
if ( $action eq 'void' ) {
|
||||
if ( $op eq 'cud-void' ) {
|
||||
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
|
||||
my $payment_id = scalar $input->param('accountlines_id');
|
||||
my $payment = Koha::Account::Lines->find( $payment_id );
|
||||
|
|
@ -82,7 +82,7 @@ if ( $action eq 'void' ) {
|
|||
);
|
||||
}
|
||||
|
||||
if ( $action eq 'cud-payout' ) {
|
||||
if ( $op eq 'cud-payout' ) {
|
||||
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
|
||||
my $payment_id = scalar $input->param('accountlines_id');
|
||||
my $payment = Koha::Account::Lines->find($payment_id);
|
||||
|
|
@ -122,7 +122,7 @@ if ( $action eq 'cud-payout' ) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( $action eq 'cud-refund' ) {
|
||||
if ( $op eq 'cud-refund' ) {
|
||||
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
|
||||
my $charge_id = scalar $input->param('accountlines_id');
|
||||
my $charge = Koha::Account::Lines->find($charge_id);
|
||||
|
|
@ -156,7 +156,7 @@ if ( $action eq 'cud-refund' ) {
|
|||
);
|
||||
}
|
||||
|
||||
if ( $action eq 'discount' ) {
|
||||
if ( $op eq 'discount' ) {
|
||||
output_and_exit_if_error($input, $cookie, $template, { check => 'csrf_token' });
|
||||
my $charge_id = scalar $input->param('accountlines_id');
|
||||
my $charge = Koha::Account::Lines->find($charge_id);
|
||||
|
|
@ -178,7 +178,7 @@ if ( $action eq 'discount' ) {
|
|||
}
|
||||
|
||||
my $receipt_sent = 0;
|
||||
if ( $action eq 'send_receipt' ) {
|
||||
if ( $op eq 'cud-send_receipt' ) {
|
||||
my $credit_id = scalar $input->param('accountlines_id');
|
||||
my $credit = Koha::Account::Lines->find($credit_id);
|
||||
my @credit_offsets =
|
||||
|
|
|
|||
Loading…
Reference in New Issue