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

(-)a/installer/data/mysql/atomicupdate/bug_31157.pl (+15 lines)
Line 0 Link Here
1
use Modern::Perl;
2
3
return {
4
    bug_number => "31157",
5
    description => "Add OverdueNoticeFrom preference",
6
    up => sub {
7
        my ($args) = @_;
8
        my ($dbh, $out) = @$args{qw(dbh out)};
9
10
        $dbh->do(q{
11
            INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES
12
                ('OverdueNoticeFrom', 'cron', 'cron|item-issuebranch|item-homebranch', 'Use the choice as the from address when generating overdue notices', 'Choice')
13
        });
14
    },
15
};
(-)a/installer/data/mysql/mandatory/sysprefs.sql (+1 lines)
Lines 519-524 INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` Link Here
519
('OverDrivePasswordRequired','0',NULL,'Does the library require passwords for OverDrive SIP authentication','YesNo'),
519
('OverDrivePasswordRequired','0',NULL,'Does the library require passwords for OverDrive SIP authentication','YesNo'),
520
('OverDriveUsername','cardnumber','cardnumber|userid','Which patron information should be passed as OverDrive username','Choice'),
520
('OverDriveUsername','cardnumber','cardnumber|userid','Which patron information should be passed as OverDrive username','Choice'),
521
('OverdueNoticeCalendar',0,NULL,'Take the calendar into consideration when generating overdue notices','YesNo'),
521
('OverdueNoticeCalendar',0,NULL,'Take the calendar into consideration when generating overdue notices','YesNo'),
522
('OverdueNoticeFrom', 'cron', 'cron|item-issuebranch|item-homebranch', 'Use the choice as the from address when generating overdue notices', 'Choice'),
522
('OverduesBlockCirc','noblock','noblock|confirmation|block','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','Choice'),
523
('OverduesBlockCirc','noblock','noblock|confirmation|block','When checking out an item should overdues block checkout, generate a confirmation dialogue, or allow checkout','Choice'),
523
('OverduesBlockRenewing','allow','allow|blockitem|block','If any of patron checked out documents is late, should renewal be allowed, blocked only on overdue items or blocked on whatever checked out document','Choice'),
524
('OverduesBlockRenewing','allow','allow|blockitem|block','If any of patron checked out documents is late, should renewal be allowed, blocked only on overdue items or blocked on whatever checked out document','Choice'),
524
('PassItemMarcToXSLT','0',NULL,'If enabled, item fields in the MARC record will be made avaiable to XSLT sheets. Otherwise they will be removed.','YesNo'),
525
('PassItemMarcToXSLT','0',NULL,'If enabled, item fields in the MARC record will be made avaiable to XSLT sheets. Otherwise they will be removed.','YesNo'),
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+8 lines)
Lines 407-412 Circulation: Link Here
407
                  1: "Use calendar"
407
                  1: "Use calendar"
408
                  0: "Ignore calendar"
408
                  0: "Ignore calendar"
409
            - "when working out the period for overdue notices."
409
            - "when working out the period for overdue notices."
410
        -
411
            - "Use the"
412
            - pref: OverdueNoticeFrom
413
              choices:
414
                  cron: "system default"
415
                  item-issuebranch: "checkout library"
416
                  item-homebranch: "item home library"
417
            - "as the from address when generating overdue notices."
410
        -
418
        -
411
            - Include up to
419
            - Include up to
412
            - pref: PrintNoticesMaxLines
420
            - pref: PrintNoticesMaxLines
(-)a/misc/cronjobs/overdue_notices.pl (-1 / +1 lines)
Lines 338-343 if ( defined $csvfilename && $csvfilename =~ /^-/ ) { Link Here
338
die "--frombranch takes item-homebranch or item-issuebranch only"
338
die "--frombranch takes item-homebranch or item-issuebranch only"
339
    unless ( $frombranch eq 'item-issuebranch'
339
    unless ( $frombranch eq 'item-issuebranch'
340
        || $frombranch eq 'item-homebranch' );
340
        || $frombranch eq 'item-homebranch' );
341
$frombranch = C4::Context->preference('OverdueNoticeFrom') ne 'cron' ? C4::Context->preference('OverdueNoticeFrom') : $frombranch;
341
my $owning_library = ( $frombranch eq 'item-homebranch' ) ? 1 : 0;
342
my $owning_library = ( $frombranch eq 'item-homebranch' ) ? 1 : 0;
342
343
343
my @overduebranches    = C4::Overdues::GetBranchcodesWithOverdueRules();    # Branches with overdue rules
344
my @overduebranches    = C4::Overdues::GetBranchcodesWithOverdueRules();    # Branches with overdue rules
344
- 

Return to bug 31157