From 3193527dc248135ceeb483ea29ae3522c87a9440 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 28 Jul 2014 16:49:52 -0400 Subject: [PATCH] Bug 10446 - Follow up fix As per comment #11 by Jonathan Druart, I just fixed the items in question. Plus, I noted a typographical error in the updatedatabase.pl message (10466 vs. 10446) TEST PLAN --------- 1) Apply the patch 2) Ensure the Circulation system preference, AllowOfflineCirculation, is enabled. 3) Home -> Circulation -> Built-in offline circulation interface --- circ/offline.pl | 4 ++-- installer/data/mysql/updatedatabase.pl | 2 +- .../intranet-tmpl/prog/en/modules/circ/offline.tt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/circ/offline.pl b/circ/offline.pl index ebc161b..8f553bf 100755 --- a/circ/offline.pl +++ b/circ/offline.pl @@ -36,6 +36,6 @@ my ( $template, $loggedinuser, $cookie, $flags ) = get_template_and_user( $template->{'VARS'}->{'AllowOfflineCirculation'} = C4::Context->preference('AllowOfflineCirculation'); -$template->{'VARS'}->{'maxoutstanding'} = - C4::Context->preference('maxoutstanding') || 0; +$template->{'VARS'}->{'FeesBlockHoldsAmount'} = + C4::Context->preference('FeesBlockHoldsAmount') || 0; output_html_with_http_headers $query, $cookie, $template->output; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index e9ce9fe..f5e7a68 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8582,7 +8582,7 @@ if ( CheckVersion($DBversion) ) { $dbh->do(q{ UPDATE systempreferences SET variable = 'FeesBlockHoldsAmount' WHERE variable = 'maxoutstanding' }); - print "Upgrade to $DBversion done (Bug 10466 - System preference maxoutstanding is poorly named)\n"; + print "Upgrade to $DBversion done (Bug 10446 - System preference maxoutstanding is poorly named)\n"; SetVersion($DBversion); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt index 0a922a5..a55e9fd 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/offline.tt @@ -339,7 +339,7 @@ function checkPatronAlerts(cardnumber, patron) { if (new Date(patron.dateexpiry) < new Date()) { alerts.push(ALERT_PATRON_EXPIRED.format($.datepicker.formatDate(dateformat, new Date(patron.dateexpiry)))); } - if (parseInt(patron.fine) > [% maxoutstanding %]) { + if (parseInt(patron.fine) > [% FeesBlockHoldsAmount %]) { alerts.push(ALERT_PATRON_FINE_OVER_LIMIT.format(patron.fine)); } else if (parseInt(patron.fine) > 0) { alerts.push(ALERT_PATRON_FINE.format(patron.fine)); -- 1.7.9.5