@@ -, +, @@ circulation rules interface --- C4/Circulation.pm | 1 - .../prog/en/modules/circ/renew.tt | 5 +-- t/db_dependent/Circulation.t | 32 +------------------ 3 files changed, 2 insertions(+), 36 deletions(-) --- a/C4/Circulation.pm +++ a/C4/Circulation.pm @@ -2671,7 +2671,6 @@ sub CanBookBeRenewed { my $item = Koha::Items->find($itemnumber) or return ( 0, 'no_item' ); my $issue = $item->checkout or return ( 0, 'no_checkout' ); - return ( 0, 'onsite_checkout' ) if $issue->is_onsite_checkout; return ( 0, 'item_denied_renewal') if _item_denied_renewal({ item => $item }); my $patron = $issue->patron or return; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/renew.tt @@ -30,7 +30,7 @@ [% IF error %]
-

Cannot renew:

+

Cannot renew[% IF issue.onsite_checkout %] on-site checkout[% END %]:

[% IF error == "no_item" %] @@ -134,9 +134,6 @@

Item is not allowed renewal.

- [% ELSIF error == "onsite_checkout" %] -

Item cannot be renewed because it's an onsite checkout

- [% ELSE %] [% error | html %] --- a/t/db_dependent/Circulation.t +++ a/t/db_dependent/Circulation.t @@ -18,7 +18,7 @@ use Modern::Perl; use utf8; -use Test::More tests => 47; +use Test::More tests => 45; use Test::MockModule; use Test::Deep qw( cmp_deeply ); @@ -1536,36 +1536,6 @@ subtest "AllowRenewalIfOtherItemsAvailable tests" => sub { is( $renewokay, 0, 'Bug 14337 - Verify the borrower can not renew with a hold on the record if AllowRenewalIfOtherItemsAvailable is enabled but the only available item is notforloan' ); }; -{ - # Don't allow renewing onsite checkout - my $branch = $library->{branchcode}; - - #Create another record - my $biblio = $builder->build_sample_biblio(); - - my $item = $builder->build_sample_item( - { - biblionumber => $biblio->biblionumber, - library => $branch, - itype => $itemtype, - } - ); - - my $borrowernumber = Koha::Patron->new({ - firstname => 'fn', - surname => 'dn', - categorycode => $patron_category->{categorycode}, - branchcode => $branch, - })->store->borrowernumber; - - my $borrower = Koha::Patrons->find( $borrowernumber )->unblessed; - - my $issue = AddIssue( $borrower, $item->barcode, undef, undef, undef, undef, { onsite_checkout => 1 } ); - my ( $renewed, $error ) = CanBookBeRenewed( $borrowernumber, $item->itemnumber ); - is( $renewed, 0, 'CanBookBeRenewed should not allow to renew on-site checkout' ); - is( $error, 'onsite_checkout', 'A correct error code should be returned by CanBookBeRenewed for on-site checkout' ); -} - { my $library = $builder->build({ source => 'Branch' }); --