Bugzilla – Attachment 34523 Details for
Bug 12085
Allow staff to place multiple reserves for the same patron
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12085 - Allow staff to place multiple reserves for the same patron. Fix wrong branch from hold-transfer-slip.pl
Bug-12085---Allow-staff-to-place-multiple-reserves.patch (text/plain), 4.51 KB, created by
Olli-Antti Kivilahti
on 2014-12-19 09:55:24 UTC
(
hide
)
Description:
Bug 12085 - Allow staff to place multiple reserves for the same patron. Fix wrong branch from hold-transfer-slip.pl
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2014-12-19 09:55:24 UTC
Size:
4.51 KB
patch
obsolete
>From 22f852872b25c82eb18e7c0a802a005ab847690a Mon Sep 17 00:00:00 2001 >From: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >Date: Fri, 19 Dec 2014 11:47:40 +0200 >Subject: [PATCH] Bug 12085 - Allow staff to place multiple reserves for the > same patron. Fix wrong branch from hold-transfer-slip.pl > >1. Place lots of reservations for one borrower to be picked up from multiple branches. >2. Start checking the books in and catching the resevations. >3. Observe that the hold-transfer-slip is always for the first unsatisfied hold for the biblionumber, regardless > of which hold is received. This only appears when checking-in multiple same biblios. > >This patch fixes that. >--- > C4/Reserves.pm | 6 +++--- > circ/hold-transfer-slip.pl | 3 ++- > circ/returns.pl | 2 +- > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- > 4 files changed, 7 insertions(+), 6 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 5861ef2..bccd649 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -2208,14 +2208,14 @@ sub GetReserveNextEligible { > =cut > > sub ReserveSlip { >- my ($branch, $borrowernumber, $biblionumber) = @_; >+ my ($branch, $borrowernumber, $biblionumber, $transfer, $reserve_id) = @_; > > # return unless ( C4::Context->boolean_preference('printreserveslips') ); > >- my $reserve_id = GetReserveId({ >+ $reserve_id = GetReserveId({ > biblionumber => $biblionumber, > borrowernumber => $borrowernumber >- }) or return; >+ }) or return unless $reserve_id; > my $reserve = GetReserveInfo($reserve_id) or return; > > return C4::Letters::GetPreparedLetter ( >diff --git a/circ/hold-transfer-slip.pl b/circ/hold-transfer-slip.pl >index 8ae5d2a..bd39f67 100755 >--- a/circ/hold-transfer-slip.pl >+++ b/circ/hold-transfer-slip.pl >@@ -38,6 +38,7 @@ my $session = get_session($sessionID); > > my $biblionumber = $input->param('biblionumber'); > my $borrowernumber = $input->param('borrowernumber'); >+my $reserve_id = $input->param('reserve_id'); > my $transfer = $input->param('transfer'); > > my ( $template, $loggedinuser, $cookie ) = get_template_and_user( >@@ -53,7 +54,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user( > > my $userenv = C4::Context->userenv; > my ($slip, $is_html); >-if ( my $letter = ReserveSlip ($session->param('branch') || $userenv->{branch}, $borrowernumber, $biblionumber) ) { >+if ( my $letter = ReserveSlip ($session->param('branch') || $userenv->{branch}, $borrowernumber, $biblionumber, $transfer, $reserve_id) ) { > $slip = $letter->{content}; > $is_html = $letter->{is_html}; > } >diff --git a/circ/returns.pl b/circ/returns.pl >index 6daddc4..735d011 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -412,7 +412,7 @@ if ( $messages->{'ResFound'}) { > intransit => ($userenv_branch eq $reserve->{'branchcode'} ? 0 : 1 ), > transfertodo => ($userenv_branch eq $reserve->{'branchcode'} ? 0 : 1 ), > resbarcode => $barcode, >- reserved => 1, >+ reserved => $reserve, > ); > } > >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 4daf601..217898a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -346,7 +346,7 @@ $(document).ready(function () { > <form method="post" action="returns.pl" class="confirm"> > [% IF ( transfertodo ) %] > <input type="submit" class="approve" value="Confirm hold and transfer" /> >- <input type="submit" value="Print slip, transfer, and confirm" class="print" onclick="Dopop('hold-transfer-slip.pl?transfer=1&borrowernumber=[% borrowernumber %]&biblionumber=[% itembiblionumber %]&op=slip'); this.form.submit();" /> >+ <input type="submit" value="Print slip, transfer, and confirm" class="print" onclick="Dopop('hold-transfer-slip.pl?transfer=1&borrowernumber=[% borrowernumber %]&biblionumber=[% itembiblionumber %]&reserve_id=[% reserved.reserve_id %]&op=slip'); this.form.submit();" /> > [% ELSE %] > <input type="submit" class="approve" value="Confirm hold" /> > <input type="submit" value="Print slip and confirm" class="print" onclick="Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&biblionumber=[% itembiblionumber %]&op=slip'); this.form.submit();" /> >-- >1.7.9.5
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 12085
:
27121
|
34522
| 34523