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>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
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;
SetVersion ($DBversion);
}
+$DBversion = "3.17.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 (Bug 12205: Add HoldsInNoissuesCharge systempreference)\n";
+ SetVersion($DBversion);
+}
+
+
=head1 FUNCTIONS
=head2 TableExists($table)
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