Bugzilla – Attachment 28762 Details for
Bug 12205
It should be possible for Holds charges to count towards blocking checkout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12205 : Add a system preference allowing hold charges to block circ
Bug-12205--Add-a-system-preference-allowing-hold-c.patch (text/plain), 3.21 KB, created by
Biblibre Sandboxes
on 2014-06-11 02:53:07 UTC
(
hide
)
Description:
Bug 12205 : Add a system preference allowing hold charges to block circ
Filename:
MIME Type:
Creator:
Biblibre Sandboxes
Created:
2014-06-11 02:53:07 UTC
Size:
3.21 KB
patch
obsolete
>From 5a84b97a8cf79a78ffb66cd416a2a93af61e849c Mon Sep 17 00:00:00 2001 >From: Chris Cormack <chrisc@catalyst.net.nz> >Date: Wed, 7 May 2014 10:15:20 +1200 >Subject: [PATCH] Bug 12205 : Add a system preference allowing hold charges to block circ > >Currently, if you have holds charges, they are not taken into >consideration when circulating items. > >Manual Invoices, and rental charges are governed by a systempreference > >Holds are never counted > >And all other charges (overdues, lost items etc) are counted > >This patch adds a systempreference to allow Hold charges to be counted >as well. > >To test > >1/ Set a borrower category to have holds charges >2/ Place a hold for a borrower in that category >3/ Go to checkout, notice that charge is not showing or blocking on >that screen >4/ apply patch >5/ notice that charge now shows on checkout > >Signed-off-by: Nick Clemens <nick@quecheelibrary.org> >--- > C4/Members.pm | 3 ++- > installer/data/mysql/updatedatabase.pl | 8 ++++++++ > .../en/modules/admin/preferences/circulation.pref | 6 ++++++ > 3 files changed, 16 insertions(+), 1 deletions(-) > >diff --git a/C4/Members.pm b/C4/Members.pm >index 61eb2d9..fbfdffb 100644 >--- a/C4/Members.pm >+++ b/C4/Members.pm >@@ -1266,7 +1266,8 @@ sub GetMemberAccountBalance { > > my $ACCOUNT_TYPE_LENGTH = 5; # this is plain ridiculous... > >- my @not_fines = ('Res'); >+ my @not_fines; >+ push @not_fines, 'Res' unless C4::Context->preference('HoldsInNoissuesCharge'); > push @not_fines, 'Rent' unless C4::Context->preference('RentalsInNoissuesCharge'); > unless ( C4::Context->preference('ManInvInNoissuesCharge') ) { > my $dbh = C4::Context->dbh; >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 01472d7..41c70d0 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -8551,6 +8551,14 @@ if (CheckVersion($DBversion)) { > SetVersion($DBversion); > } > >+$DBversion = "3.15.00.XXX"; >+if ( CheckVersion($DBversion) ) { >+ $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('HoldsInNoissuesCharge', '0', 'Hold charges block checkouts (added to noissuescharge).',NULL,'YesNo');"); >+ print "Upgrade to $DBversion done (Add HoldsInNoissuesCharge systempreference)\n"; >+ SetVersion($DBversion); >+} >+ >+ > =head1 FUNCTIONS > > =head2 TableExists($table) >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 81065f9..abe7b22 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 >@@ -308,6 +308,12 @@ Circulation: > no: "Don't include" > - MANUAL_INV charges when summing up charges for noissuescharge. > - >+ - pref: HoldsInNoissuesCharge >+ choices: >+ yes: Include >+ no: "Don't include" >+ - hold charges when summing up charges for noissuescharge. >+ - > - pref: ReturnBeforeExpiry > choices: > yes: Require >-- >1.7.2.5
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 12205
:
28001
|
28762
|
28772
|
31321