Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision c577184c

Von Moritz Bunkus vor mehr als 7 Jahren hinzugefügt

  • ID c577184c1d4b43ce281948016c1c4de16d095b5f
  • Vorgänger c19956a7
  • Nachfolger a8fb17ea

Konten: Berichtskonfigurationsübersicht

Listet für die Berichte EÜR, BWA, Bilanz und Erfolgsrechnung alle
Konten gruppiert nach ihrer Position im Bericht auf.

Unterschiede anzeigen:

SL/Controller/Chart.pm
4 4
use parent qw(SL::Controller::Base);
5 5

  
6 6
use Clone qw(clone);
7
use List::UtilsBy qw(partition_by sort_by);
8

  
9
use SL::AM;
7 10
use SL::DB::Chart;
8 11
use SL::Controller::Helper::GetModels;
9 12
use SL::Locale::String qw(t8);
......
82 85
  }
83 86
}
84 87

  
88
sub action_show_report_configuration_overview {
89
  my ($self) = @_;
90

  
91
  my @all_charts = sort { $a->accno cmp $b->accno } @{ SL::DB::Manager::Chart->get_all(inject_results => 1) };
92
  my @types      = qw(bilanz bwa er eur);
93
  my %headings   = (
94
    bilanz       => t8('Balance'),
95
    bwa          => t8('BWA'),
96
    er           => t8('Erfolgsrechnung'),
97
    eur          => t8('EUER'),
98
  );
99

  
100
  my @data;
101

  
102
  foreach my $type (@types) {
103
    my $method = "pos_${type}";
104
    my $names  = $type eq 'bwa' ? AM->get_bwa_categories(\%::myconfig, $::form)
105
               : $type eq 'eur' ? AM->get_eur_categories(\%::myconfig, $::form)
106
               :                  {};
107
    my %charts = partition_by { $_->$method // '' } @all_charts;
108
    delete $charts{''};
109

  
110
    next if !%charts;
111

  
112
    push @data, {
113
      type      => $type,
114
      heading   => $headings{$type},
115
      charts    => \%charts,
116
      positions => [ sort { ($a * 1) <=> ($b * 1) } keys %charts ],
117
      names     => $names,
118
    };
119
  }
120

  
121
  $self->render('chart/report_configuration_overview', DATA => \@data);
122
}
123

  
85 124
sub init_charts {
86 125

  
87 126
  # disable pagination when hiding chart details = paginate when showing chart details
locale/de/all
575 575
  'Chart'                       => 'Buchungskonto',
576 576
  'Chart Type'                  => 'Kontentyp',
577 577
  'Chart balance'               => 'Kontensaldo',
578
  'Chart configuration overview regarding reports' => 'Kontenkonfigurationsübersicht bezüglich Berichte',
578 579
  'Chart list'                  => 'Kontenliste',
579 580
  'Chart of Accounts'           => 'Kontenübersicht',
580 581
  'Chart picker'                => 'Kontenauswahl',
......
2259 2260
  'Port'                        => 'Port',
2260 2261
  'Portrait'                    => 'Hochformat',
2261 2262
  'Position'                    => 'Position',
2263
  'Position #1'                 => 'Position #1',
2264
  'Position #1: #2'             => 'Position #1: #2',
2262 2265
  'Position identity fields for fill up?' => 'Felder, die für Abgleich übereinstimmen müssen?',
2263 2266
  'Position type in quotation/order' => 'Positionstyp in Angebot/Auftrag',
2264 2267
  'Positions'                   => 'Positionen',
......
2508 2511
  'Report about warehouse contents' => 'Lagerbestand anzeigen',
2509 2512
  'Report about warehouse transactions' => 'Lagerbuchungen anzeigen',
2510 2513
  'Report and misc. Preferences' => 'Sonstige Einstellungen',
2514
  'Report configuration overview' => 'Berichtskonfigurationsübersicht',
2511 2515
  'Report date'                 => 'Berichtsdatum',
2512 2516
  'Report for'                  => 'Bericht für',
2513 2517
  'Report separately'           => 'Preis separat ausweisen',
menus/user/00-erp.yaml
1071 1071
  module: am.pl
1072 1072
  params:
1073 1073
    action: list_account
1074
- parent: system_chart_of_accounts
1075
  id: system_chart_of_accounts_report_configuration_overview
1076
  name: Report configuration overview
1077
  order: 300
1078
  params:
1079
    action: Chart/show_report_configuration_overview
1074 1080
- parent: system
1075 1081
  id: system_buchungsgruppen
1076 1082
  name: Booking groups
templates/webpages/chart/report_configuration_overview.html
1
[%- USE HTML -%][%- USE LxERP -%][%- USE L -%]<h1>[% LxERP.t8("Chart configuration overview regarding reports") %]</h1>
2

  
3
[% FOREACH data = DATA %]
4
 [% UNLESS data.size == 1 %]
5
  <div id="[% HTML.escape(data.type) %]">
6
   [% LxERP.t8("Jump to") %]:
7
   [% FOREACH jump = DATA %]
8
    [% IF jump.type != data.type %]
9
     [% L.link("#" _ jump.type, jump.heading) %]
10
    [% END %]
11
   [% END %]
12
  </div>
13
 [% END %]
14

  
15
 <h2>[% HTML.escape(data.heading) %]</h2>
16

  
17
 [% FOREACH pos = data.positions %]
18
  [%- SET name = data.names.item(pos) %]
19
  <h3>[% IF name %][% LxERP.t8("Position #1: #2", pos, name) %][% ELSE %][% LxERP.t8("Position #1", pos) %][% END %]</h3>
20

  
21
  [%- SET charts = data.charts.$pos %]
22
  <table>
23
   <thead>
24
    <tr class="listheading">
25
     <th>[% LxERP.t8("Account") %]</th>
26
     <th>[% LxERP.t8("Description") %]</th>
27
    </tr>
28
   </thead>
29

  
30
   <tbody>
31
    [% FOREACH chart = charts %]
32
    <tr>
33
     <td>[% L.link("am.pl?action=edit_account&id=" _ chart.id, chart.accno) %]</td>
34
     <td>[% HTML.escape(chart.description) %]</td>
35
    </tr>
36
    [% END %]
37
   </tbody>
38
  </table>
39
 [% END %]
40
[% END %]

Auch abrufbar als: Unified diff