Bugzilla – Attachment 53724 Details for
Bug 15561
Add ability to charge cancellation fee from "Holds over" tab
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15561 [QA Followup] - Rename ExpireReservesMaxPickUpDelayCharge to WaitingHoldCancelationFee
Bug-15561-QA-Followup---Rename-ExpireReservesMaxPi.patch (text/plain), 9.00 KB, created by
Kyle M Hall (khall)
on 2016-07-26 14:13:44 UTC
(
hide
)
Description:
Bug 15561 [QA Followup] - Rename ExpireReservesMaxPickUpDelayCharge to WaitingHoldCancelationFee
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-07-26 14:13:44 UTC
Size:
9.00 KB
patch
obsolete
>From 8677a182bc4e43f8f60a03bf54c8dca31494e049 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 26 Jul 2016 14:05:04 +0000 >Subject: [PATCH] Bug 15561 [QA Followup] - Rename > ExpireReservesMaxPickUpDelayCharge to WaitingHoldCancelationFee > >--- > C4/Reserves.pm | 4 ++-- > installer/data/mysql/sysprefs.sql | 2 +- > .../intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref | 5 +++-- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt | 2 +- > koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt | 4 ++-- > t/db_dependent/Holds/CancelAll.t | 4 ++-- > t/db_dependent/Reserves.t | 4 ++-- > 7 files changed, 13 insertions(+), 12 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index af05bed..5aba0e7 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -1052,7 +1052,7 @@ sub AutoUnsuspendReserves { > > CancelReserve({ reserve_id => $reserve_id, [ biblionumber => $biblionumber, borrowernumber => $borrrowernumber, itemnumber => $itemnumber, ] [ charge_cancel_fee => 1 ] }); > >-Cancels a reserve. If C<charge_cancel_fee> is passed and the C<ExpireReservesMaxPickUpDelayCharge> syspref is set, charge that fee to the patron's account. >+Cancels a reserve. If C<charge_cancel_fee> is passed and the C<WaitingHoldCancelationFee> syspref is set, charge that fee to the patron's account. > > =cut > >@@ -1098,7 +1098,7 @@ sub CancelReserve { > _FixPriority({ biblionumber => $reserve->{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'} ) { > manualinvoice($reserve->{'borrowernumber'}, $reserve->{'itemnumber'}, '', 'HE', $charge); > } >diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql >index 46f89d5..c6db84e 100644 >--- a/installer/data/mysql/sysprefs.sql >+++ b/installer/data/mysql/sysprefs.sql >@@ -142,7 +142,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'), > ('ExtendedPatronAttributes','0',NULL,'Use extended patron IDs and attributes','YesNo'), > ('FacetLabelTruncationLength','20',NULL,'Specify the facet max length in OPAC','Integer'), >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 a3ce0b3..c53a6e5 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 >@@ -508,9 +508,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 b656973..57053a5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt >@@ -608,7 +608,7 @@ $(document).ready(function () { > [% END %] > <label for="dropboxcheck">Book drop mode</label> > </p> >- [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %] >+ [% IF Koha.Preference('WaitingHoldCancelationFee') %] > <p> > [% IF ( forgivemanualholdsexpire ) %] > <input type="checkbox" id="forgivemanualholdsexpire" name="forgivemanualholdsexpire" value="forgivemanualholdsexpire" checked="checked" /> >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 ed6a583..4110329 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt >@@ -138,7 +138,7 @@ > <input type="hidden" name="allbranches" value="[% allbranches %]" /> > <input type="hidden" name="tab" value="holdsover"> > <input type="submit" value="Cancel [% IF TransferWhenCancelAllWaitingHolds %]and Transfer [% END %]All" /> >- [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %] >+ [% IF Koha.Preference('WaitingHoldCancelationFee') %] > <p><input type="checkbox" class="charge_cancel_fee" name="charge_cancel_fee" value="1" checked="checked" /> Charge cancelation fee</p> > [% END %] > </form> >@@ -179,7 +179,7 @@ > <input type="hidden" name="tbr" value="[% overloo.homebranch %]" /> > <input type="hidden" name="tab" value="holdsover"> > >- [% IF Koha.Preference('ExpireReservesMaxPickUpDelayCharge') %] >+ [% IF Koha.Preference('WaitingHoldCancelationFee') %] > <p><input type="checkbox" class="charge_cancel_fee" name="charge_cancel_fee" value="1" checked="checked" /> Charge cancelation fee</p> > [% END %] > >diff --git a/t/db_dependent/Holds/CancelAll.t b/t/db_dependent/Holds/CancelAll.t >index 2a75627..5198e73 100755 >--- a/t/db_dependent/Holds/CancelAll.t >+++ b/t/db_dependent/Holds/CancelAll.t >@@ -38,7 +38,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( > { >@@ -107,7 +107,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 { >diff --git a/t/db_dependent/Reserves.t b/t/db_dependent/Reserves.t >index 1852ae6..fcd6b57 100755 >--- a/t/db_dependent/Reserves.t >+++ b/t/db_dependent/Reserves.t >@@ -560,7 +560,7 @@ my ( undef, undef, $bz14464_fines ) = GetMemberIssuesAndFines( $borrowernumber ) > is( !$bz14464_fines || $bz14464_fines==0, 1, 'Bug 14464 - No fines at beginning' ); > > # First, test cancelling a reserve when there's no charge configured. >-t::lib::Mocks::mock_preference('ExpireReservesMaxPickUpDelayCharge', 0); >+t::lib::Mocks::mock_preference('WaitingHoldCancelationFee', 0); > > my $bz14464_reserve = AddReserve( > 'CPL', >@@ -587,7 +587,7 @@ is($old_reserve->get_column('found'), 'W', 'Bug 14968 - Keep found column from r > is( !$bz14464_fines || $bz14464_fines==0, 1, 'Bug 14464 - No fines after cancelling reserve with no charge configured' ); > > # Then, test cancelling a reserve when there's no charge desired. >-t::lib::Mocks::mock_preference('ExpireReservesMaxPickUpDelayCharge', 42); >+t::lib::Mocks::mock_preference('WaitingHoldCancelationFee', 42); > > $bz14464_reserve = AddReserve( > 'CPL', >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15561
:
46558
|
50325
|
51742
|
52906
|
52907
|
52908
|
53724
|
63358
|
63359
|
63360
|
63361
|
81904
|
81905
|
81906
|
81907