Bug 31122: Terminology - Replace occurences of 'Notices & slips' with 'Notices and...
[srvgit] / misc / cronjobs / notice_unprocessed_suggestions.pl
index 55205a1..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'
                     }
                 );
             }
@@ -131,11 +127,17 @@ Copyright 2014 BibLibre
 
 This file is part of Koha.
 
-Koha is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software
-Foundation; either version 3 of the License, or (at your option) any later version.
-
-You should have received a copy of the GNU General Public License along
-with Koha; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Koha is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# Koha is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with Koha; if not, see <http://www.gnu.org/licenses>.
 
 =cut