Revision 6aeff060
Von Sven Schöling vor fast 11 Jahren hinzugefügt
SL/Controller/FinancialControllingReport.pm | ||
---|---|---|
30 | 30 |
MODEL => 'Order', |
31 | 31 |
ONLY => [ qw(list) ], |
32 | 32 |
|
33 |
DEFAULT_BY => 'transdate',
|
|
33 |
DEFAULT_BY => 'globalprojectnumber',
|
|
34 | 34 |
DEFAULT_DIR => 1, |
35 | 35 |
|
36 |
transdate => t8('Order Date'), |
|
37 | 36 |
ordnumber => t8('Order'), |
38 | 37 |
customer => t8('Customer'), |
39 | 38 |
transaction_description => t8('Transaction description'), |
... | ... | |
78 | 77 |
my $report = SL::ReportGenerator->new(\%::myconfig, $::form); |
79 | 78 |
$self->{report} = $report; |
80 | 79 |
|
81 |
my @columns = qw(customer globalprojectnumber ordnumber transdate netamount delivered_amount delivered_amount_p billed_amount billed_amount_p paid_amount paid_amount_p
|
|
82 |
billable_amount billable_amount_p other_amount open_amount transaction_description);
|
|
80 |
my @columns = qw(customer globalprojectnumber ordnumber netamount delivered_amount delivered_amount_p billed_amount billed_amount_p paid_amount paid_amount_p |
|
81 |
billable_amount billable_amount_p other_amount); |
|
83 | 82 |
my @sortable = qw(ordnumber transdate customer netamount globalprojectnumber); |
84 |
$self->{number_columns} = [ qw(netamount billed_amount billed_amount_p delivered_amount delivered_amount_p paid_amount paid_amount_p open_amount other_amount billable_amount billable_amount_p) ];
|
|
83 |
$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) ]; |
|
85 | 84 |
|
86 | 85 |
my %column_defs = ( |
87 |
transdate => { sub => sub { $_[0]->transdate_as_date } }, |
|
88 | 86 |
netamount => { }, |
89 | 87 |
billed_amount => { text => $::locale->text('Billed amount') }, |
90 | 88 |
billed_amount_p => { text => $::locale->text('%') }, |
... | ... | |
94 | 92 |
paid_amount_p => { text => $::locale->text('%') }, |
95 | 93 |
billable_amount => { text => $::locale->text('Billable amount') }, |
96 | 94 |
billable_amount_p => { text => $::locale->text('%') }, |
97 |
open_amount => { text => $::locale->text('Bills receivable') }, |
|
98 | 95 |
other_amount => { text => $::locale->text('Billed extra expenses') }, |
99 |
transaction_description => { }, |
|
100 | 96 |
ordnumber => { obj_link => sub { $self->link_to($_[0]) } }, |
101 | 97 |
customer => { sub => sub { $_[0]->customer->name }, |
102 | 98 |
obj_link => sub { $self->link_to($_[0]->customer) } }, |
... | ... | |
144 | 140 |
my $billed_amount = sum map { $_->netamount } @{ $invoices }; |
145 | 141 |
$order->{other_amount} = $billed_amount - $order->{billed_amount}; |
146 | 142 |
$order->{billable_amount} = $order->{delivered_amount} - $order->{billed_amount}; |
147 |
$order->{open_amount} = $billed_amount - $order->{paid_amount }; |
|
148 | 143 |
|
149 | 144 |
foreach (qw(delivered billed paid billable)) { |
150 | 145 |
$order->{"${_}_amount_p"} = $order->netamount * 1 ? $order->{"${_}_amount"} * 100 / $order->netamount : undef; |
Auch abrufbar als: Unified diff
Finanzcontrollingbericht: Spalten Vorgangsbezeichnung, Auftragsdatum, Offene Forderungen entfernt