Revision 2e6fe034
Von Bernd Bleßmann vor fast 2 Jahren hinzugefügt
SL/Controller/CustomerVendorTurnover.pm | ||
---|---|---|
223 | 223 |
$self->{turnover_statistic} = \@new_stats; |
224 | 224 |
} |
225 | 225 |
|
226 |
if (@{$self->{turnover_statistic}} > 1) { |
|
227 |
my $query = <<SQL; |
|
228 |
SELECT $date_part_select as date_part, |
|
229 |
count(id) as count, |
|
230 |
sum(amount) as amount, |
|
231 |
sum(netamount) as netamount, |
|
232 |
sum(paid) as paid |
|
233 |
FROM $db WHERE $cv_type IS NOT NULL |
|
234 |
GROUP BY $group_by |
|
235 |
ORDER BY $order_by |
|
236 |
SQL |
|
237 |
my $overall_turnover = selectall_hashref_query($::form, $dbh, $query); |
|
238 |
foreach my $stat (@{$self->{turnover_statistic}}) { |
|
239 |
my $overall_stat = first { $_->{date_part} eq $stat->{date_part} } @$overall_turnover; |
|
240 |
$stat->{overall_netamount} = 0; |
|
241 |
$stat->{'overall_' . $_} = $overall_stat->{$_} for keys %$overall_stat; |
|
242 |
} |
|
243 |
} |
|
226 | 244 |
|
227 | 245 |
if ($::request->type eq 'json') { |
228 | 246 |
$self->render(\ SL::JSON::to_json($self->{turnover_statistic}), { layout => 0, type => 'json', process => 0 }); |
js/kivi.CustomerVendorTurnover.js | ||
---|---|---|
114 | 114 |
'rgba(255, 159, 64, 1)' |
115 | 115 |
], |
116 | 116 |
borderWidth: 1 |
117 |
}, |
|
118 |
{ |
|
119 |
label: kivi.t8('Overall Net.Turnover'), |
|
120 |
data: data, |
|
121 |
type: 'line', |
|
122 |
backgroundColor: 'black', |
|
117 | 123 |
}] |
118 | 124 |
}, |
119 | 125 |
options: { |
... | ... | |
124 | 130 |
}, |
125 | 131 |
parsing: { |
126 | 132 |
xAxisKey: 'date_part', |
127 |
yAxisKey: 'netamount'
|
|
133 |
yAxisKey: ['netamount', 'overall_netamount']
|
|
128 | 134 |
}, |
129 | 135 |
onClick: (e) => { |
130 | 136 |
const canvasPosition = Chart.helpers.getRelativePosition(e, chart); |
js/locale/de.js | ||
---|---|---|
114 | 114 |
"Oct":"Okt", |
115 | 115 |
"October":"Oktober", |
116 | 116 |
"Ok":"Ok", |
117 |
"Overall Net.Turnover":"Gesamter Netto-Umsatz", |
|
117 | 118 |
"Part picker":"Artikelauswahl", |
118 | 119 |
"Paste":"Einfügen", |
119 | 120 |
"Paste template":"Vorlage einfügen", |
js/locale/en.js | ||
---|---|---|
114 | 114 |
"Oct":"", |
115 | 115 |
"October":"", |
116 | 116 |
"Ok":"", |
117 |
"Overall Net.Turnover":"", |
|
117 | 118 |
"Part picker":"", |
118 | 119 |
"Paste":"", |
119 | 120 |
"Paste template":"", |
locale/de/all | ||
---|---|---|
2530 | 2530 |
'Out of balance transaction!' => 'Buchung ist nicht ausgeglichen!', |
2531 | 2531 |
'Out of balance!' => 'Summen stimmen nicht überein!', |
2532 | 2532 |
'Output Number Format' => 'Zahlenformat (Ausgabe)', |
2533 |
'Overall Net.Turnover' => 'Gesamter Netto-Umsatz', |
|
2533 | 2534 |
'Overdue invoices' => 'Überfällige Rechnungen', |
2534 | 2535 |
'Overdue sales quotations and requests for quotations' => 'Überfällige Angebote und Preisanfragen', |
2535 | 2536 |
'Override' => 'Override', |
locale/en/all | ||
---|---|---|
2448 | 2448 |
'Out of balance transaction!' => '', |
2449 | 2449 |
'Out of balance!' => '', |
2450 | 2450 |
'Output Number Format' => '', |
2451 |
'Overall Net.Turnover' => '', |
|
2451 | 2452 |
'Overdue invoices' => '', |
2452 | 2453 |
'Overdue sales quotations and requests for quotations' => '', |
2453 | 2454 |
'Override' => '', |
Auch abrufbar als: Unified diff
Umsatzstatistik-Chart mit Linie aller Umsätze zum Vergleichen