From 0b61c8e5d05dcdb3acd4b6772b7fc51e66653a0a Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Tue, 28 Mar 2017 14:21:29 -0400 Subject: [PATCH] Bug 18251: (QA follow-up) Add 'renew' operation and check renewal vs checkout Signed-off-by: Jonathan Druart Signed-off-by: Josef Moravec Signed-off-by: Nick Clemens --- koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 6 +++--- opac/sco/sco-main.pl | 4 ++-- 2 files changed, 5 insertions(+), 5 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 14f543add4..317a8d3683 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 @@ -121,7 +121,7 @@ [% UNLESS ( renew ) %]
- + @@ -130,7 +130,7 @@
[% ELSE %]
- + @@ -296,7 +296,7 @@ [% IF ISSUE.can_be_renewed %] - + [% UNLESS ( ISSUE.renew ) %] diff --git a/opac/sco/sco-main.pl b/opac/sco/sco-main.pl index bbe0e9086a..dcb4c9278b 100755 --- a/opac/sco/sco-main.pl +++ b/opac/sco/sco-main.pl @@ -131,7 +131,7 @@ elsif ( $op eq "returnbook" && $allowselfcheckreturns ) { my ($doreturn) = AddReturn( $barcode, $branch ); $template->param( returned => $doreturn ); } -elsif ( $patron and $op eq "checkout" ) { +elsif ( $patron && ( $op eq 'checkout' || $op eq 'renew' ) ) { my $impossible = {}; my $needconfirm = {}; ( $impossible, $needconfirm ) = CanBookBeIssued( @@ -174,7 +174,7 @@ elsif ( $patron and $op eq "checkout" ) { barcode => $barcode, ); } - } elsif ( $needconfirm->{RENEW_ISSUE} ) { + } elsif ( $needconfirm->{RENEW_ISSUE} || $op eq 'renew' ) { if ($confirmed) { #warn "renewing"; AddRenewal( $borrower->{borrowernumber}, $item->{itemnumber} ); -- 2.39.5