From a477061dc9124fb1e75758d8703d05c01f44be09 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Mon, 24 Sep 2007 16:26:33 +0200 Subject: [PATCH] BUGFIX #670 Ported code from librarian interface, as it works here Signed-off-by: Chris Cormack --- .../prog/en/modules/reserve/request.tmpl | 2 +- koha-tmpl/opac-tmpl/prog/en/opac-user.tmpl | 18 +++++++++++++++-- opac/opac-user.pl | 20 ++++++++++++++++--- 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl index 181ada7f97..79bf39f038 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tmpl @@ -293,7 +293,7 @@ if (alreadyreserved > "0"){ Waiting to be pulled - Document will be transfered to " /> + Document being transfered to /> /> + + Waiting to be pulled + + + Document being transfered to > + + + Not ready + + diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 89fbe4eb75..36395259f8 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -178,11 +178,25 @@ foreach my $res (@reserves) { $res->{'holdingbranch'} = $branches->{ $item->{'holdingbranch'} }->{'branchname'}; $res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'}; - if ( $res->{'holdingbranch'} eq $res->{'branch'} ) { - $res->{'atdestination'} = 1; - } + # get document reserve status my $biblioData = GetBiblioData($res->{'biblionumber'}); $res->{'waiting_title'} = $biblioData->{'title'}; + if ( ( $res->{'found'} eq 'W' ) or ( $res->{'priority'} eq '0' ) ) { + my $item = $res->{'itemnumber'}; + $item = GetBiblioFromItemNumber($item,undef); + $res->{'wait'}= 1; + $res->{'holdingbranch'}=$item->{'holdingbranch'}; + $res->{'biblionumber'}=$item->{'biblionumber'}; + $res->{'barcodenumber'} = $item->{'barcode'}; + $res->{'wbrcode'} = $res->{'branchcode'}; + $res->{'itemnumber'} = $res->{'itemnumber'}; + $res->{'wbrname'} = $branches->{$res->{'branchcode'}}->{'branchname'}; + if($res->{'holdingbranch'} eq $res->{'wbrcode'}){ + $res->{'atdestination'} = 1; + } + # set found to 1 if reserve is waiting for patron pickup + $res->{'found'} = 1 if $res->{'found'} eq 'W'; + } push @waiting, $res; $wcount++; } -- 2.39.5