From 5142ae5c5b94f8d1c7784b1ec97c870d086da21e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Thu, 5 Feb 2015 09:59:30 +0100 Subject: [PATCH] =?utf8?q?CreatePeriodicInvoices-Job:=20for=20anstelle=20v?= =?utf8?q?on=20map=20f=C3=BCr=20reine=20Nebeneffekt-Schleifen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/BackgroundJob/CreatePeriodicInvoices.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/SL/BackgroundJob/CreatePeriodicInvoices.pm b/SL/BackgroundJob/CreatePeriodicInvoices.pm index 477702551..1abe8c36b 100644 --- a/SL/BackgroundJob/CreatePeriodicInvoices.pm +++ b/SL/BackgroundJob/CreatePeriodicInvoices.pm @@ -58,7 +58,7 @@ sub run { } } - map { _print_invoice(@{ $_ }) } @invoices_to_print; + _print_invoice(@{ $_ }) for @invoices_to_print; _send_email(\@new_invoices, [ map { $_->[0] } @invoices_to_print ]) if @new_invoices; @@ -154,10 +154,10 @@ sub _create_periodic_invoice { employee => $order->employee, # new_from sets employee to import user ); - map { _replace_vars($invoice, $time_period_vars, $_) } qw(notes intnotes transaction_description); + _replace_vars($invoice, $time_period_vars, $_) for qw(notes intnotes transaction_description); foreach my $item (@{ $invoice->items }) { - map { _replace_vars($item, $time_period_vars, $_) } qw(description longdescription); + _replace_vars($item, $time_period_vars, $_) for qw(description longdescription); } $invoice->post(ar_id => $config->ar_chart_id) || die; -- 2.20.1