Bugzilla – Attachment 12760 Details for
Bug 8292
clicking ignore on hold cancels transfer
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8292 - clicking ignore on hold cancels transfer
Bug-8292---clicking-ignore-on-hold-cancels-transfe.patch (text/plain), 6.75 KB, created by
Kyle M Hall
on 2012-10-10 14:27:50 UTC
(
hide
)
Description:
Bug 8292 - clicking ignore on hold cancels transfer
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2012-10-10 14:27:50 UTC
Size:
6.75 KB
patch
obsolete
>From b79e3d2e365e2103affe47490bb30efef826beb3 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 10 Oct 2012 10:27:47 -0400 >Subject: [PATCH] Bug 8292 - clicking ignore on hold cancels transfer >Content-Type: text/plain; charset="utf-8" > >--- > C4/Circulation.pm | 20 +++++++++------ > circ/returns.pl | 6 +++- > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 25 ++++++++++++++++--- > 3 files changed, 37 insertions(+), 14 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index f3245c5..9ff4280 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -1415,7 +1415,7 @@ sub GetBranchItemRule { > =head2 AddReturn > > ($doreturn, $messages, $iteminformation, $borrower) = >- &AddReturn($barcode, $branch, $exemptfine, $dropbox); >+ &AddReturn($barcode, $branch, $exemptfine, $dropbox, $ignore_reserves); > > Returns a book. > >@@ -1434,6 +1434,9 @@ overdue charges are applied and C<$dropbox> is true, the last charge > will be removed. This assumes that the fines accrual script has run > for _today_. > >+=item C<$ignore_reserves> indicates that the check-in should not >+attempt to find reserves to full using this item. >+ > =back > > C<&AddReturn> returns a list of four items: >@@ -1487,7 +1490,7 @@ patron who last borrowed the book. > =cut > > sub AddReturn { >- my ( $barcode, $branch, $exemptfine, $dropbox ) = @_; >+ my ( $barcode, $branch, $exemptfine, $dropbox, $ignore_reserves ) = @_; > > if ($branch and not GetBranchDetail($branch)) { > warn "AddReturn error: branch '$branch' not found. Reverting to " . C4::Context->userenv->{'branch'}; >@@ -1644,12 +1647,13 @@ sub AddReturn { > } > } > >- # find reserves..... >- # if we don't have a reserve with the status W, we launch the Checkreserves routine >- my ($resfound, $resrec, undef) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); >- if ($resfound) { >- $resrec->{'ResFound'} = $resfound; >- $messages->{'ResFound'} = $resrec; >+ my ( $resfound, $resrec ); >+ unless ( $ignore_reserves ) { >+ ( $resfound, $resrec ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); >+ if ($resfound) { >+ $resrec->{'ResFound'} = $resfound; >+ $messages->{'ResFound'} = $resrec; >+ } > } > > # update stats? >diff --git a/circ/returns.pl b/circ/returns.pl >index 9f01530..ea0a4bc 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -171,6 +171,7 @@ my $messages; > my $issueinformation; > my $itemnumber; > my $barcode = $query->param('barcode'); >+my $ignore_reserves = $query->param('ignore_reserves'); > my $exemptfine = $query->param('exemptfine'); > my $dropboxmode = $query->param('dropboxmode'); > my $dotransfer = $query->param('dotransfer'); >@@ -216,7 +217,7 @@ if ($barcode) { > # save the return > # > ( $returned, $messages, $issueinformation, $borrower ) = >- AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode); # do the return >+ AddReturn( $barcode, $userenv_branch, $exemptfine, $dropboxmode, $ignore_reserves ); # do the return > my $homeorholdingbranchreturn = C4::Context->preference('HomeOrHoldingBranchReturn'); > $homeorholdingbranchreturn ||= 'homebranch'; > >@@ -400,7 +401,6 @@ if ( $messages->{'ResFound'}) { > borcnum => $borr->{'cardnumber'}, > debarred => $borr->{'debarred'}, > gonenoaddress => $borr->{'gonenoaddress'}, >- barcode => $barcode, > destbranch => $reserve->{'branchcode'}, > borrowernumber => $reserve->{'borrowernumber'}, > itemnumber => $reserve->{'itemnumber'}, >@@ -625,5 +625,7 @@ $template->param( > # } > #} > >+$template->param( barcode => $barcode ); >+ > # actually print the page! > output_html_with_http_headers $query, $cookie, $template->output; >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 7142cdc..4696e43 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -297,11 +297,12 @@ $(document).ready(function () { > <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();" /> > [% END %] >- <input type="submit" class="deny" value="Ignore" onclick="$('.dialog:visible').hide('slow'); $('#barcode').focus(); return false;" /> >+ > [% FOREACH inputloo IN inputloop %] >- <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" /> >- <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" /> >- <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" />[% END %] >+ <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" /> >+ <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" /> >+ <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" /> >+ [% END %] > <input type="hidden" name="itemnumber" value="[% itemnumber %]" /> > <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" /> > <input type="hidden" name="resbarcode" value="[% barcode %]" /> >@@ -309,6 +310,22 @@ $(document).ready(function () { > <input type="hidden" name="exemptfine" value="[% exemptfine %]" /> > <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" /> > </form> >+ >+ <form method="post" action="returns.pl" class="ignore"> >+ [% FOREACH inputloo IN inputloop %] >+ <input type="hidden" name="ri-[% inputloo.counter %]" value="[% inputloo.barcode %]" /> >+ <input type="hidden" name="dd-[% inputloo.counter %]" value="[% inputloo.duedate %]" /> >+ <input type="hidden" name="bn-[% inputloo.counter %]" value="[% inputloo.borrowernumber %]" /> >+ [% END %] >+ >+ <input type="hidden" name="exemptfine" value="[% exemptfine %]" /> >+ <input type="hidden" name="dropboxmode" value="[% dropboxmode %]" /> >+ >+ <input type="hidden" name="barcode" value="[% barcode %]" /> >+ <input type="hidden" name="ignore_reserves" value="1" /> >+ >+ <input type="submit" class="deny" value="Ignore" /> >+ </form> > </div> > [% END %] > [% ELSE %] >-- >1.7.2.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 8292
:
12760
|
14356
|
14474
|
14841
|
14990