From: Moritz Bunkus Date: Mon, 14 Oct 2013 13:37:00 +0000 (+0200) Subject: Wiederkehrende Rechnung: "erste Rechnung erzeugen am" als Startdatum nutzen X-Git-Tag: release-3.2.0beta~476^2~18 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=2b81e2ee23ded681761398619126081bffbd5120;p=kivitendo-erp.git Wiederkehrende Rechnung: "erste Rechnung erzeugen am" als Startdatum nutzen --- 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);