Fix Rmaint Tidy issues

This commit is contained in:
Baptiste Wojtkowski 2026-09-14 10:39:28 +00:00
parent 671f27eeb1
commit 90a43b0dd1
No known key found for this signature in database
GPG Key ID: 47A8A13E10BC0D40
6 changed files with 43 additions and 43 deletions

View File

@ -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,

View File

@ -424,7 +424,7 @@
[% IF ( canrenew ) %]
<label>
<span class="visually-hidden">Select item to renew</span>
<input type="checkbox" name="issue" value="[% ISSUE.issue_id | uri %]" />
<input type="checkbox" name="issue" value="[% ISSUE.issue_id | uri %]" />
</label>
<a class="submit-form-link" href="#" data-method="post" data-action="/cgi-bin/koha/opac-renew.pl" data-issue="[% ISSUE.issue_id | html %]" data-op="cud-renew">Renew</a>
[% END %]

View File

@ -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);

View File

@ -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 );

View File

@ -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' );

View File

@ -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' );