Bug 17600: Standardize our EXPORT_OK
[srvgit] / misc / cronjobs / notice_unprocessed_suggestions.pl
index 055315c..6567c35 100755 (executable)
@@ -2,12 +2,12 @@
 
 use Modern::Perl;
 
-use Pod::Usage;
-use Getopt::Long;
+use Pod::Usage qw( pod2usage );
+use Getopt::Long qw( GetOptions );
 
 use Koha::Script -cron;
-use C4::Budgets qw( GetBudget );
-use C4::Suggestions qw( GetUnprocessedSuggestions );
+use C4::Budgets;
+use C4::Suggestions;
 use Koha::Libraries;
 use Koha::Patrons;
 
@@ -48,9 +48,6 @@ for my $number_of_days (@days) {
         my $budget = C4::Budgets::GetBudget( $suggestion->{budgetid} );
         my $patron = Koha::Patrons->find( $budget->{budget_owner_id} );
         my $email_address = $patron->notice_email_address;
-        my $library = $patron->library;
-        my $admin_email_address = $library->branchemail
-          || C4::Context->preference('KohaAdminEmailAddress');
 
         if ($email_address) {
             say "Patron " . $patron->borrowernumber . " is going to be notified" if $verbose;
@@ -70,8 +67,7 @@ for my $number_of_days (@days) {
                     {
                         letter                 => $letter,
                         borrowernumber         => $patron->borrowernumber,
-                        message_transport_type => 'email',
-                        from_address           => $admin_email_address,
+                        message_transport_type => 'email'
                     }
                 );
             }