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

(-)a/installer/data/mysql/atomicupdate/bug_14048_refundlostitemfeeonreturn.perl (+31 lines)
Line 0 Link Here
1
$DBversion = "16.06.00.XXX";
2
if ( CheckVersion($DBversion) ) {
3
    $dbh->do(q{
4
        CREATE TABLE `refund_lost_item_fee_rules` (
5
		  `branchcode` varchar(10) NOT NULL default '',
6
		  `refund` tinyint(1) NOT NULL default 0,
7
		  PRIMARY KEY  (`branchcode`)
8
		) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
9
    });
10
    $dbh->do(q{
11
        INSERT IGNORE INTO systempreferences (variable,value,explanation,options,type)
12
        VALUES( 'RefundLostOnReturnControl',
13
                'CheckinLibrary',
14
                'If a lost item is returned, choose which branch to pick rules for refunding.',
15
                'CheckinLibrary|PatronLibrary|ItemHomeBranch|ItemHoldingbranch',
16
                'Choice')
17
    });
18
    # Pick the old syspref as the default rule
19
    $dbh->do(q{
20
        INSERT INTO refund_lost_item_fee_rules (branchcode,refund)
21
            SELECT '*', value FROM systempreferences WHERE variable='RefundLostItemFeeOnReturn'
22
    });
23
    # Delete the old syspref
24
    $dbh->do(q{
25
        DELETE IGNORE FROM systempreferences
26
        WHERE variable='RefundLostItemFeeOnReturn'
27
    });
28
29
    print "Upgrade to $DBversion done (Bug 14048: Change RefundLostItemFeeOnReturn to be branch specific)\n";
30
    SetVersion($DBversion);
31
}
(-)a/installer/data/mysql/sysprefs.sql (-1 / +1 lines)
Lines 398-404 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
398
('QuoteOfTheDay','0',NULL,'Enable or disable display of Quote of the Day on the OPAC home page','YesNo'),
398
('QuoteOfTheDay','0',NULL,'Enable or disable display of Quote of the Day on the OPAC home page','YesNo'),
399
('RandomizeHoldsQueueWeight','0',NULL,'if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight','YesNo'),
399
('RandomizeHoldsQueueWeight','0',NULL,'if ON, the holds queue in circulation will be randomized, either based on all location codes, or by the location codes specified in StaticHoldsQueueWeight','YesNo'),
400
('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'),
400
('RecordLocalUseOnReturn','0',NULL,'If ON, statistically record returns of unissued items as local use, instead of return','YesNo'),
401
('RefundLostItemFeeOnReturn','1',NULL,'If enabled, the lost item fee charged to a borrower will be refunded when the lost item is returned.','YesNo'),
401
('RefundLostOnReturnControl','CheckinLibrary','CheckinLibrary|PatronLibrary|ItemHomeBranch|ItemHoldingbranch','If a lost item is returned, choose which branch to pick rules for refunding.','Choice'),
402
('RenewalPeriodBase','date_due','date_due|now','Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal ','Choice'),
402
('RenewalPeriodBase','date_due','date_due|now','Set whether the renewal date should be counted from the date_due or from the moment the Patron asks for renewal ','Choice'),
403
('RenewalSendNotice','0','',NULL,'YesNo'),
403
('RenewalSendNotice','0','',NULL,'YesNo'),
404
('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'),
404
('RenewSerialAddsSuggestion','0',NULL,'If ON, adds a new suggestion at serial subscription renewal','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (-5 / +6 lines)
Lines 654-664 Circulation: Link Here
654
            - fines (when <code>misc/cronjobs/fines.pl</code> is being run).
654
            - fines (when <code>misc/cronjobs/fines.pl</code> is being run).
655
            - <br><b>Note:</b> Fines can also be charged by the CalculateFinesOnReturn system preference.
655
            - <br><b>Note:</b> Fines can also be charged by the CalculateFinesOnReturn system preference.
656
        -
656
        -
657
            - pref: RefundLostItemFeeOnReturn
657
            - If a lost item is returned, apply the refunding rules defined in the
658
            - pref: RefundLostOnReturnControl
658
              choices:
659
              choices:
659
                  yes: Refund
660
                  CheckinLibrary: "check-in library."
660
                  no: "Don't refund"
661
                  PatronLibrary: "patron library."
661
            - lost item fees charged to a borrower when the lost item is returned.
662
                  ItemHomeBranch: "item home branch."
663
                  ItemHoldingbranch: "item holding branch."
662
        -
664
        -
663
            - pref: FinesIncludeGracePeriod
665
            - pref: FinesIncludeGracePeriod
664
              choices:
666
              choices:
665
- 

Return to bug 14048