X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FBackgroundJob%2FCreatePeriodicInvoices.pm;h=22f9bf985eaa84cb018475bfa4d3b5351ec287f7;hb=c7b0defb2a90a8eaa28b9e58ac3c108c27375a77;hp=36dcb1ba76f45d9272d355a4b34c7e9ee203b898;hpb=460412a025e6a2c826d66ff18f94d4afd4b6559b;p=kivitendo-erp.git diff --git a/SL/BackgroundJob/CreatePeriodicInvoices.pm b/SL/BackgroundJob/CreatePeriodicInvoices.pm index 36dcb1ba7..22f9bf985 100644 --- a/SL/BackgroundJob/CreatePeriodicInvoices.pm +++ b/SL/BackgroundJob/CreatePeriodicInvoices.pm @@ -205,7 +205,7 @@ sub _create_periodic_invoice { my $order = $config->order; my $invoice; - if (!$self->{db_obj}->db->do_transaction(sub { + if (!$self->{db_obj}->db->with_transaction(sub { 1; # make Emacs happy $invoice = SL::DB::Invoice->new_from($order); @@ -254,6 +254,8 @@ sub _create_periodic_invoice { _log_msg("_create_invoice created for period start date $period_start_date id " . $invoice->id . " number " . $invoice->invnumber . " netamount " . $invoice->netamount . " amount " . $invoice->amount); # die $invoice->transaction_description; + + 1; })) { $::lxdebug->message(LXDebug->WARN(), "_create_invoice failed: " . join("\n", (split(/\n/, $self->{db_obj}->db->error))[0..2])); return undef;