diff --git a/C4/Circulation.pm b/C4/Circulation.pm index c18009903a..046245deb6 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -1951,15 +1951,15 @@ sub AddIssue { # Log the checkout if ( C4::Context->preference('IssueLog') ) { my $info = to_json( - { - issue => $issue->issue_id, - branchcode => $issue->branchcode, - itemnumber => $item_object->itemnumber, + { + issue => $issue->issue_id, + branchcode => $issue->branchcode, + itemnumber => $item_object->itemnumber, confirmations => $confirmations || [], forced => $forced || [] - }, - { pretty => 1, canonical => 1 } - ); + }, + { pretty => 1, canonical => 1 } + ); logaction( "CIRCULATION", "ISSUE", $patron->borrowernumber, diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt index eed9af8caf..2036c6001b 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt @@ -424,7 +424,7 @@ [% IF ( canrenew ) %] Renew [% END %] diff --git a/members/memberentry.pl b/members/memberentry.pl index 0bdddb6ab2..14852dd932 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -166,7 +166,7 @@ foreach (@field_check) { $template->param( "quickadd" => 1 ) if ($quickadd); $template->param( "duplicate" => 1 ) if ( $op eq 'duplicate' ); $template->param( "checked" => 1 ) if ( defined($nodouble) && $nodouble eq 1 ); - my $logged_in_user = Koha::Patrons->find($loggedinuser); +my $logged_in_user = Koha::Patrons->find($loggedinuser); if ( $op eq 'edit_form' or $op eq 'cud-save' or $op eq 'duplicate' ) { output_and_exit_if_error( $input, $cookie, $template, @@ -180,10 +180,10 @@ if ( $op eq 'edit_form' or $op eq 'cud-save' or $op eq 'duplicate' ) { $borrower_data = $patron->unblessed; } - if ( $logged_in_user->is_superlibrarian ) { - $CanUpdatePasswordExpiration = 1; - $CanUpdateProtectPatron = 1; - } +if ( $logged_in_user->is_superlibrarian ) { + $CanUpdatePasswordExpiration = 1; + $CanUpdateProtectPatron = 1; +} my $categorycode = $input->param('categorycode') || $borrower_data->{'categorycode'}; my $category = Koha::Patron::Categories->find($categorycode); diff --git a/pos/register.pl b/pos/register.pl index 7261de9f26..5f339cc60d 100755 --- a/pos/register.pl +++ b/pos/register.pl @@ -132,39 +132,39 @@ if ( !$registers->count ) { if ( $refund_type eq 'AC' && !$accountline->borrowernumber ) { $template->param( error_refund_anonymous_ac => 1 ); } else { - $schema->txn_do( - sub { + $schema->txn_do( + sub { - my $refund = $accountline->reduce( - { - reduction_type => 'REFUND', - branch => $library_id, - staff_id => $logged_in_user->id, - interface => 'intranet', - amount => $amount - } - ); - - # Only create a payout if refund_type is not 'AC' (Account Credit) - # When 'AC' is selected, the refund stays as credit on the patron's account - unless ( $refund_type eq 'AC' ) { - my $payout = $refund->payout( + my $refund = $accountline->reduce( { - payout_type => $refund_type, - branch => $library_id, - staff_id => $logged_in_user->id, - cash_register => $cash_register->id, - interface => 'intranet', - amount => $amount + reduction_type => 'REFUND', + branch => $library_id, + staff_id => $logged_in_user->id, + interface => 'intranet', + amount => $amount } ); - } - } - ); - # Redirect to prevent duplicate submissions (POST/REDIRECT/GET pattern) - print $input->redirect( "/cgi-bin/koha/pos/register.pl?registerid=" . $registerid ); - exit; + # Only create a payout if refund_type is not 'AC' (Account Credit) + # When 'AC' is selected, the refund stays as credit on the patron's account + unless ( $refund_type eq 'AC' ) { + my $payout = $refund->payout( + { + payout_type => $refund_type, + branch => $library_id, + staff_id => $logged_in_user->id, + cash_register => $cash_register->id, + interface => 'intranet', + amount => $amount + } + ); + } + } + ); + + # Redirect to prevent duplicate submissions (POST/REDIRECT/GET pattern) + print $input->redirect( "/cgi-bin/koha/pos/register.pl?registerid=" . $registerid ); + exit; } } else { $template->param( error_refund_permission => 1 ); diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index 0a796de47e..92d00813df 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -7855,7 +7855,7 @@ subtest 'Bug 9762: AddIssue override JSON logging' => sub { { order_by => { -desc => 'timestamp' } } ); is( $logs->count, 1, 'One log entry created for normal checkout' ); - my $log = $logs->next; + my $log = $logs->next; my $log_data = eval { from_json( $log->info ) }; ok( !$@, 'Normal checkout log info is valid JSON' ); is( $log_data->{itemnumber}, $item->itemnumber, 'JSON contains correct itemnumber' ); diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t index 0c5dbdfe2b..4d487e1eb7 100755 --- a/t/db_dependent/Reserves.t +++ b/t/db_dependent/Reserves.t @@ -2124,7 +2124,7 @@ subtest 'Bug 40866: AddReserve override JSON logging' => sub { { order_by => { -desc => 'timestamp' } } ); is( $logs->count, 1, 'One log entry created for normal hold' ); - my $log = $logs->next; + my $log = $logs->next; my $log_data = eval { from_json( $log->info ) }; ok( !$@, 'Normal hold log info is valid JSON' ); is( $log_data->{hold}, $hold_id, 'JSON contains correct hold ID' );