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 187-193 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
187
('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'),
187
('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'),
188
('MaxItemsForBatch','1000',NULL,'Max number of items record to process in a batch (modification or deletion)','Integer'),
188
('MaxItemsForBatch','1000',NULL,'Max number of items record to process in a batch (modification or deletion)','Integer'),
189
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
189
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
190
('maxoutstanding','5','','maximum amount withstanding to be able make holds','Integer'),
190
('FeesBlockHoldsAmount','5','','maximum amount withstanding to be able make holds','Integer'),
191
('maxRecordsForFacets','20',NULL,NULL,'Integer'),
191
('maxRecordsForFacets','20',NULL,NULL,'Integer'),
192
('maxreserves','50','','Define maximum number of holds a patron can place','Integer'),
192
('maxreserves','50','','Define maximum number of holds a patron can place','Integer'),
193
('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'),
193
('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'),
(-)a/installer/data/mysql/updatedatabase.pl (+8 lines)
Lines 8577-8582 if ( CheckVersion($DBversion) ) { Link Here
8577
    SetVersion ($DBversion);
8577
    SetVersion ($DBversion);
8578
}
8578
}
8579
8579
8580
$DBversion = "3.17.00.XXX";
8581
if ( CheckVersion($DBversion) ) {
8582
    $dbh->do("UPDATE systempreferences SET variable = 'FeesBlockHoldsAmount' WHERE variable = 'maxoutstanding'");
8583
    print "Upgrade to $DBversion done (Bug 10446 - System preference maxoutstanding is poorly named)\n";
8584
    SetVersion($DBversion);
8585
}
8586
8587
8580
=head1 FUNCTIONS
8588
=head1 FUNCTIONS
8581
8589
8582
=head2 TableExists($table)
8590
=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 297-305 if ( $query->param('place_reserve') ) { Link Here
297
#
297
#
298
#
298
#
299
my $noreserves     = 0;
299
my $noreserves     = 0;
300
my $maxoutstanding = C4::Context->preference("maxoutstanding");
300
my $FeesBlockHoldsAmount = C4::Context->preference("FeesBlockHoldsAmount");
301
$template->param( noreserve => 1 ) unless $maxoutstanding;
301
$template->param( noreserve => 1 ) unless $FeesBlockHoldsAmount;
302
if ( $borr->{'amountoutstanding'} && ($borr->{'amountoutstanding'} > $maxoutstanding) ) {
302
if ( $borr->{'amountoutstanding'} && ($borr->{'amountoutstanding'} > $FeesBlockHoldsAmount) ) {
303
    my $amount = sprintf "\$%.02f", $borr->{'amountoutstanding'};
303
    my $amount = sprintf "\$%.02f", $borr->{'amountoutstanding'};
304
    $template->param( message => 1 );
304
    $template->param( message => 1 );
305
    $noreserves = 1;
305
    $noreserves = 1;
306
- 

Return to bug 10446