From: Moritz Bunkus Date: Thu, 5 Feb 2015 08:59:30 +0000 (+0100) Subject: CreatePeriodicInvoices-Job: for anstelle von map für reine Nebeneffekt-Schleifen X-Git-Tag: release-3.2.0~52 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5142ae5c5b94f8d1c7784b1ec97c870d086da21e;p=kivitendo-erp.git CreatePeriodicInvoices-Job: for anstelle von map für reine Nebeneffekt-Schleifen --- 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;