Bugzilla – Attachment 143453 Details for
Bug 32142
Add HoldFeeMode option "if all items are checked out OR the record has at least one hold already"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32142: Implement issued_or_reserved HoldFeeMode option
Bug-32142-Implement-issuedorreserved-HoldFeeMode-o.patch (text/plain), 2.96 KB, created by
Aleisha Amohia
on 2022-11-09 01:31:49 UTC
(
hide
)
Description:
Bug 32142: Implement issued_or_reserved HoldFeeMode option
Filename:
MIME Type:
Creator:
Aleisha Amohia
Created:
2022-11-09 01:31:49 UTC
Size:
2.96 KB
patch
obsolete
>From f9848a00bd680f6bedb651366e8d89b25532753e Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Wed, 9 Nov 2022 01:30:55 +0000 >Subject: [PATCH] Bug 32142: Implement issued_or_reserved HoldFeeMode option > >Tests and test plan to come. >--- > C4/Reserves.pm | 12 ++++++++---- > .../en/modules/admin/preferences/circulation.pref | 1 + > 2 files changed, 9 insertions(+), 4 deletions(-) > >diff --git a/C4/Reserves.pm b/C4/Reserves.pm >index 6ff7149edcf..eec608d607d 100644 >--- a/C4/Reserves.pm >+++ b/C4/Reserves.pm >@@ -764,19 +764,23 @@ SELECT COUNT(*) FROM reserves WHERE biblionumber=? AND borrowernumber<>? > my $dbh = C4::Context->dbh; > my ( $fee ) = $dbh->selectrow_array( $borquery, undef, ($borrowernumber) ); > my $hold_fee_mode = C4::Context->preference('HoldFeeMode') || 'not_always'; >- if( $fee and $fee > 0 and $hold_fee_mode eq 'not_always' ) { >+ if( $fee and $fee > 0 and ( $hold_fee_mode eq 'not_always' or $hold_fee_mode eq 'issued_or_reserved' ) ) { > # This is a reconstruction of the old code: > # Compare number of items with items issued, and optionally check holds >- # If not all items are issued and there are no holds: charge no fee >+ # not_always = If not all items are issued and there are no holds: charge no fee >+ # issued_or_reserved = If all items are issued, OR there are holds: charge fee > # NOTE: Lost, damaged, not-for-loan, etc. are just ignored here > my ( $notissued, $reserved ); > ( $notissued ) = $dbh->selectrow_array( $issue_qry, undef, > ( $biblionumber ) ); >- if( $notissued == 0 ) { >+ if( $notissued == 0 or $hold_fee_mode eq 'issued_or_reserved' ) { > # all items are issued > ( $reserved ) = $dbh->selectrow_array( $holds_qry, undef, > ( $biblionumber, $borrowernumber ) ); >- $fee = 0 if $reserved == 0; >+ if ( $reserved == 0 and $hold_fee_mode eq 'not_always' ) { >+ # no reserves are placed >+ $fee = 0; >+ } > } else { > $fee = 0; > } >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 e025fc6e9d0..7e6ad30f799 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 >@@ -1124,6 +1124,7 @@ Circulation: > choices: > any_time_is_placed: "any time a hold is placed." > not_always: "only if all items are checked out and the record has at least one hold already." >+ issued_or_reserved: "either if all items are checked out, or the record has at least one hold already." > any_time_is_collected: "any time a hold is collected." > - > - pref: useDefaultReplacementCost >-- >2.20.1
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 32142
:
143452
|
143453
|
143598
|
143817
|
143818
|
153251
|
153286
|
153287
|
159070
|
159071
|
162626
|
162627
|
172117