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

(-)a/installer/data/mysql/atomicupdate/bug_18161-no-advance-notices-when-auto-renew-syspref.sql (+1 lines)
Line 0 Link Here
1
INSERT IGNORE INTO systempreferences (`variable`, `value`, `options`, `explanation`, `type`) VALUES ('NoAdvanceNoticeWhenAutoRenewal', '0', '', 'Disable advance notices when auto renew was used', 'YesNo');
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/circulation.pref (+6 lines)
Lines 260-265 Circulation: Link Here
260
                  Calendar: the calendar to skip all days the library is closed.
260
                  Calendar: the calendar to skip all days the library is closed.
261
                  Datedue: the calendar to push the due date to the next open day
261
                  Datedue: the calendar to push the due date to the next open day
262
        -
262
        -
263
            - pref: NoAdvanceNoticeWhenAutoRenewal
264
              choices:
265
                  yes: Do not send
266
                  no: Send
267
            - advance notice when loan was automatically renewable when issued.
268
        -
263
            - Calculate "No renewal before" based on
269
            - Calculate "No renewal before" based on
264
            - pref: NoRenewalBeforePrecision
270
            - pref: NoRenewalBeforePrecision
265
              choices:
271
              choices:
(-)a/misc/cronjobs/advance_notices.pl (-1 / +1 lines)
Lines 278-283 UPCOMINGITEM: foreach my $upcoming ( @$upcoming_dues ) { Link Here
278
                                                                                   message_name   => 'advance_notice' } );
278
                                                                                   message_name   => 'advance_notice' } );
279
        next UPCOMINGITEM unless $borrower_preferences && exists $borrower_preferences->{'days_in_advance'};
279
        next UPCOMINGITEM unless $borrower_preferences && exists $borrower_preferences->{'days_in_advance'};
280
        next UPCOMINGITEM unless $borrower_preferences->{'days_in_advance'} == $upcoming->{'days_until_due'};
280
        next UPCOMINGITEM unless $borrower_preferences->{'days_in_advance'} == $upcoming->{'days_until_due'};
281
        next UPCOMINGITEM if C4::Context->preference('NoAdvanceNoticeWhenAutoRenewal') && $upcoming->{'auto_renew'};
281
282
282
        if ( $borrower_preferences->{'wants_digest'} ) {
283
        if ( $borrower_preferences->{'wants_digest'} ) {
283
            # cache this one to process after we've run through all of the items.
284
            # cache this one to process after we've run through all of the items.
284
- 

Return to bug 18161