Revision 66f46ee9
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/DB/PeriodicInvoicesConfig.pm | ||
---|---|---|
83 | 83 |
my $cur_date = $self->first_billing_date || $self->start_date; |
84 | 84 |
my $end_date = $self->end_date || DateTime->today_local->add(years => 10); |
85 | 85 |
my $start_date = $params{past_dates} ? undef : $self->get_previous_invoice_date; |
86 |
$start_date ||= $cur_date->clone->subtract(days => 1);
|
|
86 |
$start_date = $start_date ? $start_date->subtract(days => 1) : $cur_date->clone;
|
|
87 | 87 |
|
88 | 88 |
$start_date = max($start_date, $params{start_date}) if $params{start_date}; |
89 | 89 |
$end_date = min($end_date, $params{end_date}) if $params{end_date}; |
... | ... | |
91 | 91 |
my @dates; |
92 | 92 |
|
93 | 93 |
while ($cur_date <= $end_date) { |
94 |
push @dates, $cur_date->clone if $cur_date > $start_date; |
|
94 |
push @dates, $cur_date->clone if $cur_date >= $start_date;
|
|
95 | 95 |
|
96 | 96 |
$cur_date->add(months => $period_len); |
97 | 97 |
} |
Auch abrufbar als: Unified diff
Wiederkehrende Rechnungen: Erste Startperiode nicht vergessen