Revision 8233ba0b
Von Werner Hahn vor etwa 6 Jahren hinzugefügt
SL/Controller/CustomerVendorTurnover.pm | ||
---|---|---|
370 | 370 |
$self->render('customer_vendor_turnover/email_statistic', { layout => 0 }, emails => $emails); |
371 | 371 |
} |
372 | 372 |
|
373 |
sub action_get_letters { |
|
374 |
my ($self) = @_; |
|
375 |
|
|
376 |
return $self->render('generic/error', { layout => 0 }, label_error => "list_transactions needs a trans_id") unless $::form->{id}; |
|
377 |
|
|
378 |
my $cv = $::form->{id} || {}; |
|
379 |
my $letters; |
|
380 |
my $type = $::form->{type}; |
|
381 |
if ( $::form->{db} eq 'customer' ) { |
|
382 |
$letters = SL::DB::Manager::Letter->get_all( |
|
383 |
query => [ customer_id => $cv, ], |
|
384 |
sort_by => 'date DESC', |
|
385 |
); |
|
386 |
} else { |
|
387 |
$letters = SL::DB::Manager::Letter->get_all( |
|
388 |
query => [ vendor_id => $cv, ], |
|
389 |
sort_by => 'date DESC', |
|
390 |
); |
|
391 |
} |
|
392 |
$self->render('customer_vendor_turnover/letter_statistic', { layout => 0 }, letters => $letters); |
|
393 |
} |
|
394 |
|
|
373 | 395 |
sub _list_articles_by_invoice { |
374 | 396 |
} |
375 | 397 |
sub _list_count_articles_by_year { |
templates/webpages/customer_vendor_turnover/letter_statistic.html | ||
---|---|---|
1 |
[%- USE T8 %] |
|
2 |
[%- USE LxERP %] |
|
3 |
[%- USE L %] |
|
4 |
[%- USE HTML %] |
|
5 |
[%- USE Dumper %] |
|
6 |
|
|
7 |
<div id="invoice_statistic"> |
|
8 |
<table width="100%"> |
|
9 |
<tbody> |
|
10 |
<tr> |
|
11 |
<td class="listheading">[% 'Date' | $T8 %]</td> |
|
12 |
<td class="listheading">[% 'Subject' | $T8 %]</td> |
|
13 |
<td class="listheading">[% 'Letternumber' | $T8 %]</td> |
|
14 |
<td class="listheading">[% 'Contact' | $T8 %]</td> |
|
15 |
<td class="listheading">[% 'Author' | $T8 %]</td> |
|
16 |
</tr> |
|
17 |
|
|
18 |
[%- FOREACH row = letters %] |
|
19 |
[% IF row.customer_id %] |
|
20 |
[% SET is_sales = 1 %] |
|
21 |
[% ELSE %] |
|
22 |
[% SET is_sales = 0 %] |
|
23 |
[% END %] |
|
24 |
<tr class="listrow[% loop.count % 2 %]"> |
|
25 |
<td>[% row.date.to_kivitendo | html %]</td> |
|
26 |
<td> |
|
27 |
<a href="[% SELF.url_for(controller='controller.pl', action => 'Letter/edit', 'letter.id' => row.id, is_sales=is_sales, back_to => SELF.get_callback) %]"> |
|
28 |
[%- HTML.escape(row.subject) %] |
|
29 |
</a> |
|
30 |
</td> |
|
31 |
<td> |
|
32 |
<a href="[% SELF.url_for(controller='controller.pl', action => 'Letter/edit', 'letter.id' => row.id, is_sales=is_sales, back_to => SELF.get_callback) %]"> |
|
33 |
[% row.letternumber | html %] |
|
34 |
</a> |
|
35 |
</td> |
|
36 |
<td>[% row.contact.cp_givenname %] [% row.contact.cp_name %]</td> |
|
37 |
<td>[% row.employee.name %]</td> |
|
38 |
</tr> |
|
39 |
[% END %] |
|
40 |
</tbody> |
|
41 |
</table> |
|
42 |
|
|
43 |
|
|
44 |
</tbody> |
|
45 |
</table> |
|
46 |
</div> |
Auch abrufbar als: Unified diff
Kundenstatistik: Briefe