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 (+12 lines)
Lines 6778-6783 if ( CheckVersion($DBversion) ) { Link Here
6778
    SetVersion ($DBversion);
6778
    SetVersion ($DBversion);
6779
}
6779
}
6780
6780
6781
$DBversion = "XXX";
6782
if ( CheckVersion($DBversion) ) {
6783
    $dbh->do(
6784
        q{
6785
INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES ('CalculateFinesOnReturn','1','Switch to control if overdue fines are calculated on return or not', '', 'YesNo');
6786
}
6787
    );
6788
    print
6789
"Upgrade to $DBversion done (Bug 10120 - Fines on item return controlled by a systempreference)\n";
6790
    SetVersion($DBversion);
6791
}
6792
6781
6793
6782
=head1 FUNCTIONS
6794
=head1 FUNCTIONS
6783
6795
(-)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