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

(-)a/C4/Circulation.pm (-1 / +3 lines)
Lines 1785-1791 sub AddReturn { Link Here
1785
        }
1785
        }
1786
1786
1787
        if ($borrowernumber) {
1787
        if ($borrowernumber) {
1788
        if($issue->{'overdue'}){
1788
        if( C4::Context->preference('CalculateFinesOnReturn') && $issue->{'overdue'}){
1789
            # we only need to calculate and change the fines if we want to do that on return
1790
            # Should be on for hourly loans
1789
                my ( $amount, $type, $unitcounttotal ) = C4::Overdues::CalcFine( $item, $borrower->{categorycode},$branch, $datedue, $today );
1791
                my ( $amount, $type, $unitcounttotal ) = C4::Overdues::CalcFine( $item, $borrower->{categorycode},$branch, $datedue, $today );
1790
                $type ||= q{};
1792
                $type ||= q{};
1791
        if ( $amount > 0 && ( C4::Context->preference('finesMode') eq 'production' )) {
1793
        if ( $amount > 0 && ( C4::Context->preference('finesMode') eq 'production' )) {
(-)a/installer/data/mysql/sysprefs.sql (+1 lines)
Lines 424-426 INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES(' Link Here
424
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('HighlightOwnItemsOnOPAC','0','','If on, and a patron is logged into the OPAC, items from his or her home library will be emphasized and shown first in search results and item details.','YesNo');
424
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('HighlightOwnItemsOnOPAC','0','','If on, and a patron is logged into the OPAC, items from his or her home library will be emphasized and shown first in search results and item details.','YesNo');
425
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch''s items to emphasize. If PatronBranch, emphasize the logged in user''s library''s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha''s Apache configuration file.','Choice');
425
INSERT INTO systempreferences (variable,value,options,explanation,type) VALUES ('HighlightOwnItemsOnOPACWhich','PatronBranch','PatronBranch|OpacURLBranch','Decides which branch''s items to emphasize. If PatronBranch, emphasize the logged in user''s library''s items. If OpacURLBranch, highlight the items of the Apache var BRANCHCODE defined in Koha''s Apache configuration file.','Choice');
426
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UniqueItemFields', 'barcode', 'Space-separated list of fields that should be unique (used in acquisition module for item creation). Fields must be valid SQL column names of items table', '', 'Free');
426
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('UniqueItemFields', 'barcode', 'Space-separated list of fields that should be unique (used in acquisition module for item creation). Fields must be valid SQL column names of items table', '', 'Free');
427
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
(-)a/installer/data/mysql/updatedatabase.pl (+15 lines)
Lines 6834-6839 if (C4::Context->preference("Version") < TransformToNum($DBversion)) { Link Here
6834
    SetVersion($DBversion);
6834
    SetVersion($DBversion);
6835
}
6835
}
6836
6836
6837
6838
$DBversion = "XXX";
6839
if ( CheckVersion($DBversion) ) {
6840
    $dbh->do(
6841
        q{
6842
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
6843
}
6844
    );
6845
    print
6846
"Upgrade to $DBversion done (Bug 10120 - Fines on item return controlled by a systempreference)\n";
6847
    SetVersion($DBversion);
6848
}
6849
6850
6851
6837
=head1 FUNCTIONS
6852
=head1 FUNCTIONS
6838
6853
6839
=head2 TableExists($table)
6854
=head2 TableExists($table)
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-1 / +7 lines)
Lines 319-324 Circulation: Link Here
319
                  yes: Block
319
                  yes: Block
320
                  no: "Don't block"
320
                  no: "Don't block"
321
            - returning of items that have been withdrawn.
321
            - returning of items that have been withdrawn.
322
        -
323
            - pref: CalculateFinesOnReturn
324
              choices:
325
                  yes: Do
326
                  no: "Don't"
327
            - calculate and update overdue charges when an item is returned.
328
            - <br /><b>NOTE If you are doing hourly loans then you should have this on.</b>
322
    Holds Policy:
329
    Holds Policy:
323
        -
330
        -
324
            - pref: AllowHoldPolicyOverride
331
            - pref: AllowHoldPolicyOverride
325
- 

Return to bug 10120