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

(-)a/misc/cronjobs/overdue_notices.pl (-21 / +21 lines)
Lines 742-767 END_SQL Link Here
742
                          );
742
                          );
743
                    } else {
743
                    } else {
744
                        # Just send a print only if not already done.
744
                        # Just send a print only if not already done.
745
                        unless ( $effective_mtt eq 'print' and $print_sent == 1 ) {
745
                        if ( $effective_mtt eq 'print' and not $print_sent ) {
746
                            if ( ($mtt eq 'email' and not scalar @emails_to_use) or ($mtt eq 'sms' and not $data->{smsalertnumber}) ) {
746
                            push @output_chunks,
747
                                push @output_chunks,
747
                              prepare_letter_for_printing(
748
                                  prepare_letter_for_printing(
748
                              {   letter         => $letter,
749
                                  {   letter         => $letter,
749
                                  borrowernumber => $borrowernumber,
750
                                      borrowernumber => $borrowernumber,
750
                                  firstname      => $data->{'firstname'},
751
                                      firstname      => $data->{'firstname'},
751
                                  lastname       => $data->{'surname'},
752
                                      lastname       => $data->{'surname'},
752
                                  address1       => $data->{'address'},
753
                                      address1       => $data->{'address'},
753
                                  address2       => $data->{'address2'},
754
                                      address2       => $data->{'address2'},
754
                                  city           => $data->{'city'},
755
                                      city           => $data->{'city'},
755
                                  postcode       => $data->{'zipcode'},
756
                                      postcode       => $data->{'zipcode'},
756
                                  country        => $data->{'country'},
757
                                      country        => $data->{'country'},
757
                                  email          => $notice_email,
758
                                      email          => $notice_email,
758
                                  itemcount      => $itemcount,
759
                                      itemcount      => $itemcount,
759
                                  titles         => $titles,
760
                                      titles         => $titles,
760
                                  outputformat   => defined $csvfilename ? 'csv' : defined $htmlfilename ? 'html' : defined $text_filename ? 'text' : '',
761
                                      outputformat   => defined $csvfilename ? 'csv' : defined $htmlfilename ? 'html' : defined $text_filename ? 'text' : '',
761
                                }
762
                                    }
762
                              );
763
                                  );
763
                        }
764
                            }
764
765
                        if ( $effective_mtt ne 'print' or not $print_sent ) {
765
                            C4::Letters::EnqueueLetter(
766
                            C4::Letters::EnqueueLetter(
766
                                {   letter                 => $letter,
767
                                {   letter                 => $letter,
767
                                    borrowernumber         => $borrowernumber,
768
                                    borrowernumber         => $borrowernumber,
768
- 

Return to bug 23357