From 0e5c060647cb76818bedd176c6fd32e9a658eaff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Mon, 2 Oct 2017 13:24:32 +0200 Subject: [PATCH] =?utf8?q?Wiederkehrende=20Auftr=C3=A4ge=20mit=20einmalige?= =?utf8?q?r=20Periode=20verbessert?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Die Deaktivierung erst nach der Generierung der Rechnung veranlassen. Andernfalls werden diese automatisch bei anderen Rechnungsläufen deaktiviert. --- SL/BackgroundJob/CreatePeriodicInvoices.pm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/SL/BackgroundJob/CreatePeriodicInvoices.pm b/SL/BackgroundJob/CreatePeriodicInvoices.pm index 055dd16f4..6d87fb6f2 100644 --- a/SL/BackgroundJob/CreatePeriodicInvoices.pm +++ b/SL/BackgroundJob/CreatePeriodicInvoices.pm @@ -61,11 +61,13 @@ sub run { push @invoices_to_print, $data if $config->print; push @invoices_to_email, $data if $config->send_email; + # disalbe one timer only, if they are already processed + # disable one time configs (periodicity is only one time). + my $inactive_ordnumber = $config->disable_one_time_config; + push @disabled_orders, $inactive_ordnumber if $inactive_ordnumber; + # last; } - # disable one time configs (periodicity is only one time). - my $inactive_ordnumber = $config->disable_one_time_config; - push @disabled_orders, $inactive_ordnumber if $inactive_ordnumber; } foreach my $inv ( @invoices_to_print ) { $self->_print_invoice($inv); } -- 2.20.1