From f0fa5ee05f40787fdc9bd5319202047f6656e8f0 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 --- 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 5b90cf0eccd..0947b513470 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 2f6dc61b31a..939f4abd114 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 d1581350957..f35af9d754e 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.30.2