Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a51e1869

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

  • ID a51e18692b3b21570db8b7acd99537385c401d6d
  • Vorgänger 85d74cfe
  • Nachfolger a744a96d

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
92 92
  '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.',
93 93
  '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.',
94 94
  'AUTOMATICALLY MATCH BINS'    => 'LAGERPLÄTZE AUTOMATISCH ZUWEISEN',
95
  'Abbreviation'                => 'Abkürzung',
96 95
  'Abbreviation Legend'         => 'Beschreibung der Typ-Abkürzungen (1 Zeichen Typ, 1-2 Zeichen Klassifizierung)',
97 96
  'Abort'                       => 'Abbrechen',
98 97
  'Abrechnungsnummer'           => 'Abrechnungsnummer',
......
237 236
  'Add sub function block'      => 'Unterfunktionsblock hinzufügen',
238 237
  'Add taxzone'                 => 'Steuerzone hinzufügen',
239 238
  'Add text block'              => 'Textblock erfassen',
240
  'Add time recording type'     => 'Typ für Zeiterfassung erfassen',
241 239
  'Add title'                   => 'Titel hinzufügen',
242 240
  'Add unit'                    => 'Einheit hinzufügen',
243 241
  'Added sections and function blocks: #1' => 'Hinzugefügte Abschnitte und Funktionsblöcke: #1',
......
1265 1263
  'Edit the request_quotation'  => 'Bearbeiten der Preisanfrage',
1266 1264
  'Edit the sales_order'        => 'Bearbeiten des Auftrags',
1267 1265
  'Edit the sales_quotation'    => 'Bearbeiten des Angebots',
1268
  'Edit time recording type'    => 'Typ für Zeiterfassung bearbeiten',
1269 1266
  'Edit time recordings of all staff members' => 'Zeiterfassungseinträge aller Mitarbeiter bearbeiten',
1270 1267
  'Edit title'                  => 'Titiel bearbeiten',
1271 1268
  'Edit units'                  => 'Einheiten bearbeiten',
......
3723 3720
  'Time'                        => 'Zeit',
3724 3721
  'Time Format'                 => 'Uhrzeitformat',
3725 3722
  'Time Recording'              => 'Zeiterfassung',
3726
  'Time Recording Types'        => 'Typen für Zeiterfassung',
3727 3723
  'Time Recordings'             => 'Zeiterfassung',
3728 3724
  'Time and price estimate'     => 'Zeit- und Preisschätzung',
3729 3725
  'Time estimate'               => 'Zeitschätzung',
locale/en/all
92 92
  '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.' => '',
93 93
  'ATTENTION! You can not simply change it from periodic to perpetual once you started posting.' => '',
94 94
  'AUTOMATICALLY MATCH BINS'    => '',
95
  'Abbreviation'                => '',
96 95
  'Abbreviation Legend'         => '',
97 96
  'Abort'                       => '',
98 97
  'Abrechnungsnummer'           => '',
......
237 236
  'Add sub function block'      => '',
238 237
  'Add taxzone'                 => '',
239 238
  'Add text block'              => '',
240
  'Add time recording type'     => '',
241 239
  'Add title'                   => '',
242 240
  'Add unit'                    => '',
243 241
  'Added sections and function blocks: #1' => '',
......
1265 1263
  'Edit the request_quotation'  => '',
1266 1264
  'Edit the sales_order'        => '',
1267 1265
  'Edit the sales_quotation'    => '',
1268
  'Edit time recording type'    => '',
1269 1266
  'Edit time recordings of all staff members' => '',
1270 1267
  'Edit title'                  => '',
1271 1268
  'Edit units'                  => '',
......
3722 3719
  'Time'                        => '',
3723 3720
  'Time Format'                 => '',
3724 3721
  'Time Recording'              => '',
3725
  'Time Recording Types'        => '',
3726 3722
  'Time Recordings'             => '',
3727 3723
  'Time and price estimate'     => '',
3728 3724
  '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