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

(-)a/misc/cronjobs/overdue_notices.pl (-4 / +5 lines)
Lines 281-286 my $man = 0; Link Here
281
my $verbose = 0;
281
my $verbose = 0;
282
my $nomail  = 0;
282
my $nomail  = 0;
283
my $MAX     = 90;
283
my $MAX     = 90;
284
my $test_mode = 0;
284
my @branchcodes; # Branch(es) passed as parameter
285
my @branchcodes; # Branch(es) passed as parameter
285
my @emails_to_use;    # Emails to use for messaging
286
my @emails_to_use;    # Emails to use for messaging
286
my @emails;           # Emails given in command-line parameters
287
my @emails;           # Emails given in command-line parameters
Lines 307-312 GetOptions( Link Here
307
    'itemscontent=s' => \$itemscontent,
308
    'itemscontent=s' => \$itemscontent,
308
    'list-all'       => \$listall,
309
    'list-all'       => \$listall,
309
    't|triggered'    => \$triggered,
310
    't|triggered'    => \$triggered,
311
    'test'           => \$test_mode,
310
    'date=s'         => \$date_input,
312
    'date=s'         => \$date_input,
311
    'borcat=s'       => \@myborcat,
313
    'borcat=s'       => \@myborcat,
312
    'borcatout=s'    => \@myborcatout,
314
    'borcatout=s'    => \@myborcatout,
Lines 315-321 GetOptions( Link Here
315
pod2usage(1) if $help;
317
pod2usage(1) if $help;
316
pod2usage( -verbose => 2 ) if $man;
318
pod2usage( -verbose => 2 ) if $man;
317
319
318
cronlogaction();
320
cronlogaction() unless $test_mode;
319
321
320
if ( defined $csvfilename && $csvfilename =~ /^-/ ) {
322
if ( defined $csvfilename && $csvfilename =~ /^-/ ) {
321
    warn qq(using "$csvfilename" as filename, that seems odd);
323
    warn qq(using "$csvfilename" as filename, that seems odd);
Lines 600-606 END_SQL Link Here
600
                            type           => 'OVERDUES',
602
                            type           => 'OVERDUES',
601
                            comment => "OVERDUES_PROCESS " .  output_pref( dt_from_string() ),
603
                            comment => "OVERDUES_PROCESS " .  output_pref( dt_from_string() ),
602
                        }
604
                        }
603
                    );
605
                    ) unless $test_mode;
604
                    $verbose and warn "debarring $borr\n";
606
                    $verbose and warn "debarring $borr\n";
605
                }
607
                }
606
                my @params = ($borrowernumber);
608
                my @params = ($borrowernumber);
Lines 757-763 END_SQL Link Here
757
                                    from_address           => $admin_email_address,
759
                                    from_address           => $admin_email_address,
758
                                    to_address             => join(',', @emails_to_use),
760
                                    to_address             => join(',', @emails_to_use),
759
                                }
761
                                }
760
                            );
762
                            ) unless $test_mode;
761
                            # A print notice should be sent only once per overdue level.
763
                            # A print notice should be sent only once per overdue level.
762
                            # Without this check, a print could be sent twice or more if the library checks sms and email and print and the patron has no email or sms number.
764
                            # Without this check, a print could be sent twice or more if the library checks sms and email and print and the patron has no email or sms number.
763
                            $print_sent = 1 if $effective_mtt eq 'print';
765
                            $print_sent = 1 if $effective_mtt eq 'print';
764
- 

Return to bug 2389