-# Koha is free software; you can redistribute it and/or modify it under the
-# terms of the GNU General Public License as published by the Free Software
-# Foundation; either version 2 of the License, or (at your option) any later
-# version.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
-# Koha is distributed in the hope that it will be useful, but WITHOUT ANY
-# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
-# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
-# You should have received a copy of the GNU General Public License along
-# with Koha; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
-my $OPACDisplayRequestPriority = (C4::Context->preference("OPACDisplayRequestPriority")) ? 1 : 0;
+my %renewed = map { $_ => 1 } split( ':', $query->param('renewed') );
+
+my $show_priority;
+for ( C4::Context->preference("OPACShowHoldQueueDetails") ) {
+ m/priority/ and $show_priority = 1;
+}
+
# get borrower information ....
my ( $borr ) = GetMemberDetails( $borrowernumber );
my ( $today_year, $today_month, $today_day) = Today();
my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'};
# get borrower information ....
my ( $borr ) = GetMemberDetails( $borrowernumber );
my ( $today_year, $today_month, $today_day) = Today();
my ($warning_year, $warning_month, $warning_day) = split /-/, $borr->{'dateexpiry'};
# Warningdate is the date that the warning starts appearing
if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') ) {
my $days_to_expiry = Date_to_Days( $warning_year, $warning_month, $warning_day ) - Date_to_Days( $today_year, $today_month, $today_day );
# Warningdate is the date that the warning starts appearing
if ( $borr->{'dateexpiry'} && C4::Context->preference('NotifyBorrowerDeparture') ) {
my $days_to_expiry = Date_to_Days( $warning_year, $warning_month, $warning_day ) - Date_to_Days( $today_year, $today_month, $today_day );
# pass on any renew errors to the template for displaying
my $renew_error = $query->param('renew_error');
# pass on any renew errors to the template for displaying
my $renew_error = $query->param('renew_error');
borrowernumber => $borrowernumber,
patron_flagged => $borr->{flagged},
OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0,
surname => $borr->{surname},
borrowernumber => $borrowernumber,
patron_flagged => $borr->{flagged},
OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0,
surname => $borr->{surname},
$charges += $ac->{'amountoutstanding'}
if $ac->{'accounttype'} eq 'F';
$charges += $ac->{'amountoutstanding'}
$charges += $ac->{'amountoutstanding'}
if $ac->{'accounttype'} eq 'F';
$charges += $ac->{'amountoutstanding'}
- $issue->{'subtitle'} = GetRecordValue('subtitle', GetMarcBiblio($issue->{'biblionumber'}), GetFrameworkCode($issue->{'biblionumber'}));
+ my $marcrecord = GetMarcBiblio( $issue->{'biblionumber'} );
+ $issue->{'subtitle'} = GetRecordValue('subtitle', $marcrecord, GetFrameworkCode($issue->{'biblionumber'}));
# check if item is renewable
my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
# check if item is renewable
my ($status,$renewerror) = CanBookBeRenewed( $borrowernumber, $issue->{'itemnumber'} );
($issue->{'renewcount'},$issue->{'renewsallowed'},$issue->{'renewsleft'}) = GetRenewCount($borrowernumber, $issue->{'itemnumber'});
- $issue->{'too_many'} = 1 if $renewerror eq 'too_many';
- $issue->{'on_reserve'} = 1 if $renewerror eq 'on_reserve';
+ $issue->{'too_many'} = 1 if $renewerror eq 'too_many';
+ $issue->{'on_reserve'} = 1 if $renewerror eq 'on_reserve';
+ $issue->{'norenew_overdue'} = 1 if $renewerror eq 'overdue';
+ $issue->{'auto_renew'} = 1 if $renewerror eq 'auto_renew';
+ $issue->{'auto_too_soon'} = 1 if $renewerror eq 'auto_too_soon';
$template->param( ISSUES => \@issuedat );
$template->param( issues_count => $count );
$template->param( canrenew => $canrenew );
$template->param( ISSUES => \@issuedat );
$template->param( issues_count => $count );
$template->param( canrenew => $canrenew );
$res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
my $biblioData = GetBiblioData($res->{'biblionumber'});
$res->{'reserves_title'} = $biblioData->{'title'};
$res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
my $biblioData = GetBiblioData($res->{'biblionumber'});
$res->{'reserves_title'} = $biblioData->{'title'};
- if ($OPACDisplayRequestPriority) {
- $res->{'priority'} = '' if $res->{'priority'} eq '0';
+ $res->{'author'} = $biblioData->{'author'};
+
+ if ($show_priority) {
+ $res->{'priority'} ||= '';
+ }
+ if ( $res->{'suspend_until'} ) {
+ $res->{'suspend_until'} = output_pref({ dt => dt_from_string( $res->{'suspend_until'} , 'iso' ), dateonly => 1 });
$res->{'holdingbranch'} =
$branches->{ $item->{'holdingbranch'} }->{'branchname'};
$res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
$res->{'holdingbranch'} =
$branches->{ $item->{'holdingbranch'} }->{'branchname'};
$res->{'branch'} = $branches->{ $res->{'branchcode'} }->{'branchname'};
# get document reserve status
my $biblioData = GetBiblioData($res->{'biblionumber'});
$res->{'waiting_title'} = $biblioData->{'title'};
# get document reserve status
my $biblioData = GetBiblioData($res->{'biblionumber'});
$res->{'waiting_title'} = $biblioData->{'title'};
- bor_messages_loop => GetMessages( $borrowernumber, 'B', 'NONE' ),
- waiting_count => $wcount,
- patronupdate => $patronupdate,
- OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
- userview => 1,
-);
-
-$template->param(
- SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'),
+ bor_messages_loop => GetMessages( $borrowernumber, 'B', 'NONE' ),
+ waiting_count => $wcount,
+ patronupdate => $patronupdate,
+ OpacRenewalAllowed => C4::Context->preference("OpacRenewalAllowed"),
+ userview => 1,
+ SuspendHoldsOpac => C4::Context->preference('SuspendHoldsOpac'),
- OpacHoldNotes => C4::Context->preference('OpacHoldNotes'),
+ OpacHoldNotes => C4::Context->preference('OpacHoldNotes'),
+ failed_holds => $query->param('failed_holds'),
-output_html_with_http_headers $query, $cookie, $template->output;
-
+output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };