Revision b9436847
Von Jan Büren vor etwa 6 Jahren hinzugefügt
SL/BackgroundJob/CreatePeriodicInvoices.pm | ||
---|---|---|
28 | 28 |
$self->{db_obj} = shift; |
29 | 29 |
|
30 | 30 |
$self->{job_errors} = []; |
31 |
if (!$self->{db_obj}->db->with_transaction(sub { |
|
32 |
1; # make Emacs happy |
|
31 | 33 |
|
32 | 34 |
my $configs = SL::DB::Manager::PeriodicInvoicesConfig->get_all(query => [ active => 1 ]); |
33 | 35 |
|
... | ... | |
81 | 83 |
\@disabled_orders , |
82 | 84 |
); |
83 | 85 |
|
86 |
1; |
|
87 |
})) { |
|
88 |
$::lxdebug->message(LXDebug->WARN(), "_create_invoice failed: " . join("\n", (split(/\n/, $self->{db_obj}->db->error))[0..2])); |
|
89 |
return undef; |
|
90 |
} |
|
91 |
|
|
84 | 92 |
if (@{ $self->{job_errors} }) { |
85 | 93 |
my $msg = join "\n", @{ $self->{job_errors} }; |
86 | 94 |
_log_msg("Errors: $msg"); |
Auch abrufbar als: Unified diff
CreatePeriodicInvoices: Transaktionssicher
Aufträge verarbeiten, Rechnungen erzeugen, Drucken und E-Mail-Versand
in einer Transaktion