X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/f48af81769e3a7da01d09ff63e61dbd09fe5ad2e..2b81e2ee23ded681761398619126081bffbd5120:/SL/BackgroundJob/CreatePeriodicInvoices.pm diff --git a/SL/BackgroundJob/CreatePeriodicInvoices.pm b/SL/BackgroundJob/CreatePeriodicInvoices.pm index fa5d64935..b16ab3901 100644 --- a/SL/BackgroundJob/CreatePeriodicInvoices.pm +++ b/SL/BackgroundJob/CreatePeriodicInvoices.pm @@ -173,7 +173,7 @@ sub _create_periodic_invoice { sub _calculate_dates { my $config = shift; - my $cur_date = $config->start_date; + my $cur_date = $config->first_billing_date || $config->start_date; my $start_date = $config->get_previous_invoice_date || DateTime->new(year => 1970, month => 1, day => 1); my $end_date = $config->end_date || DateTime->new(year => 2100, month => 1, day => 1); my $tomorrow = DateTime->today_local->add(days => 1);