From 7a98975d6c573b1285cd829d4b2221dde1ebd32a Mon Sep 17 00:00:00 2001 From: Andrew Isherwood Date: Mon, 5 Oct 2020 12:37:01 +0100 Subject: [PATCH] Bug 24083: (follow-up) Include SelfCheckInModule As highlighted by Katrin, the selfcheckin module was not aware of this work. This commits gives it awareness of the too_unseen renew error and the "seen" argument that can be passed to AddRenewal --- koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 4 ++++ opac/sco/sco-main.pl | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt index 5f503d1006..f2115e9f7a 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt @@ -133,6 +133,7 @@ + @@ -142,6 +143,7 @@ + @@ -341,6 +343,8 @@ This item has been scheduled for automatic renewal and cannot be renewed [% ELSIF ISSUE.renew_error == 'onsite_checkout' %] This is a on-site checkout, it cannot be renewed. + [% ELSIF ISSUE.renew_error == 'too_unseen' %] + You have renewed this item the maximum number of consecutive times without it being seen by the library. [% ELSE %] No renewals allowed [% END %] diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index 111e3a2562..37212f0429 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -99,13 +99,14 @@ if (defined C4::Context->preference('SCOAllowCheckin')) { } my $issuerid = $loggedinuser; -my ($op, $patronid, $patronlogin, $patronpw, $barcode, $confirmed, $newissues) = ( +my ($op, $patronid, $patronlogin, $patronpw, $barcode, $confirmed, $seen, $newissues) = ( $query->param("op") || '', $query->param("patronid") || '', $query->param("patronlogin")|| '', $query->param("patronpw") || '', $query->param("barcode") || '', $query->param("confirmed") || '', + $query->param("seen") || 0, $query->param("newissues") || '', ); @@ -268,7 +269,7 @@ if ( $patron && ( $op eq 'renew' ) ) { my ($status,$renewerror) = CanBookBeRenewed( $borrower->{borrowernumber}, $item->itemnumber ); if ($status) { #warn "renewing"; - AddRenewal( $borrower->{borrowernumber}, $item->itemnumber ); + AddRenewal( $borrower->{borrowernumber}, $item->itemnumber, undef, undef, undef, undef, $seen ); push @newissueslist, $barcode; $template->param( renewed => 1 ); } -- 2.20.1