From 2fc657204945d2c194b719fe773a3afedd8a791d 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 | 16 ++++++++-------- circ/returns.pl | 12 ++++++++++-- .../prog/en/modules/admin/preferences/circulation.pref | 2 +- .../intranet-tmpl/prog/en/modules/admin/smart-rules.tt | 1 - .../prog/en/modules/circ/circulation-home.tt | 8 ++++++++ .../prog/en/modules/circ/recalls_overdue.tt | 3 ++- .../intranet-tmpl/prog/en/modules/circ/recalls_queue.tt | 3 ++- .../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 ++- 11 files changed, 37 insertions(+), 19 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 86fd0cc..3ac94d4 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -353,17 +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 +# } 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; +# my ( $resfound, $resrec, undef ) = +# CheckReserves( $itemnumber ); +# if ( $resfound and not $ignoreRs ) { +# $resrec->{'ResFound'} = $resfound; # $messages->{'ResFound'} = $resrec; - $dotransfer = 1; - } +# $dotransfer = 1; +# } } #actually do the transfer.... diff --git a/circ/returns.pl b/circ/returns.pl index 75b28b7..2f2c5b5 100755 --- a/circ/returns.pl +++ b/circ/returns.pl @@ -484,14 +484,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/preferences/circulation.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref index 4944ccc..58fdd19 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref @@ -921,7 +921,7 @@ Circulation: Recalls: - - pref: UseRecalls - choices: + choices: yes: Use no: "Don't use" - recalls 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 20554bd..33ef8e6 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 @@ -203,7 +203,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 802dd9a..df572b0 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 @@ -59,6 +59,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 dbcb4c4..88f8c72 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 be44dfd..c78efea 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 %] @@ -57,7 +58,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