Bugzilla – Attachment 3993 Details for
Bug 2941
Transfers cannot be canceled once initiated.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Proposed fix
0001-Fix-for-Bug-2941-Transfers-cannot-be-canceled-once-i.patch (text/plain), 4.62 KB, created by
Owen Leonard
on 2011-04-22 19:40:35 UTC
(
hide
)
Description:
Proposed fix
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2011-04-22 19:40:35 UTC
Size:
4.62 KB
patch
obsolete
>From ab4c93e32a52e19af94eb316bdcb27da8f63d662 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Fri, 22 Apr 2011 15:32:13 -0400 >Subject: [PATCH] Fix for Bug 2941 Transfers cannot be canceled once initiated >Content-Type: text/plain; charset="utf-8" > >This patch includes the changes by Catalyst found at >http://git.catalyst.net.nz/gw?p=koha.git;a=shortlog;h=refs/heads/bug_2941 >and adds a "cancel transfer" link to the transferstoreceive >script, including a redirect check to send the user back to >that report. >--- > circ/returns.pl | 15 +++++++++++++++ > .../intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- > .../prog/en/modules/circ/transferstoreceive.tt | 2 ++ > 3 files changed, 18 insertions(+), 1 deletions(-) > >diff --git a/circ/returns.pl b/circ/returns.pl >index 5a0cc09..d7fad0c 100755 >--- a/circ/returns.pl >+++ b/circ/returns.pl >@@ -3,6 +3,7 @@ > # Copyright 2000-2002 Katipo Communications > # 2006 SAN-OP > # 2007-2010 BibLibre, Paul POULAIN >+# 2010 Catalyst IT > # > # This file is part of Koha. > # >@@ -171,6 +172,8 @@ my $barcode = $query->param('barcode'); > my $exemptfine = $query->param('exemptfine'); > my $dropboxmode = $query->param('dropboxmode'); > my $dotransfer = $query->param('dotransfer'); >+my $canceltransfer = $query->param('canceltransfer'); >+my $dest = $query->param('dest'); > my $calendar = C4::Calendar->new( branchcode => $userenv_branch ); > #dropbox: get last open day (today - 1) > my $today = C4::Dates->new(); >@@ -183,6 +186,17 @@ if ($dotransfer){ > ModItemTransfer($transferitem, $userenv_branch, $tobranch); > } > >+if ($canceltransfer){ >+ $itemnumber=$query->param('itemnumber'); >+ DeleteTransfer($itemnumber); >+ if($dest eq "ttr"){ >+ print $query->redirect("/cgi-bin/koha/circ/transferstoreceive.pl"); >+ exit; >+ } else { >+ $template->param( transfercancelled => 1); >+ } >+} >+ > # actually return book and prepare item table..... > if ($barcode) { > $barcode =~ s/^\s*|\s*$//g; # remove leading/trailing whitespace >@@ -321,6 +335,7 @@ if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { > WrongTransfer => 1, > TransferWaitingAt => $messages->{'WrongTransfer'}, > WrongTransferItem => $messages->{'WrongTransferItem'}, >+ itemnumber => $itemnumber, > ); > > my $reserve = $messages->{'ResFound'}; >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 a766bcc..620f770 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -80,7 +80,7 @@ function Dopop(link) { > </div> > [% END %] > <!-- case of a mistake in transfer loop --> >-[% IF ( WrongTransfer ) %]<div class="dialog message"><!-- WrongTransfer --><h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% title |html %]</a> to [% TransferWaitingAt %]</h3> >+[% IF ( WrongTransfer ) %]<div class="dialog message"><!-- WrongTransfer --><h3>Please return <a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&biblionumber=[% itembiblionumber %]">[% title |html %]</a> to [% TransferWaitingAt %] or <a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&canceltransfer=1">Cancel Transfer</a></h3> > [% IF ( wborcnum ) %]<h5>Hold for:</h5> > <ul><li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]"> > [% borsurname %], [% borfirstname %]</a> ([% borcnum %])</li> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt >index 50d7ae3..2c84d5d 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt >@@ -50,6 +50,7 @@ $(document).ready(function() { > <th>On hold for</th> > <th>Home library</th> > <th>Call no.</th> >+ <th> </th> > </tr></thead> > <tbody>[% FOREACH reser IN branchesloo.reserv %] > [% IF ( reser.messcompa ) %] >@@ -79,6 +80,7 @@ $(document).ready(function() { > </td> > <td>[% reser.homebranch %]</td> > <td>[% reser.itemcallnumber %]</td> >+ <td><a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% reser.itemnumber %]&canceltransfer=1&dest=ttr">Cancel Transfer</a></td> > </tr> > [% END %]</tbody> > </table> >-- >1.7.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 2941
: 3993