From 208e6ab5895e88236c2b781356ae61d022715e06 Mon Sep 17 00:00:00 2001 From: Nick Date: Mon, 30 Sep 2019 10:37:03 +0000 Subject: [PATCH] Bug 23695: Alter transferbook to take a hash of params and specify from_branch To test: 1 - Go to Circulation->Transfer 2 - Find an item from your branch and create a transfer to branch B 3 - Note you can specify the origin and default is 'Item's holding library' 4 - Confirm the item is marked as held at your current branch and is being transferred to B 5 - Find an item from a third branch, branch C 6 - Transfer that item to branch B from branch D 7 - Confirm the item is held at branch D and is being transferred to B 8 - prove -v t/db_dependent/Circulation.t 9 - prove -v t/db_dependent/Koha/Items.t 10 - prove -v t/db_dependent/RotatingCollections.t Signed-off-by: Owen Leonard --- circ/branchtransfers.pl | 2 ++ .../prog/en/modules/circ/branchtransfers.tt | 11 +++++++++ t/db_dependent/Circulation.t | 28 +++++++++++++++++++++- 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index 1e9f48c48e..b5e807b8c1 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -80,6 +80,7 @@ my $setwaiting; my $request = $query->param('request') || ''; my $borrowernumber = $query->param('borrowernumber') || 0; +my $frombranchcd = $query->param('frombranchcd') || C4::Context->userenv->{'branch'}; my $tobranchcd = $query->param('tobranchcd') || ''; my $ignoreRs = 0; @@ -223,6 +224,7 @@ $template->param( itemnumber => $itemnumber, barcode => $barcode, biblionumber => $biblionumber, + frombranchcd => $frombranchcd, tobranchcd => $tobranchcd, reqmessage => $reqmessage, cancelled => $cancelled, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt index 5eb69ed385..b640cf07db 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt @@ -72,6 +72,7 @@ + @@ -128,6 +129,7 @@ [% ELSE %]
  • Collection: [% AuthorisedValues.GetByCode( 'CCODE', errmsgloo.code ) | html %]
  • [% END %] +
  • Originating library: [% Branches.GetName( errmsgloo.fbr ) | html %]
  • Destination library: [% Branches.GetName( errmsgloo.tbr ) | html %]
  • @@ -151,6 +153,13 @@ Transfer
    1. + + +
    2. +