Revision 54444528
Von Moritz Bunkus vor fast 10 Jahren hinzugefügt
SL/Controller/FinancialOverview.pm | ||
---|---|---|
145 | 145 |
sub calculate_one_periodic_invoice { |
146 | 146 |
my ($self, %params) = @_; |
147 | 147 |
|
148 |
my @dates = $params{config}->calculate_invoice_dates(start_date => $params{start_date}, end_date => $params{end_date}, past_dates => 1); |
|
149 |
my $first_date = $dates[0]; |
|
148 |
return if $params{config}->start_date > $params{end_date}; |
|
150 | 149 |
|
151 |
return if !$first_date; |
|
152 |
|
|
153 |
my $net = $params{config}->order->netamount * scalar(@dates); |
|
154 |
my $sord = $self->data->{sales_orders}; |
|
150 |
my $first_date = $params{config}->start_date->clone->set_year($self->year); |
|
151 |
my $net = $params{config}->order->netamount * (12 / $params{config}->get_period_length); |
|
152 |
my $sord = $self->data->{sales_orders}; |
|
155 | 153 |
|
156 | 154 |
$sord->{months }->[ $first_date->month - 1 ] += $net; |
157 | 155 |
$sord->{quarters}->[ $first_date->quarter - 1 ] += $net; |
Auch abrufbar als: Unified diff
Finanzübersicht: wied. Rechnungen für ganzes Jahr auf einmal berücksichtigen