Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 21d4aaf8

Von Bernd Bleßmann vor mehr als 3 Jahren hinzugefügt

  • ID 21d4aaf83b5d9f1cd664b997d685cf9007cc91c8
  • Vorgänger 05de5bf1
  • Nachfolger ae4cec42

Zeiterfassung: Keine Zeiterfassungstypen mehr

Unterschiede anzeigen:

SL/Controller/TimeRecording.pm
18 18
use Rose::Object::MakeMethods::Generic
19 19
(
20 20
# scalar                  => [ qw() ],
21
 'scalar --get_set_init' => [ qw(time_recording models all_time_recording_types all_employees can_view_all can_edit_all) ],
21
 'scalar --get_set_init' => [ qw(time_recording models all_employees can_view_all can_edit_all) ],
22 22
);
23 23

  
24 24

  
......
34 34
  start_time   => t8('Start'),
35 35
  end_time     => t8('End'),
36 36
  customer     => t8('Customer'),
37
  type         => t8('Type'),
38 37
  project      => t8('Project'),
39 38
  description  => t8('Description'),
40 39
  staff_member => t8('Mitarbeiter'),
......
151 150
    sorted         => \%sort_columns,
152 151
    disable_plugin => 'paginated',
153 152
    query          => \@where,
154
    with_objects   => [ 'customer', 'type', 'project', 'staff_member', 'employee' ],
153
    with_objects   => [ 'customer', 'project', 'staff_member', 'employee' ],
155 154
  );
156 155
}
157 156

  
158
sub init_all_time_recording_types {
159
  SL::DB::Manager::TimeRecordingType->get_all_sorted(query => [obsolete => 0]);
160
}
161

  
162 157
sub init_all_employees {
163 158
  SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]);
164 159
}
......
181 176
  my $report      = SL::ReportGenerator->new(\%::myconfig, $::form);
182 177
  $self->{report} = $report;
183 178

  
184
  my @columns  = qw(start_time end_time customer type project description staff_member duration);
179
  my @columns  = qw(start_time end_time customer project description staff_member duration);
185 180

  
186 181
  my %column_defs = (
187 182
    start_time   => { text => t8('Start'),        sub => sub { $_[0]->start_time_as_timestamp },
......
189 184
    end_time     => { text => t8('End'),          sub => sub { $_[0]->end_time_as_timestamp },
190 185
                      obj_link => sub { $self->url_for(action => 'edit', 'id' => $_[0]->id, callback => $self->models->get_callback) }  },
191 186
    customer     => { text => t8('Customer'),     sub => sub { $_[0]->customer->displayable_name } },
192
    type         => { text => t8('Type'),         sub => sub { $_[0]->type && $_[0]->type->abbreviation } },
193 187
    project      => { text => t8('Project'),      sub => sub { $_[0]->project && $_[0]->project->displayable_name } },
194 188
    description  => { text => t8('Description'),  sub => sub { $_[0]->description_as_stripped_html },
195 189
                      raw_data => sub { $_[0]->description_as_restricted_html }, # raw_data only used for html(?)
SL/DB/Helper/ALL.pm
135 135
use SL::DB::TaxZone;
136 136
use SL::DB::TaxzoneChart;
137 137
use SL::DB::TimeRecording;
138
use SL::DB::TimeRecordingType;
139 138
use SL::DB::TodoUserConfig;
140 139
use SL::DB::TransferType;
141 140
use SL::DB::Translation;
SL/DB/Helper/Mappings.pm
214 214
  taxkeys                        => 'tax_key',
215 215
  tax_zones                      => 'tax_zone',
216 216
  taxzone_charts                 => 'taxzone_chart',
217
  time_recording_types           => 'time_recording_type',
218 217
  time_recordings                => 'time_recording',
219 218
  todo_user_config               => 'todo_user_config',
220 219
  transfer_type                  => 'transfer_type',
SL/DB/Manager/TimeRecordingType.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::Manager::TimeRecordingType;
5

  
6
use strict;
7

  
8
use parent qw(SL::DB::Helper::Manager);
9

  
10
use SL::DB::Helper::Sorted;
11

  
12
sub object_class { 'SL::DB::TimeRecordingType' }
13

  
14
__PACKAGE__->make_manager_methods;
15

  
16
sub _sort_spec {
17
  return ( default => [ 'position', 1 ],
18
           columns => { SIMPLE => 'ALL' });
19
}
20

  
21
1;
SL/DB/MetaSetup/TimeRecording.pm
21 21
  project_id      => { type => 'integer' },
22 22
  staff_member_id => { type => 'integer', not_null => 1 },
23 23
  start_time      => { type => 'timestamp', not_null => 1 },
24
  type_id         => { type => 'integer' },
25 24
);
26 25

  
27 26
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
......
48 47
    class       => 'SL::DB::Employee',
49 48
    key_columns => { staff_member_id => 'id' },
50 49
  },
51

  
52
  type => {
53
    class       => 'SL::DB::TimeRecordingType',
54
    key_columns => { type_id => 'id' },
55
  },
56 50
);
57 51

  
58 52
1;
SL/DB/MetaSetup/TimeRecordingType.pm
1
# This file has been auto-generated. Do not modify it; it will be overwritten
2
# by rose_auto_create_model.pl automatically.
3
package SL::DB::TimeRecordingType;
4

  
5
use strict;
6

  
7
use parent qw(SL::DB::Object);
8

  
9
__PACKAGE__->meta->table('time_recording_types');
10

  
11
__PACKAGE__->meta->columns(
12
  abbreviation => { type => 'text', not_null => 1 },
13
  description  => { type => 'text' },
14
  id           => { type => 'serial', not_null => 1 },
15
  obsolete     => { type => 'boolean', default => 'false', not_null => 1 },
16
  position     => { type => 'integer', not_null => 1 },
17
);
18

  
19
__PACKAGE__->meta->primary_key_columns([ 'id' ]);
20

  
21
1;
22
;
SL/DB/TimeRecordingType.pm
1
# This file has been auto-generated only because it didn't exist.
2
# Feel free to modify it at will; it will not be overwritten automatically.
3

  
4
package SL::DB::TimeRecordingType;
5

  
6
use strict;
7

  
8
use SL::DB::MetaSetup::TimeRecordingType;
9
use SL::DB::Manager::TimeRecordingType;
10

  
11
use SL::DB::Helper::ActsAsList;
12

  
13
__PACKAGE__->meta->initialize;
14

  
15
1;
locale/de/all
97 97
  'ATTENTION! If you enabled this feature you can not simply turn it off again without taking care that best_before fields are emptied in the database.' => 'ACHTUNG! Wenn Sie diese Einstellung aktivieren, dann können Sie sie später nicht ohne Weiteres deaktivieren, ohne dafür zu sorgen, dass die Felder der Mindeshaltbarkeitsdaten in der Datenbank leer gemacht werden.',
98 98
  'ATTENTION! You can not simply change it from periodic to perpetual once you started posting.' => 'ACHTUNG! Es kann nicht ohne Weiteres im laufenden Betrieb von der Aufwandsmethode zur Bestandsmethode gewechselt werden.',
99 99
  'AUTOMATICALLY MATCH BINS'    => 'LAGERPLÄTZE AUTOMATISCH ZUWEISEN',
100
  'Abbreviation'                => 'Abkürzung',
101 100
  'Abbreviation Legend'         => 'Beschreibung der Typ-Abkürzungen (1 Zeichen Typ, 1-2 Zeichen Klassifizierung)',
102 101
  'Abort'                       => 'Abbrechen',
103 102
  'Abrechnungsnummer'           => 'Abrechnungsnummer',
......
242 241
  'Add sub function block'      => 'Unterfunktionsblock hinzufügen',
243 242
  'Add taxzone'                 => 'Steuerzone hinzufügen',
244 243
  'Add text block'              => 'Textblock erfassen',
245
  'Add time recording type'     => 'Typ für Zeiterfassung erfassen',
246 244
  'Add title'                   => 'Titel hinzufügen',
247 245
  'Add unit'                    => 'Einheit hinzufügen',
248 246
  'Added sections and function blocks: #1' => 'Hinzugefügte Abschnitte und Funktionsblöcke: #1',
......
1275 1273
  'Edit the request_quotation'  => 'Bearbeiten der Preisanfrage',
1276 1274
  'Edit the sales_order'        => 'Bearbeiten des Auftrags',
1277 1275
  'Edit the sales_quotation'    => 'Bearbeiten des Angebots',
1278
  'Edit time recording type'    => 'Typ für Zeiterfassung bearbeiten',
1279 1276
  'Edit time recordings of all staff members' => 'Zeiterfassungseinträge aller Mitarbeiter bearbeiten',
1280 1277
  'Edit title'                  => 'Titiel bearbeiten',
1281 1278
  'Edit units'                  => 'Einheiten bearbeiten',
......
3756 3753
  'Time'                        => 'Zeit',
3757 3754
  'Time Format'                 => 'Uhrzeitformat',
3758 3755
  'Time Recording'              => 'Zeiterfassung',
3759
  'Time Recording Types'        => 'Typen für Zeiterfassung',
3760 3756
  'Time Recordings'             => 'Zeiterfassung',
3761 3757
  'Time and price estimate'     => 'Zeit- und Preisschätzung',
3762 3758
  'Time estimate'               => 'Zeitschätzung',
locale/en/all
97 97
  'ATTENTION! If you enabled this feature you can not simply turn it off again without taking care that best_before fields are emptied in the database.' => '',
98 98
  'ATTENTION! You can not simply change it from periodic to perpetual once you started posting.' => '',
99 99
  'AUTOMATICALLY MATCH BINS'    => '',
100
  'Abbreviation'                => '',
101 100
  'Abbreviation Legend'         => '',
102 101
  'Abort'                       => '',
103 102
  'Abrechnungsnummer'           => '',
......
242 241
  'Add sub function block'      => '',
243 242
  'Add taxzone'                 => '',
244 243
  'Add text block'              => '',
245
  'Add time recording type'     => '',
246 244
  'Add title'                   => '',
247 245
  'Add unit'                    => '',
248 246
  'Added sections and function blocks: #1' => '',
......
1275 1273
  'Edit the request_quotation'  => '',
1276 1274
  'Edit the sales_order'        => '',
1277 1275
  'Edit the sales_quotation'    => '',
1278
  'Edit time recording type'    => '',
1279 1276
  'Edit time recordings of all staff members' => '',
1280 1277
  'Edit title'                  => '',
1281 1278
  'Edit units'                  => '',
......
3754 3751
  'Time'                        => '',
3755 3752
  'Time Format'                 => '',
3756 3753
  'Time Recording'              => '',
3757
  'Time Recording Types'        => '',
3758 3754
  'Time Recordings'             => '',
3759 3755
  'Time and price estimate'     => '',
3760 3756
  'Time estimate'               => '',
sql/Pg-upgrade2/time_recordings_remove_type.sql
1
-- @tag: time_recordings_remove_type
2
-- @description: Zeiterfassungs-Typen entfernen
3
-- @depends: time_recordings time_recordings2
4

  
5
ALTER TABLE time_recordings DROP column type_id;
6
DROP TABLE time_recording_types;
templates/webpages/time_recording/form.html
18 18
        <th>[% 'Start' | $T8 %]</th>
19 19
        <th>[% 'End' | $T8 %]</th>
20 20
        <th>[% 'Customer' | $T8 %]</th>
21
        <th>[% 'Type' | $T8 %]</th>
22 21
        <th>[% 'Project' | $T8 %]</th>
23 22
        <th>[% 'Description' | $T8 %]</th>
24 23
        <th>[% 'Mitarbeiter' | $T8 %]</th>
......
37 36
          [% P.button_tag('kivi.TimeRecording.set_current_date_time("end")', LxERP.t8('now')) %]
38 37
        </td>
39 38
        <td>[% P.customer_vendor.picker('time_recording.customer_id', SELF.time_recording.customer_id, type='customer', style='width: 300px', "data-validate"="required", "data-title"=LxERP.t8('Customer')) %]</td>
40
        <td>[% P.select_tag('time_recording.type_id', SELF.all_time_recording_types, default=SELF.time_recording.type.id, with_empty=1, title_key='abbreviation') %]</td>
41 39
        <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, style='width: 300px') %]</td>
42 40
        <td>[% L.textarea_tag('time_recording.description', SELF.time_recording.description, wrap="soft", style="width: 350px; height: 150px", class="texteditor", "data-validate"="required", "data-title"=LxERP.t8('Description')) %]</td>
43 41
        <td>

Auch abrufbar als: Unified diff