From 928092d078a1da85791fe9d22d7e523f0ed2632b Mon Sep 17 00:00:00 2001 From: Alex Buckley Date: Sun, 8 Jul 2018 00:00:17 +0000 Subject: [PATCH] Bug 19532 - Fixes to stop transfer recall modal from being displayed incorrectly --- C4/Circulation.pm | 15 ++++++++------- circ/returns.pl | 12 ++++++++++-- .../intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 1 - .../prog/en/modules/circ/circulation-home.tt | 8 ++++++++ .../intranet-tmpl/prog/en/modules/circ/recalls_overdue.tt | 3 ++- .../intranet-tmpl/prog/en/modules/circ/recalls_queue.tt | 3 ++- .../intranet-tmpl/prog/en/modules/circ/recalls_waiting.tt | 3 ++- koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 1 - .../intranet-tmpl/prog/en/modules/members/moremember.tt | 4 ++-- .../prog/en/modules/members/recallshistory.tt | 3 ++- 10 files changed, 36 insertions(+), 17 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 9b336da..f141eb6 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -353,16 +353,17 @@ sub transferbook { $dotransfer = 0; $messages->{'RecallPlacedAtHoldingBranch'} = 1; } else { - $dotransfer = 1; + $dotransfer = 0; } } else { #recalls take priority over holds, only check holds if no recalls # find reserves..... - my ( $resfound, $resrec, undef ) = CheckReserves( $itemnumber ); - if ( $resfound and not $ignoreRs ) { - $resrec->{'ResFound'} = $resfound; - # $messages->{'ResFound'} = $resrec; - $dotransfer = 1; - } +# my ( $resfound, $resrec, undef ) = +# CheckReserves( $itemnumber ); +# if ( $resfound and not $ignoreRs ) { +# $resrec->{'ResFound'} = $resfound; +# $messages->{'ResFound'} = $resrec; +# $dotransfer = 1; +# } } #actually do the transfer.... diff --git a/circ/returns.pl b/circ/returns.pl index 11894f9..32d3c21 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -513,14 +513,22 @@ if ( $messages->{'ResFound'}) { if ( $messages->{'RecallFound'} ){ my $recall = $messages->{'Recall'}; + warn $userenv_branch; + warn $recall->branchcode; + my $transfer_recall; + if ($userenv_branch eq $recall->branchcode) { + $transfer_recall = 0; + } else { + $transfer_recall = 1; + } my $patron = Koha::Patrons->find( $recall->borrowernumber ); $template->param( patron => $patron, found => 1, recalled => 1, recall => $recall, - transfer_recall => ($userenv_branch eq $recall->branchcode ? 1 : 0 ) -# address => $patron->address, + transfer_recall => $transfer_recall, + address => $patron->address, # address2 => $patron->address2, # streetnumber => $patron->streetnumber, # city => $patron->city, diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt index 6357f65..aac0df0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/smart-rules.tt @@ -207,7 +207,6 @@ Don't allow [% END %] - [% IF rule.opacitemholds == 'F'%]Force[% ELSIF rule.opacitemholds == 'Y'%]Allow[% ELSE %]Don't allow[% END %] [% rule.recall_due_date_interval %] [% rule.recall_overdue_fine FILTER format("%.2f") %] [% rule.recall_shelf_time %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt index c05fd3c..a8014d0 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation-home.tt @@ -70,6 +70,14 @@ Hold ratios + [% IF Koha.Preference('UseRecalls') %] +

Recalls

+ + [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_overdue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_overdue.tt index 4137632..787018a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_overdue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_overdue.tt @@ -1,3 +1,4 @@ +[% USE Asset %] [% USE Koha %] [% USE KohaDates %] [% INCLUDE 'doc-head-open.inc' %] @@ -5,7 +6,7 @@ [% INCLUDE 'doc-head-close.inc' %] - +[% Asset.js("js/recalls.js") %] [% INCLUDE 'datatables.inc' %] [% INCLUDE 'columns_settings.inc' %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_queue.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_queue.tt index c3d6b37..3efe280 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_queue.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/recalls_queue.tt @@ -1,3 +1,4 @@ +[% USE Asset %] [% USE Koha %] [% USE KohaDates %] [% SET footerjs = 1 %] @@ -58,7 +59,7 @@ [% MACRO jsinclude BLOCK %] [% INCLUDE 'datatables.inc' %] [% INCLUDE 'columns_settings.inc' %] - + [% Asset.js("js/recalls.js") %] +[% Asset.js("js/recalls.js") %] [% INCLUDE 'datatables.inc' %] +[% Asset.js("js/recalls.js") %] [% INCLUDE 'header.inc' %] -- 2.1.4