Revision 84dfd7a5
Von Jan Büren vor etwa 2 Jahren hinzugefügt
SL/BackgroundJob/CreatePeriodicInvoices.pm | ||
---|---|---|
106 | 106 |
sub _generate_time_period_variables { |
107 | 107 |
my $config = shift; |
108 | 108 |
my $period_start_date = shift; |
109 |
my $period_end_date = $period_start_date->clone->add(months => $config->get_billing_period_length)->subtract(days => 1); |
|
110 | 109 |
|
110 |
my $period_end_date = $config->periodicity eq 'o' |
|
111 |
? $period_start_date->clone->add(months => $config->get_order_value_period_length)->subtract(days => 1) |
|
112 |
: $period_start_date->clone->add(months => $config->get_billing_period_length) ->subtract(days => 1); |
|
111 | 113 |
my @month_names = ('', |
112 | 114 |
$::locale->text('January'), $::locale->text('February'), $::locale->text('March'), $::locale->text('April'), $::locale->text('May'), $::locale->text('June'), |
113 | 115 |
$::locale->text('July'), $::locale->text('August'), $::locale->text('September'), $::locale->text('October'), $::locale->text('November'), $::locale->text('December')); |
Auch abrufbar als: Unified diff
Wiederkehrende Rechnungen: Bei einmaliger Abrechnung, das Enddatum anders setzen
Standardmäßig kommt ansonsten eine eins zurück, was überwiegend
falsch ist.