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

(-)a/C4/SIP/ILS/Patron.pm (-1 / +1 lines)
Lines 351-357 sub excessive_fines { Link Here
351
sub holds_blocked_by_excessive_fees {
351
sub holds_blocked_by_excessive_fees {
352
    my $self = shift;
352
    my $self = shift;
353
    return ( $self->fee_amount
353
    return ( $self->fee_amount
354
          && $self->fee_amount > C4::Context->preference("maxoutstanding") );
354
          && $self->fee_amount > C4::Context->preference("FeesBlockHoldsAmount") );
355
}
355
}
356
    
356
    
357
sub library_name {
357
sub library_name {
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 189-195 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
189
('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'),
189
('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'),
190
('MaxItemsForBatch','1000',NULL,'Max number of items record to process in a batch (modification or deletion)','Integer'),
190
('MaxItemsForBatch','1000',NULL,'Max number of items record to process in a batch (modification or deletion)','Integer'),
191
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
191
('maxItemsInSearchResults','20',NULL,'Specify the maximum number of items to display for each result on a page of results','free'),
192
('maxoutstanding','5','','maximum amount withstanding to be able make holds','Integer'),
192
('FeesBlockHoldsAmount','5','','maximum amount withstanding to be able make holds','Integer'),
193
('maxRecordsForFacets','20',NULL,NULL,'Integer'),
193
('maxRecordsForFacets','20',NULL,NULL,'Integer'),
194
('maxreserves','50','','Define maximum number of holds a patron can place','Integer'),
194
('maxreserves','50','','Define maximum number of holds a patron can place','Integer'),
195
('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'),
195
('minPasswordLength','3',NULL,'Specify the minimum length of a patron/staff password','free'),
(-)a/installer/data/mysql/updatedatabase.pl (+8 lines)
Lines 8845-8850 if ( CheckVersion($DBversion) ) { Link Here
8845
   SetVersion ($DBversion);
8845
   SetVersion ($DBversion);
8846
}
8846
}
8847
8847
8848
$DBversion = "3.17.00.XXX";
8849
if ( CheckVersion($DBversion) ) {
8850
    $dbh->do("UPDATE systempreferences SET variable = 'FeesBlockHoldsAmount' WHERE variable = 'maxoutstanding'");
8851
    print "Upgrade to $DBversion done (Bug 10446 - System preference maxoutstanding is poorly named)\n";
8852
    SetVersion($DBversion);
8853
}
8854
8855
8848
=head1 FUNCTIONS
8856
=head1 FUNCTIONS
8849
8857
8850
=head2 TableExists($table)
8858
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +1 lines)
Lines 267-273 Circulation: Link Here
267
            - a renewal notice according to patron checkout alert preferences.
267
            - a renewal notice according to patron checkout alert preferences.
268
        -
268
        -
269
            - Prevent patrons from making holds on the OPAC if they owe more than
269
            - Prevent patrons from making holds on the OPAC if they owe more than
270
            - pref: maxoutstanding
270
            - pref: FeesBlockHoldsAmount
271
              class: currency
271
              class: currency
272
            - '[% local_currency %] in fines.'
272
            - '[% local_currency %] in fines.'
273
        -
273
        -
(-)a/opac/opac-reserve.pl (-5 / +4 lines)
Lines 298-307 if ( $query->param('place_reserve') ) { Link Here
298
#
298
#
299
#
299
#
300
my $noreserves     = 0;
300
my $noreserves     = 0;
301
my $maxoutstanding = C4::Context->preference("maxoutstanding");
301
my $FeesBlockHoldsAmount = C4::Context->preference("FeesBlockHoldsAmount");
302
$template->param( noreserve => 1 ) unless $maxoutstanding;
302
$template->param( noreserve => 1 ) unless $FeesBlockHoldsAmount;
303
if ( $borr->{'amountoutstanding'} && ($borr->{'amountoutstanding'} > $maxoutstanding) ) {
303
if ( $borr->{'amountoutstanding'} && ($borr->{'amountoutstanding'} > $FeesBlockHoldsAmount) ) {
304
    my $amount = sprintf "%.02f", $borr->{'amountoutstanding'};
304
    my $amount = sprintf "\$%.02f", $borr->{'amountoutstanding'};
305
    $template->param( message => 1 );
305
    $template->param( message => 1 );
306
    $noreserves = 1;
306
    $noreserves = 1;
307
    $template->param( too_much_oweing => $amount );
307
    $template->param( too_much_oweing => $amount );
308
- 

Return to bug 10446