From 13f3d0cbec193df92a8d502a0381adb1059367ff Mon Sep 17 00:00:00 2001 From: Josef Moravec Date: Wed, 19 Oct 2016 10:55:55 +0000 Subject: [PATCH] Bug 17466: Show number of outstanding issues when checking in MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Test plan: 1) Apply patch 2) Checkout more then one item to a borrower 3) Check one of that items 4) Note, that on in returns table there is a button with number of outstanding issues in patron column. The button should take you to checking out page 5) When the outstanding issues count is 0, there is no button Signed-off-by: Radek Å iman Signed-off-by: Kyle M Hall Signed-off-by: Kyle M Hall --- circ/returns.pl | 2 ++ koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 3 +++ 2 files changed, 5 insertions(+) diff --git a/circ/returns.pl b/circ/returns.pl index 5927759c37..3794c9952f 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -50,6 +50,7 @@ use C4::RotatingCollections; use Koha::AuthorisedValues; use Koha::DateUtils; use Koha::Calendar; +use Koha::Issues; my $query = new CGI; @@ -578,6 +579,7 @@ foreach ( sort { $a <=> $b } keys %returneditems ) { $ri{bortitle} = $b->{'title'}; $ri{bornote} = $b->{'borrowernotes'}; $ri{borcategorycode}= $b->{'categorycode'}; + $ri{borissuescount} = Koha::Issues->count( { borrowernumber => $b->{'borrowernumber'} } ); } else { $ri{borrowernumber} = $riborrowernumber{$_}; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index c0b9c90f30..30af75d0a5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -767,6 +767,9 @@ $(document).ready(function () { [% riloo.borsurname %], [% riloo.borfirstname %] ([% riloo.borcategorycode %]) + [% IF riloo.borissuescount %] + Issues: [% riloo.borissuescount %] + [% END %] [% ELSE %]Not checked out[% END %] [% IF ( riloo.bornote ) %]

[% riloo.bornote %]

[% END %] -- 2.39.2