Bugzilla – Attachment 59916 Details for
Bug 17453
Inter-site holds improvement
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17453: Allow pickup at a library where all items are checked out
Bug-17453-Allow-pickup-at-a-library-where-all-item.patch (text/plain), 2.06 KB, created by
Jonathan Druart
on 2017-02-06 08:24:35 UTC
(
hide
)
Description:
Bug 17453: Allow pickup at a library where all items are checked out
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-02-06 08:24:35 UTC
Size:
2.06 KB
patch
obsolete
>From 965a2173bf1d83c153af3f32e271461e55454db8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 31 Oct 2016 11:16:05 +0000 >Subject: [PATCH] Bug 17453: Allow pickup at a library where all items are > checked out > >If all items are checked out then it should be possible to select the pickup >library for that record. > >Signed-off-by: Janet McGowan <janet.mcgowan@ptfs-europe.com> >--- > opac/opac-reserve.pl | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl >index 5b28b27..f5e4130 100755 >--- a/opac/opac-reserve.pl >+++ b/opac/opac-reserve.pl >@@ -287,7 +287,11 @@ if ( $query->param('place_reserve') ) { > } > > unless ( $can_place_hold_if_available_at_pickup ) { >- $canreserve = 0 if Koha::Items->search({ biblionumber => $biblioNum, holdingbranch => $branch })->count; >+ my $items_in_this_library = Koha::Items->search({ biblionumber => $biblioNum, holdingbranch => $branch }); >+ my $nb_of_items_issued = $items_in_this_library->search({ 'issue.itemnumber' => { not => undef }}, { join => 'issue' })->count; >+ if ( $items_in_this_library->count > $nb_of_items_issued ) { >+ $canreserve = 0 >+ } > } > > my $itemtype = $query->param('itemtype') || undef; >@@ -535,7 +539,11 @@ foreach my $biblioNum (@biblionumbers) { > $numCopiesAvailable++; > > unless ( $can_place_hold_if_available_at_pickup ) { >- push @not_available_at, $itemInfo->{holdingbranch}; >+ my $items_in_this_library = Koha::Items->search({ biblionumber => $itemInfo->{biblionumber}, holdingbranch => $itemInfo->{holdingbranch} }); >+ my $nb_of_items_issued = $items_in_this_library->search({ 'issue.itemnumber' => { not => undef }}, { join => 'issue' })->count; >+ if ( $items_in_this_library->count > $nb_of_items_issued ) { >+ push @not_available_at, $itemInfo->{holdingbranch}; >+ } > } > } > >-- >2.9.3
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17453
:
56623
|
56624
|
56762
|
56994
|
57002
|
57003
|
57004
|
57005
|
59915
|
59916
|
60093
|
60102
|
60285
|
60286
|
60287
|
60288
|
60289
|
60290
|
60291