Revision 24597232
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
SL/Controller/FinancialControllingReport.pm | ||
---|---|---|
24 | 24 |
transaction_description => t8('Transaction description'), |
25 | 25 |
globalprojectnumber => t8('Project'), |
26 | 26 |
globalproject_type => t8('Project Type'), |
27 |
netamount => t8('Order amount'), |
|
28 | 27 |
); |
29 | 28 |
|
30 | 29 |
sub action_list { |
... | ... | |
51 | 50 |
my $report = SL::ReportGenerator->new(\%::myconfig, $::form); |
52 | 51 |
$self->{report} = $report; |
53 | 52 |
|
54 |
my @columns = qw(customer globalprojectnumber globalproject_type ordnumber netamount delivered_amount delivered_amount_p billed_amount billed_amount_p paid_amount paid_amount_p |
|
53 |
my @columns = qw(customer globalprojectnumber globalproject_type ordnumber net_amount delivered_amount delivered_amount_p billed_amount billed_amount_p paid_amount paid_amount_p
|
|
55 | 54 |
billable_amount billable_amount_p other_amount); |
56 |
my @sortable = qw(ordnumber transdate customer netamount globalprojectnumber globalproject_type);
|
|
57 |
$self->{number_columns} = [ qw(netamount billed_amount billed_amount_p delivered_amount delivered_amount_p paid_amount paid_amount_p other_amount billable_amount billable_amount_p) ]; |
|
55 |
my @sortable = qw(ordnumber transdate customer globalprojectnumber globalproject_type); |
|
56 |
$self->{number_columns} = [ qw(net_amount billed_amount billed_amount_p delivered_amount delivered_amount_p paid_amount paid_amount_p other_amount billable_amount billable_amount_p) ];
|
|
58 | 57 |
|
59 | 58 |
my %column_defs = ( |
60 |
netamount => { },
|
|
59 |
net_amount => { text => $::locale->text('Order amount') },
|
|
61 | 60 |
billed_amount => { text => $::locale->text('Billed amount') }, |
62 | 61 |
billed_amount_p => { text => $::locale->text('%') }, |
63 | 62 |
delivered_amount => { text => $::locale->text('Delivered amount') }, |
... | ... | |
120 | 119 |
$order->{other_amount} = $billed_amount - $order->{billed_amount}; |
121 | 120 |
$order->{billable_amount} = $order->{delivered_amount} - $order->{billed_amount}; |
122 | 121 |
|
122 |
if ($order->periodic_invoices_config) { |
|
123 |
my @dates = $order->periodic_invoices_config->calculate_invoice_dates(past_dates => 1, end_date => $order->periodic_invoices_config->end_date || DateTime->today_local); |
|
124 |
$order->{net_amount} = $order->netamount * scalar(@dates); |
|
125 |
|
|
126 |
} else { |
|
127 |
$order->{net_amount} = $order->netamount; |
|
128 |
} |
|
129 |
|
|
123 | 130 |
foreach (qw(delivered billed paid billable)) { |
124 |
$order->{"${_}_amount_p"} = $order->netamount * 1 ? $order->{"${_}_amount"} * 100 / $order->netamount : undef;
|
|
131 |
$order->{"${_}_amount_p"} = $order->{net_amount} * 1 ? $order->{"${_}_amount"} * 100 / $order->{net_amount} : undef;
|
|
125 | 132 |
} |
126 | 133 |
} |
127 | 134 |
} |
... | ... | |
219 | 226 |
'globalproject.active' => 1, |
220 | 227 |
'globalproject.valid' => 1, |
221 | 228 |
]], |
229 |
# keine WR |
|
230 |
# oder aber (WR aktiv und (kein enddatum oder enddatum noch nicht überschritten)) |
|
231 |
or => [ |
|
232 |
'periodic_invoices_config.id' => undef, |
|
233 |
# and => [ |
|
234 |
'periodic_invoices_config.active' => 1, |
|
235 |
# or => [ |
|
236 |
# 'periodic_invoices_config.end_date' => undef, |
|
237 |
# 'periodic_invoices_config.end_date' => { le => DateTime->today_local }, |
|
238 |
# ] |
|
239 |
# ] |
|
240 |
], |
|
222 | 241 |
], |
223 | 242 |
with_objects => [ 'customer', 'globalproject', 'globalproject.project_type' ], |
224 | 243 |
); |
Auch abrufbar als: Unified diff
Finanzcontrollingbericht: wiederkehrende Rechnungen berücksichtigen