Revision 80db1ffd
Von Tamino Steinert vor 9 Monaten hinzugefügt
| SL/BackgroundJob/CreatePeriodicInvoices.pm | ||
|---|---|---|
|
use SL::Mailer;
|
||
|
use SL::Util qw(trim);
|
||
|
use SL::System::Process;
|
||
|
use SL::Locale::String qw(t8);
|
||
|
|
||
|
sub create_job {
|
||
|
$_[0]->create_standard_job('0 3 1 * *'); # first day of month at 3:00 am
|
||
| ... | ... | |
|
$invoice = SL::DB::Invoice->new_from($order, honor_recurring_billing_mode => 1);
|
||
|
|
||
|
my $intnotes = $invoice->intnotes ? $invoice->intnotes . "\n\n" : '';
|
||
|
$intnotes .= "Automatisch am " . DateTime->today_local->to_lxoffice . " erzeugte Rechnung";
|
||
|
$intnotes .= t8("Automatic created invoice on #1.", DateTime->today_local->to_lxoffice);
|
||
|
|
||
|
$invoice->assign_attributes(
|
||
|
intnotes => $intnotes,
|
||
| ... | ... | |
|
Iterate over all periodic invoice configurations, extend the end date if
|
||
|
applicable, get all open orders from the
|
||
|
|
||
|
=head1 TOTO
|
||
|
|
||
|
=over 4
|
||
|
|
||
|
=item *
|
||
|
|
||
|
Strings like month names are hardcoded to German in this file.
|
||
|
|
||
|
=back
|
||
|
|
||
|
=head1 AUTHOR
|
||
|
|
||
|
Moritz Bunkus E<lt>m.bunkus@linet-services.deE<gt>
|
||
Auch abrufbar als: Unified diff
S:B:CreatePeriodicInvoices: Übersetze hinzugefügte interne Notiz