From 3cd00f925d6e5f7bbabc3be3bba3aaa08ffcb286 Mon Sep 17 00:00:00 2001
From: Kyle M Hall
Date: Tue, 26 Jul 2016 14:05:04 +0000
Subject: [PATCH] Bug 15561 [QA Followup] - Rename
ExpireReservesMaxPickUpDelayCharge to WaitingHoldCancelationFee
---
Koha/Hold.pm | 4 ++--
installer/data/mysql/sysprefs.sql | 2 +-
.../prog/en/modules/admin/preferences/circulation.pref | 5 +++--
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +-
.../intranet-tmpl/prog/en/modules/circ/waitingreserves.tt | 4 ++--
t/db_dependent/Holds/CancelAll.t | 4 ++--
6 files changed, 11 insertions(+), 10 deletions(-)
diff --git a/Koha/Hold.pm b/Koha/Hold.pm
index 23d5d447a5..3962a341d1 100644
--- a/Koha/Hold.pm
+++ b/Koha/Hold.pm
@@ -331,7 +331,7 @@ my $cancel_hold = $hold->cancel();
Cancel a hold:
- The hold will be moved to the old_reserves table with a priority=0
- The priority of other holds will be updated
-- The patron will be charge (see ExpireReservesMaxPickUpDelayCharge) if the charge_cancel_fee parameter is set
+- The patron will be charge (see WaitingHoldCancelationFee) if the charge_cancel_fee parameter is set
- a CANCEL HOLDS log will be done if the pref HoldsLog is on
=cut
@@ -349,7 +349,7 @@ sub cancel {
C4::Reserves::_FixPriority({ biblionumber => $self->biblionumber });
# and, if desired, charge a cancel fee
- my $charge = C4::Context->preference("ExpireReservesMaxPickUpDelayCharge");
+ my $charge = C4::Context->preference("WaitingHoldCancelationFee");
if ( $charge && $params->{'charge_cancel_fee'} ) {
C4::Accounts::manualinvoice($self->borrowernumber, $self->itemnumber, '', 'HE', $charge);
}
diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql
index ed85d2b0fd..35a8095089 100644
--- a/installer/data/mysql/sysprefs.sql
+++ b/installer/data/mysql/sysprefs.sql
@@ -160,7 +160,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('EnhancedMessagingPreferencesOPAC', '1', NULL, 'If ON, show patrons messaging setting on the OPAC.', 'YesNo'),
('expandedSearchOption','0',NULL,'If ON, set advanced search to be expanded by default','YesNo'),
('ExpireReservesMaxPickUpDelay','0','','Enabling this allows holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay','YesNo'),
-('ExpireReservesMaxPickUpDelayCharge','0',NULL,'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.','free'),
+('WaitingHoldCancelationFee','0',NULL,'If ExpireReservesMaxPickUpDelay is enabled, and this field has a non-zero value, than a borrower whose waiting hold has expired will be charged this amount.','free'),
('ExpireReservesOnHolidays', '1', NULL, 'If false, reserves at a library will not be canceled on days the library is not open.', 'YesNo'),
('ExcludeHolidaysFromMaxPickUpDelay', '0', NULL, 'If ON, reserves max pickup delay takes into accountthe closed days.', 'YesNo'),
('ExportCircHistory', 0, NULL, "Display the export circulation options", 'YesNo' ),
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 2407b6c681..a119f8df8f 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
@@ -602,9 +602,10 @@ Circulation:
no: "Don't allow"
- "holds to expire automatically if they have not been picked by within the time period specified in ReservesMaxPickUpDelay"
-
- - If using ExpireReservesMaxPickUpDelay, charge a borrower who allows his or her waiting hold to expire a fee of
- - pref: ExpireReservesMaxPickUpDelayCharge
+ - Charge an amount of
+ - pref: WaitingHoldCancelationFee
class: currency
+ - if a waiting hold cancellation fee is to be charged, based on if the hold has been waiting more days than defined by ReservesMaxPickUpDelay.
-
- Satisfy holds using items from the libraries
- pref: StaticHoldsQueueWeight
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
index dec258ba17..f783fd85ec 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
@@ -665,7 +665,7 @@
[% END %]
- [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %]
+ [% IF Koha.Preference('WaitingHoldCancelationFee') %]
[% IF ( forgivemanualholdsexpire ) %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt
index f42e8b3b0c..903af78000 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt
@@ -137,7 +137,7 @@
[% END %]
- [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %]
+ [% IF Koha.Preference('WaitingHoldCancelationFee') %]
Charge cancelation fee
[% END %]
@@ -184,7 +184,7 @@
- [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %]
+ [% IF Koha.Preference('WaitingHoldCancelationFee') %]
Charge cancelation fee
[% END %]
diff --git a/t/db_dependent/Holds/CancelAll.t b/t/db_dependent/Holds/CancelAll.t
index 4eb97b6b98..9e2f9b48b5 100755
--- a/t/db_dependent/Holds/CancelAll.t
+++ b/t/db_dependent/Holds/CancelAll.t
@@ -37,7 +37,7 @@ my $borrowers_count = 2;
my ( $biblionumber, $title, $biblioitemnumber ) = create_helper_biblio('DUMMY');
-C4::Context->set_preference( 'ExpireReservesMaxPickUpDelayCharge', '5.00' );
+C4::Context->set_preference( 'WaitingHoldCancelationFee', '5.00' );
my ( undef, undef, $itemnumber ) = AddItem(
{
@@ -106,7 +106,7 @@ is( $hold, undef, 'Hold canceled correctly' );
$accountlines =
Koha::Account::Lines->search( { borrowernumber => $borrowernumber } );
is( $accountlines->count(), 1, "Found charge for cancelation" );
-is( $accountlines->as_list->[0]->amountoutstanding, '5.000000', 'Charge is equal to ExpireReservesMaxPickUpDelayCharge' );
+is( $accountlines->as_list->[0]->amountoutstanding, '5.000000', 'Charge is equal to WaitingHoldCancelationFee' );
# Helper method to set up a Biblio.
sub create_helper_biblio {
--
2.17.2 (Apple Git-113)