View | Details | Raw Unified | Return to bug 10446
Collapse All | Expand All

(-)a/C4/SIP/ILS/Patron.pm (-1 / +1 lines)
Lines 349-355 sub excessive_fines { Link Here
349
sub holds_blocked_by_excessive_fees {
349
sub holds_blocked_by_excessive_fees {
350
    my $self = shift;
350
    my $self = shift;
351
    return ( $self->fee_amount
351
    return ( $self->fee_amount
352
          && $self->fee_amount > C4::Context->preference("maxoutstanding") );
352
          && $self->fee_amount > C4::Context->preference("FeesBlockHoldsAmount") );
353
}
353
}
354
    
354
    
355
sub library_name {
355
sub library_name {
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 179-185 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
179
('MaxFine',NULL,'','Maximum fine a patron can have for all late returns at one moment. Single item caps are specified in the circulation rules matrix.','Integer'),
179
('MaxFine',NULL,'','Maximum fine a patron can have for all late returns at one moment. Single item caps are specified in the circulation rules matrix.','Integer'),
180
('MaxItemsForBatch','1000',NULL,'Max number of items record to process in a batch (modification or deletion)','Integer'),
180
('MaxItemsForBatch','1000',NULL,'Max number of items record to process in a batch (modification or deletion)','Integer'),
181
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
181
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
182
('maxoutstanding','5','','maximum amount withstanding to be able make holds','Integer'),
182
('FeesBlockHoldsAmount','5','','maximum amount withstanding to be able make holds','Integer'),
183
('maxRecordsForFacets','20',NULL,NULL,'Integer'),
183
('maxRecordsForFacets','20',NULL,NULL,'Integer'),
184
('maxreserves','50','','Define maximum number of holds a patron can place','Integer'),
184
('maxreserves','50','','Define maximum number of holds a patron can place','Integer'),
185
('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'),
185
('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'),
(-)a/installer/data/mysql/updatedatabase.pl (+7 lines)
Lines 8083-8088 if ( CheckVersion($DBversion) ) { Link Here
8083
    SetVersion($DBversion);
8083
    SetVersion($DBversion);
8084
}
8084
}
8085
8085
8086
$DBversion = "3.15.00.XXX";
8087
if ( CheckVersion($DBversion) ) {
8088
    $dbh->do("UPDATE systempreferences SET variable = 'FeesBlockHoldsAmount' WHERE variable = 'maxoutstanding'");
8089
    print "Upgrade to $DBversion done (Bug 10446 - System preference maxoutstanding is poorly named)\n";
8090
    SetVersion($DBversion);
8091
}
8092
8086
=head1 FUNCTIONS
8093
=head1 FUNCTIONS
8087
8094
8088
=head2 TableExists($table)
8095
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +1 lines)
Lines 260-266 Circulation: Link Here
260
            - a renewal notice according to patron checkout alert preferences.
260
            - a renewal notice according to patron checkout alert preferences.
261
        -
261
        -
262
            - Prevent patrons from making holds on the OPAC if they owe more than
262
            - Prevent patrons from making holds on the OPAC if they owe more than
263
            - pref: maxoutstanding
263
            - pref: FeesBlockHoldsAmount
264
              class: currency
264
              class: currency
265
            - '[% local_currency %] in fines.'
265
            - '[% local_currency %] in fines.'
266
        -
266
        -
(-)a/opac/opac-reserve.pl (-4 / +3 lines)
Lines 285-293 if ( $query->param('place_reserve') ) { Link Here
285
#
285
#
286
#
286
#
287
my $noreserves     = 0;
287
my $noreserves     = 0;
288
my $maxoutstanding = C4::Context->preference("maxoutstanding");
288
my $FeesBlockHoldsAmount = C4::Context->preference("FeesBlockHoldsAmount");
289
$template->param( noreserve => 1 ) unless $maxoutstanding;
289
$template->param( noreserve => 1 ) unless $FeesBlockHoldsAmount;
290
if ( $borr->{'amountoutstanding'} && ($borr->{'amountoutstanding'} > $maxoutstanding) ) {
290
if ( $borr->{'amountoutstanding'} && ($borr->{'amountoutstanding'} > $FeesBlockHoldsAmount) ) {
291
    my $amount = sprintf "\$%.02f", $borr->{'amountoutstanding'};
291
    my $amount = sprintf "\$%.02f", $borr->{'amountoutstanding'};
292
    $template->param( message => 1 );
292
    $template->param( message => 1 );
293
    $noreserves = 1;
293
    $noreserves = 1;
294
- 

Return to bug 10446