X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/0e5c060647cb76818bedd176c6fd32e9a658eaff..c60cb1f08f:/SL/BackgroundJob/CreatePeriodicInvoices.pm diff --git a/SL/BackgroundJob/CreatePeriodicInvoices.pm b/SL/BackgroundJob/CreatePeriodicInvoices.pm index 6d87fb6f2..851bf3ff2 100644 --- a/SL/BackgroundJob/CreatePeriodicInvoices.pm +++ b/SL/BackgroundJob/CreatePeriodicInvoices.pm @@ -61,12 +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; + if ($inactive_ordnumber) { + # disable one time configs and skip eventual invoices + _log_msg("Order " . $inactive_ordnumber . " deavtivated \n"); + push @disabled_orders, $inactive_ordnumber; + last; + } } }