Bug 34478: Manual fix - change action to op and fix transport type - pos/pay

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2024-01-31 09:01:48 -05:00 committed by Jonathan Druart
parent 1858268384
commit 00a0842797
Signed by: jonathan.druart
GPG key ID: A085E712BEF0E0F0
2 changed files with 7 additions and 6 deletions

View file

@ -186,7 +186,8 @@
<!-- Email receipt modal -->
<div class="modal" id="emailReceiptModal" tabindex="-1" role="dialog" aria-labelledby="emailReceiptLabel">
<form id="email_form" action="/cgi-bin/koha/pos/pay.pl" method="get" enctype="multipart/form-data" class="validated">
<form id="email_form" action="/cgi-bin/koha/pos/pay.pl" method="post" enctype="multipart/form-data" class="validated">
[% INCLUDE 'csrf-token.inc' %]
<input type="hidden" name="payment_id" value="[% payment_id | uri %]">
<input type="hidden" name="collected" value="[% collected | uri %]">
<input type="hidden" name="change" value="[% change | uri %]">"
@ -208,7 +209,7 @@
</fieldset> <!-- /.rows -->
</div> <!-- /.modal-body -->
<div class="modal-footer">
<input type="hidden" name="action" value="send">
<input type="hidden" name="op" value="cud-send">
<button type="submit" class="btn btn-default">Confirm</button>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
</div> <!-- /.modal-footer -->

View file

@ -50,7 +50,7 @@ my $logged_in_user = Koha::Patrons->find($loggedinuser) or die "Not logged in";
my $library_id = C4::Context->userenv->{'branch'};
my $registerid = $input->param('registerid');
my $action = $input->param('action') || '';
my $op = $input->param('op') || '';
my $invoice_types =
Koha::Account::DebitTypes->search_with_library_limits(
@ -84,7 +84,7 @@ if ( $total_paid and $total_paid ne '0.00' ) {
);
}
if ( $action eq 'cud-send' ) {
if ( $op eq 'cud-send' ) {
my $payment_id = $input->param('payment_id');
my $change = $input->param('change');
my $collected = $input->param('collected');
@ -95,7 +95,7 @@ if ( $action eq 'cud-send' ) {
module => 'pos',
letter_code => 'RECEIPT',
branchcode => C4::Context->userenv->{'branch'},
message_transport_type => 'cud-email',
message_transport_type => 'email',
tables => {
credits => $payment_id,
},
@ -109,7 +109,7 @@ if ( $action eq 'cud-send' ) {
my $message_id = EnqueueLetter(
{
letter => $letter,
message_transport_type => 'cud-email',
message_transport_type => 'email',
from_address => C4::Context->preference('KohaAdminEmailAddress'),
to_address => $toaddr,
}