$needsconfirmation{PATRON_CANT} = 1;
} else {
if($max_loans_allowed){
- $needsconfirmation{TOO_MANY} = 1;
- $needsconfirmation{current_loan_count} = $current_loan_count;
- $needsconfirmation{max_loans_allowed} = $max_loans_allowed;
+ if ( C4::Context->preference("AllowTooManyOverride") ) {
+ $needsconfirmation{TOO_MANY} = 1;
+ $needsconfirmation{current_loan_count} = $current_loan_count;
+ $needsconfirmation{max_loans_allowed} = $max_loans_allowed;
+ } else {
+ $issuingimpossible{TOO_MANY} = 1;
+ $issuingimpossible{current_loan_count} = $current_loan_count;
+ $issuingimpossible{max_loans_allowed} = $max_loans_allowed;
+ }
}
}
INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacHoldNotes',0,'Show hold notes on OPAC','','YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('AcqWarnOnDuplicateInvoice','0','Warn librarians when they try to create a duplicate invoice', '', 'YesNo');
+INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowTooManyOverride', '1', 'If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts', '', 'YesNo');
SetVersion($DBversion);
}
-
$DBversion = "3.13.00.012";
if ( CheckVersion($DBversion) ) {
$dbh->do("ALTER TABLE issuingrules MODIFY COLUMN overduefinescap decimal(28,6) DEFAULT NULL;");
SetVersion($DBversion);
}
+$DBversion ="3.13.00.XXX";
+if ( CheckVersion($DBversion) ) {
+ $dbh->do("INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type) VALUES ('AllowTooManyOverride', '1', 'If on, allow staff to override and check out items when the patron has reached the maximum number of allowed checkouts', '', 'YesNo');");
+ print "Upgrade to $DBversion done (Bug 9576 - Enable or disable issue limit confirmation)\n";
+ SetVersion($DBversion);
+}
+
=head1 FUNCTIONS
=head2 TableExists($table)
- (separate fields with space, e.g. 100a 200b 300c)
Checkout Policy:
+ -
+ - pref: AllowTooManyOverride
+ choices:
+ yes: Allow
+ no: "Don't allow"
+ - staff to override and check out items when the patron has reached the maximum number of allowed checkouts.
-
- pref: AllowNotForLoanOverride
choices:
<li>Patron's card is expired</li>
[% END %]
+ [% IF ( TOO_MANY ) %]
+ <li>Too many checked out. [% current_loan_count %] checked out, only [% max_loans_allowed %] are allowed.</li>
+ [% END %]
+
[% IF ( ITEMNOTSAMEBRANCH ) %]
<li>This item belongs to [% itemhomebranch %] and cannot be issued from this location.</li>
[% END %]