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

(-)a/C4/Circulation.pm (-5 / +12 lines)
Lines 730-746 sub CanBookBeIssued { Link Here
730
    # DEBTS
730
    # DEBTS
731
    my ($amount) =
731
    my ($amount) =
732
      C4::Members::GetMemberAccountRecords( $borrower->{'borrowernumber'}, '' && $duedate->output('iso') );
732
      C4::Members::GetMemberAccountRecords( $borrower->{'borrowernumber'}, '' && $duedate->output('iso') );
733
    my $amountlimit = C4::Context->preference("noissuescharge");
734
    my $allowfineoverride = C4::Context->preference("AllowFineOverride");
735
    my $allfinesneedoverride = C4::Context->preference("AllFinesNeedOverride");
733
    if ( C4::Context->preference("IssuingInProcess") ) {
736
    if ( C4::Context->preference("IssuingInProcess") ) {
734
        my $amountlimit = C4::Context->preference("noissuescharge");
737
        if ( $amount > $amountlimit && !$inprocess && !$allowfineoverride) {
735
        if ( $amount > $amountlimit && !$inprocess ) {
736
            $issuingimpossible{DEBT} = sprintf( "%.2f", $amount );
738
            $issuingimpossible{DEBT} = sprintf( "%.2f", $amount );
737
        }
739
        } elsif ( $amount > $amountlimit && !$inprocess && $allowfineoverride) {
738
        elsif ( $amount > 0 && $amount <= $amountlimit && !$inprocess ) {
740
            $needsconfirmation{DEBT} = sprintf( "%.2f", $amount );
741
        } elsif ( $allfinesneedoverride && $amount > 0 && $amount <= $amountlimit && !$inprocess ) {
739
            $needsconfirmation{DEBT} = sprintf( "%.2f", $amount );
742
            $needsconfirmation{DEBT} = sprintf( "%.2f", $amount );
740
        }
743
        }
741
    }
744
    }
742
    else {
745
    else {
743
        if ( $amount > 0 ) {
746
        if ( $amount > $amountlimit && $allowfineoverride ) {
747
            $needsconfirmation{DEBT} = sprintf( "%.2f", $amount );
748
        } elsif ( $amount > $amountlimit && !$allowfineoverride) {
749
            $issuingimpossible{DEBT} = sprintf( "%.2f", $amount );
750
        } elsif ( $amount > 0 && $allfinesneedoverride ) {
744
            $needsconfirmation{DEBT} = sprintf( "%.2f", $amount );
751
            $needsconfirmation{DEBT} = sprintf( "%.2f", $amount );
745
        }
752
        }
746
    }
753
    }
(-)a/C4/Members.pm (-1 / +1 lines)
Lines 444-450 sub patronflags { Link Here
444
        my $noissuescharge = C4::Context->preference("noissuescharge") || 5;
444
        my $noissuescharge = C4::Context->preference("noissuescharge") || 5;
445
        $flaginfo{'message'} = sprintf "Patron owes \$%.02f", $amount;
445
        $flaginfo{'message'} = sprintf "Patron owes \$%.02f", $amount;
446
        $flaginfo{'amount'}  = sprintf "%.02f", $amount;
446
        $flaginfo{'amount'}  = sprintf "%.02f", $amount;
447
        if ( $amount > $noissuescharge ) {
447
        if ( $amount > $noissuescharge && !C4::Context->preference("AllowFineOverride") ) {
448
            $flaginfo{'noissues'} = 1;
448
            $flaginfo{'noissues'} = 1;
449
        }
449
        }
450
        $flags{'CHARGES'} = \%flaginfo;
450
        $flags{'CHARGES'} = \%flaginfo;
(-)a/installer/data/mysql/de-DE/mandatory/sysprefs.sql (+2 lines)
Lines 285-287 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
285
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
285
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
286
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
286
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
287
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
287
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
288
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
289
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
(-)a/installer/data/mysql/en/mandatory/sysprefs.sql (+2 lines)
Lines 285-287 INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES Link Here
285
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
285
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
286
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
286
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
287
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
287
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
288
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
289
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
(-)a/installer/data/mysql/fr-FR/1-Obligatoire/unimarc_standard_systemprefs.sql (-1 / +3 lines)
Lines 286-289 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
286
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
286
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
287
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
287
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
288
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
288
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
289
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
289
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
290
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
291
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
(-)a/installer/data/mysql/it-IT/necessari/sysprefs.sql (-1 / +3 lines)
Lines 271-274 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
271
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
271
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
272
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
272
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
273
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
273
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
274
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
274
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
275
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
276
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
(-)a/installer/data/mysql/pl-PL/mandatory/sysprefs.sql (-1 / +3 lines)
Lines 283-286 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
283
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
283
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
284
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
284
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
285
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
285
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
286
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
286
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
287
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
288
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
(-)a/installer/data/mysql/ru-RU/mandatory/system_preferences_full_optimal_for_install_only.sql (-1 / +3 lines)
Lines 338-341 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
338
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
338
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
339
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
339
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
340
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
340
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
341
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
341
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
342
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
343
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
(-)a/installer/data/mysql/uk-UA/mandatory/system_preferences_full_optimal_for_install_only.sql (-1 / +3 lines)
Lines 363-366 INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES(' Link Here
363
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
363
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('OpacPublic',1,'Turn on/off public OPAC',NULL,'YesNo');
364
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
364
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesLocation','1','Use the item location when finding items for the shelf browser.','1','YesNo');
365
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
365
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesHomeBranch','1','Use the item home branch when finding items for the shelf browser.','1','YesNo');
366
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
366
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('ShelfBrowserUsesCcode','1','Use the item collection code when finding items for the shelf browser.','0','YesNo');
367
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo');
368
INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+8 lines)
Lines 4014-4019 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
4014
    SetVersion ($DBversion);
4014
    SetVersion ($DBversion);
4015
}
4015
}
4016
4016
4017
$DBversion = '3.03.00.XXX';
4018
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
4019
    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllowFineOverride','0','If on, staff will be able to issue books to patrons with fines greater than noissuescharge.','0','YesNo')");
4020
    $dbh->do("INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES ('AllFinesNeedOverride','1','If on, staff will be asked to override every fine, even if it is below noissuescharge.','0','YesNo')");
4021
    print "Upgrade to $DBversion done (Bug 5811: Add sysprefs controlling overriding fines)\n";
4022
    SetVersion($DBversion);
4023
};
4024
4017
=head1 FUNCTIONS
4025
=head1 FUNCTIONS
4018
4026
4019
=head2 DropAllForeignKeys($table)
4027
=head2 DropAllForeignKeys($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +12 lines)
Lines 86-91 Circulation: Link Here
86
                  no: "Don't allow"
86
                  no: "Don't allow"
87
            - staff to manually override the renewal limit and renew a checkout when it would go over the renewal limit.
87
            - staff to manually override the renewal limit and renew a checkout when it would go over the renewal limit.
88
        -
88
        -
89
            - pref: AllFinesNeedOverride
90
              choices:
91
                  yes: Require
92
                  no: "Don't require"
93
            - staff to manually override all fines, even fines less than noissuescharge.
94
        -
95
            - pref: AllowFineOverride
96
              choices:
97
                  yes: Allow
98
                  no: "Don't allow"
99
            - staff to manually override and check out items to patrons who have more than noissuescharge in fines.
100
        -
89
            - pref: InProcessingToShelvingCart
101
            - pref: InProcessingToShelvingCart
90
              choices:
102
              choices:
91
                  yes: Move
103
                  yes: Move
92
- 

Return to bug 5811