From be518910bc7d796c1bddf64962f12e343e1311a5 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 15 Mar 2024 11:37:54 +0000 Subject: [PATCH] Bug 35944: (QA follow-up) Tidy Signed-off-by: Katrin Fischer (cherry picked from commit bf4b39cb3b4a4142e5d9cae4fc59677280df8c8a) Signed-off-by: Fridolin Somers --- C4/Circulation.pm | 2 +- C4/SIP/ILS/Transaction/Renew.pm | 12 ++++++------ t/db_dependent/Circulation.t | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9e6a64817d..6df7ff8341 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -3121,7 +3121,7 @@ sub CanBookBeRenewed { } # CHECK FOR BOOKINGS - if( $item->bookings->count ){ + if ( $item->bookings->count ) { my $startdate = ( C4::Context->preference('RenewalPeriodBase') eq 'date_due' ) ? dt_from_string( $issue->date_due, 'sql' ) diff --git a/C4/SIP/ILS/Transaction/Renew.pm b/C4/SIP/ILS/Transaction/Renew.pm index 2f6dc61b31..939f4abd11 100644 --- a/C4/SIP/ILS/Transaction/Renew.pm +++ b/C4/SIP/ILS/Transaction/Renew.pm @@ -51,12 +51,12 @@ sub do_renew_for { $self->{due} = $self->duedatefromissue($issue, $self->{item}->{itemnumber}); $self->renewal_ok(1); } else { - $renewerror=~s/on_reserve/Item unavailable due to outstanding holds/; - $renewerror=~s/booked/Item is booked for another borrower/; - $renewerror=~s/too_many/Item has reached maximum renewals/; - $renewerror=~s/too_unseen/Item has reached maximum consecutive renewals without being seen/; - $renewerror=~s/item_denied_renewal/Item renewal is not allowed/; - $renewerror=~s/item_issued_to_other_patron/Item already issued to other borrower/; + $renewerror =~ s/on_reserve/Item unavailable due to outstanding holds/; + $renewerror =~ s/booked/Item is booked for another borrower/; + $renewerror =~ s/too_many/Item has reached maximum renewals/; + $renewerror =~ s/too_unseen/Item has reached maximum consecutive renewals without being seen/; + $renewerror =~ s/item_denied_renewal/Item renewal is not allowed/; + $renewerror =~ s/item_issued_to_other_patron/Item already issued to other borrower/; $self->screen_msg($renewerror); $self->renewal_ok(0); } diff --git a/t/db_dependent/Circulation.t b/t/db_dependent/Circulation.t index d158135095..f35af9d754 100755 --- a/t/db_dependent/Circulation.t +++ b/t/db_dependent/Circulation.t @@ -1739,7 +1739,7 @@ subtest "CanBookBeRenewed | bookings" => sub { my $schema = Koha::Database->schema; $schema->storage->txn_begin; - t::lib::Mocks::mock_preference('RenewalPeriodBase', 'date_due'); + t::lib::Mocks::mock_preference( 'RenewalPeriodBase', 'date_due' ); my $renewing_patron = $builder->build_object( { class => 'Koha::Patrons' } ); my $booked_patron = $builder->build_object( { class => 'Koha::Patrons' } ); @@ -1763,7 +1763,7 @@ subtest "CanBookBeRenewed | bookings" => sub { # Proposed renewal would encroach on booking my ( $renewok, $error ) = CanBookBeRenewed( $renewing_patron, $issue, 0 ); - is( $renewok, 0, "Renewal not allowed as it would mean the item was not returned before the next booking" ); + is( $renewok, 0, "Renewal not allowed as it would mean the item was not returned before the next booking" ); is( $error, 'booked', "Error is 'booked'" ); $schema->storage->txn_rollback; -- 2.39.5