]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Zeiterfassung: Keine Zeiterfassungstypen mehr
authorBernd Bleßmann <bernd@kivitendo-premium.de>
Mon, 28 Dec 2020 17:07:40 +0000 (18:07 +0100)
committerBernd Bleßmann <bernd@kivitendo-premium.de>
Wed, 5 May 2021 15:25:03 +0000 (17:25 +0200)
SL/Controller/TimeRecording.pm
SL/DB/Helper/ALL.pm
SL/DB/Helper/Mappings.pm
SL/DB/Manager/TimeRecordingType.pm [deleted file]
SL/DB/MetaSetup/TimeRecording.pm
SL/DB/MetaSetup/TimeRecordingType.pm [deleted file]
SL/DB/TimeRecordingType.pm [deleted file]
locale/de/all
locale/en/all
sql/Pg-upgrade2/time_recordings_remove_type.sql [new file with mode: 0644]
templates/webpages/time_recording/form.html

index 44d54ca99c230cf436ed467be6c36c7c98e22067..e3e2aabbc8316e7e5156ba39146c29a5d99a0e4d 100644 (file)
@@ -18,7 +18,7 @@ use SL::ReportGenerator;
 use Rose::Object::MakeMethods::Generic
 (
 # scalar                  => [ qw() ],
 use Rose::Object::MakeMethods::Generic
 (
 # scalar                  => [ qw() ],
- 'scalar --get_set_init' => [ qw(time_recording models all_time_recording_types all_employees can_view_all can_edit_all) ],
+ 'scalar --get_set_init' => [ qw(time_recording models all_employees can_view_all can_edit_all) ],
 );
 
 
 );
 
 
@@ -34,7 +34,6 @@ my %sort_columns = (
   start_time   => t8('Start'),
   end_time     => t8('End'),
   customer     => t8('Customer'),
   start_time   => t8('Start'),
   end_time     => t8('End'),
   customer     => t8('Customer'),
-  type         => t8('Type'),
   project      => t8('Project'),
   description  => t8('Description'),
   staff_member => t8('Mitarbeiter'),
   project      => t8('Project'),
   description  => t8('Description'),
   staff_member => t8('Mitarbeiter'),
@@ -151,14 +150,10 @@ sub init_models {
     sorted         => \%sort_columns,
     disable_plugin => 'paginated',
     query          => \@where,
     sorted         => \%sort_columns,
     disable_plugin => 'paginated',
     query          => \@where,
-    with_objects   => [ 'customer', 'type', 'project', 'staff_member', 'employee' ],
+    with_objects   => [ 'customer', 'project', 'staff_member', 'employee' ],
   );
 }
 
   );
 }
 
-sub init_all_time_recording_types {
-  SL::DB::Manager::TimeRecordingType->get_all_sorted(query => [obsolete => 0]);
-}
-
 sub init_all_employees {
   SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]);
 }
 sub init_all_employees {
   SL::DB::Manager::Employee->get_all_sorted(query => [ deleted => 0 ]);
 }
@@ -181,7 +176,7 @@ sub prepare_report {
   my $report      = SL::ReportGenerator->new(\%::myconfig, $::form);
   $self->{report} = $report;
 
   my $report      = SL::ReportGenerator->new(\%::myconfig, $::form);
   $self->{report} = $report;
 
-  my @columns  = qw(start_time end_time customer type project description staff_member duration);
+  my @columns  = qw(start_time end_time customer project description staff_member duration);
 
   my %column_defs = (
     start_time   => { text => t8('Start'),        sub => sub { $_[0]->start_time_as_timestamp },
 
   my %column_defs = (
     start_time   => { text => t8('Start'),        sub => sub { $_[0]->start_time_as_timestamp },
@@ -189,7 +184,6 @@ sub prepare_report {
     end_time     => { text => t8('End'),          sub => sub { $_[0]->end_time_as_timestamp },
                       obj_link => sub { $self->url_for(action => 'edit', 'id' => $_[0]->id, callback => $self->models->get_callback) }  },
     customer     => { text => t8('Customer'),     sub => sub { $_[0]->customer->displayable_name } },
     end_time     => { text => t8('End'),          sub => sub { $_[0]->end_time_as_timestamp },
                       obj_link => sub { $self->url_for(action => 'edit', 'id' => $_[0]->id, callback => $self->models->get_callback) }  },
     customer     => { text => t8('Customer'),     sub => sub { $_[0]->customer->displayable_name } },
-    type         => { text => t8('Type'),         sub => sub { $_[0]->type && $_[0]->type->abbreviation } },
     project      => { text => t8('Project'),      sub => sub { $_[0]->project && $_[0]->project->displayable_name } },
     description  => { text => t8('Description'),  sub => sub { $_[0]->description_as_stripped_html },
                       raw_data => sub { $_[0]->description_as_restricted_html }, # raw_data only used for html(?)
     project      => { text => t8('Project'),      sub => sub { $_[0]->project && $_[0]->project->displayable_name } },
     description  => { text => t8('Description'),  sub => sub { $_[0]->description_as_stripped_html },
                       raw_data => sub { $_[0]->description_as_restricted_html }, # raw_data only used for html(?)
index 30ae80282435d40301b528fe40e6dd2b451f4aea..52f132107d1f0350029e6ce5c9c3bb5b1b9f3746 100644 (file)
@@ -135,7 +135,6 @@ use SL::DB::TaxKey;
 use SL::DB::TaxZone;
 use SL::DB::TaxzoneChart;
 use SL::DB::TimeRecording;
 use SL::DB::TaxZone;
 use SL::DB::TaxzoneChart;
 use SL::DB::TimeRecording;
-use SL::DB::TimeRecordingType;
 use SL::DB::TodoUserConfig;
 use SL::DB::TransferType;
 use SL::DB::Translation;
 use SL::DB::TodoUserConfig;
 use SL::DB::TransferType;
 use SL::DB::Translation;
index 4abed608a2a4cb3328469156c70a7ce111b481a7..7b69b53ec3f5b48f7bf53b1b9882445c43537434 100644 (file)
@@ -214,7 +214,6 @@ my %kivitendo_package_names = (
   taxkeys                        => 'tax_key',
   tax_zones                      => 'tax_zone',
   taxzone_charts                 => 'taxzone_chart',
   taxkeys                        => 'tax_key',
   tax_zones                      => 'tax_zone',
   taxzone_charts                 => 'taxzone_chart',
-  time_recording_types           => 'time_recording_type',
   time_recordings                => 'time_recording',
   todo_user_config               => 'todo_user_config',
   transfer_type                  => 'transfer_type',
   time_recordings                => 'time_recording',
   todo_user_config               => 'todo_user_config',
   transfer_type                  => 'transfer_type',
diff --git a/SL/DB/Manager/TimeRecordingType.pm b/SL/DB/Manager/TimeRecordingType.pm
deleted file mode 100644 (file)
index e1e1b4c..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# This file has been auto-generated only because it didn't exist.
-# Feel free to modify it at will; it will not be overwritten automatically.
-
-package SL::DB::Manager::TimeRecordingType;
-
-use strict;
-
-use parent qw(SL::DB::Helper::Manager);
-
-use SL::DB::Helper::Sorted;
-
-sub object_class { 'SL::DB::TimeRecordingType' }
-
-__PACKAGE__->make_manager_methods;
-
-sub _sort_spec {
-  return ( default => [ 'position', 1 ],
-           columns => { SIMPLE => 'ALL' });
-}
-
-1;
index cb3bdd50a1b607abb85390834d08a2e1bd9f7ca0..e35141b4486ef10c62c8a684d6b883273f2f42ab 100644 (file)
@@ -21,7 +21,6 @@ __PACKAGE__->meta->columns(
   project_id      => { type => 'integer' },
   staff_member_id => { type => 'integer', not_null => 1 },
   start_time      => { type => 'timestamp', not_null => 1 },
   project_id      => { type => 'integer' },
   staff_member_id => { type => 'integer', not_null => 1 },
   start_time      => { type => 'timestamp', not_null => 1 },
-  type_id         => { type => 'integer' },
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
 );
 
 __PACKAGE__->meta->primary_key_columns([ 'id' ]);
@@ -48,11 +47,6 @@ __PACKAGE__->meta->foreign_keys(
     class       => 'SL::DB::Employee',
     key_columns => { staff_member_id => 'id' },
   },
     class       => 'SL::DB::Employee',
     key_columns => { staff_member_id => 'id' },
   },
-
-  type => {
-    class       => 'SL::DB::TimeRecordingType',
-    key_columns => { type_id => 'id' },
-  },
 );
 
 1;
 );
 
 1;
diff --git a/SL/DB/MetaSetup/TimeRecordingType.pm b/SL/DB/MetaSetup/TimeRecordingType.pm
deleted file mode 100644 (file)
index 2852d46..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-# This file has been auto-generated. Do not modify it; it will be overwritten
-# by rose_auto_create_model.pl automatically.
-package SL::DB::TimeRecordingType;
-
-use strict;
-
-use parent qw(SL::DB::Object);
-
-__PACKAGE__->meta->table('time_recording_types');
-
-__PACKAGE__->meta->columns(
-  abbreviation => { type => 'text', not_null => 1 },
-  description  => { type => 'text' },
-  id           => { type => 'serial', not_null => 1 },
-  obsolete     => { type => 'boolean', default => 'false', not_null => 1 },
-  position     => { type => 'integer', not_null => 1 },
-);
-
-__PACKAGE__->meta->primary_key_columns([ 'id' ]);
-
-1;
-;
diff --git a/SL/DB/TimeRecordingType.pm b/SL/DB/TimeRecordingType.pm
deleted file mode 100644 (file)
index 06c1b5f..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-# This file has been auto-generated only because it didn't exist.
-# Feel free to modify it at will; it will not be overwritten automatically.
-
-package SL::DB::TimeRecordingType;
-
-use strict;
-
-use SL::DB::MetaSetup::TimeRecordingType;
-use SL::DB::Manager::TimeRecordingType;
-
-use SL::DB::Helper::ActsAsList;
-
-__PACKAGE__->meta->initialize;
-
-1;
index f4847d2a495b49740a4a48a36a2fa556948c21df..cb1dd1ac3c6d1a09f484194478aa07eea014d412 100755 (executable)
@@ -97,7 +97,6 @@ $self->{texts} = {
   '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.',
   '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.',
   'AUTOMATICALLY MATCH BINS'    => 'LAGERPLÄTZE AUTOMATISCH ZUWEISEN',
   '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.',
   '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.',
   'AUTOMATICALLY MATCH BINS'    => 'LAGERPLÄTZE AUTOMATISCH ZUWEISEN',
-  'Abbreviation'                => 'Abkürzung',
   'Abbreviation Legend'         => 'Beschreibung der Typ-Abkürzungen (1 Zeichen Typ, 1-2 Zeichen Klassifizierung)',
   'Abort'                       => 'Abbrechen',
   'Abrechnungsnummer'           => 'Abrechnungsnummer',
   'Abbreviation Legend'         => 'Beschreibung der Typ-Abkürzungen (1 Zeichen Typ, 1-2 Zeichen Klassifizierung)',
   'Abort'                       => 'Abbrechen',
   'Abrechnungsnummer'           => 'Abrechnungsnummer',
@@ -242,7 +241,6 @@ $self->{texts} = {
   'Add sub function block'      => 'Unterfunktionsblock hinzufügen',
   'Add taxzone'                 => 'Steuerzone hinzufügen',
   'Add text block'              => 'Textblock erfassen',
   'Add sub function block'      => 'Unterfunktionsblock hinzufügen',
   'Add taxzone'                 => 'Steuerzone hinzufügen',
   'Add text block'              => 'Textblock erfassen',
-  'Add time recording type'     => 'Typ für Zeiterfassung erfassen',
   'Add title'                   => 'Titel hinzufügen',
   'Add unit'                    => 'Einheit hinzufügen',
   'Added sections and function blocks: #1' => 'Hinzugefügte Abschnitte und Funktionsblöcke: #1',
   'Add title'                   => 'Titel hinzufügen',
   'Add unit'                    => 'Einheit hinzufügen',
   'Added sections and function blocks: #1' => 'Hinzugefügte Abschnitte und Funktionsblöcke: #1',
@@ -1275,7 +1273,6 @@ $self->{texts} = {
   'Edit the request_quotation'  => 'Bearbeiten der Preisanfrage',
   'Edit the sales_order'        => 'Bearbeiten des Auftrags',
   'Edit the sales_quotation'    => 'Bearbeiten des Angebots',
   'Edit the request_quotation'  => 'Bearbeiten der Preisanfrage',
   'Edit the sales_order'        => 'Bearbeiten des Auftrags',
   'Edit the sales_quotation'    => 'Bearbeiten des Angebots',
-  'Edit time recording type'    => 'Typ für Zeiterfassung bearbeiten',
   'Edit time recordings of all staff members' => 'Zeiterfassungseinträge aller Mitarbeiter bearbeiten',
   'Edit title'                  => 'Titiel bearbeiten',
   'Edit units'                  => 'Einheiten bearbeiten',
   'Edit time recordings of all staff members' => 'Zeiterfassungseinträge aller Mitarbeiter bearbeiten',
   'Edit title'                  => 'Titiel bearbeiten',
   'Edit units'                  => 'Einheiten bearbeiten',
@@ -3756,7 +3753,6 @@ $self->{texts} = {
   'Time'                        => 'Zeit',
   'Time Format'                 => 'Uhrzeitformat',
   'Time Recording'              => 'Zeiterfassung',
   'Time'                        => 'Zeit',
   'Time Format'                 => 'Uhrzeitformat',
   'Time Recording'              => 'Zeiterfassung',
-  'Time Recording Types'        => 'Typen für Zeiterfassung',
   'Time Recordings'             => 'Zeiterfassung',
   'Time and price estimate'     => 'Zeit- und Preisschätzung',
   'Time estimate'               => 'Zeitschätzung',
   'Time Recordings'             => 'Zeiterfassung',
   'Time and price estimate'     => 'Zeit- und Preisschätzung',
   'Time estimate'               => 'Zeitschätzung',
index cc699053604f8dad56a7d5ce529f8b0b320c82db..ee4f24f34597d85fcdb1c20efbb021b18db812e0 100644 (file)
@@ -97,7 +97,6 @@ $self->{texts} = {
   '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.' => '',
   'ATTENTION! You can not simply change it from periodic to perpetual once you started posting.' => '',
   'AUTOMATICALLY MATCH BINS'    => '',
   '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.' => '',
   'ATTENTION! You can not simply change it from periodic to perpetual once you started posting.' => '',
   'AUTOMATICALLY MATCH BINS'    => '',
-  'Abbreviation'                => '',
   'Abbreviation Legend'         => '',
   'Abort'                       => '',
   'Abrechnungsnummer'           => '',
   'Abbreviation Legend'         => '',
   'Abort'                       => '',
   'Abrechnungsnummer'           => '',
@@ -242,7 +241,6 @@ $self->{texts} = {
   'Add sub function block'      => '',
   'Add taxzone'                 => '',
   'Add text block'              => '',
   'Add sub function block'      => '',
   'Add taxzone'                 => '',
   'Add text block'              => '',
-  'Add time recording type'     => '',
   'Add title'                   => '',
   'Add unit'                    => '',
   'Added sections and function blocks: #1' => '',
   'Add title'                   => '',
   'Add unit'                    => '',
   'Added sections and function blocks: #1' => '',
@@ -1275,7 +1273,6 @@ $self->{texts} = {
   'Edit the request_quotation'  => '',
   'Edit the sales_order'        => '',
   'Edit the sales_quotation'    => '',
   'Edit the request_quotation'  => '',
   'Edit the sales_order'        => '',
   'Edit the sales_quotation'    => '',
-  'Edit time recording type'    => '',
   'Edit time recordings of all staff members' => '',
   'Edit title'                  => '',
   'Edit units'                  => '',
   'Edit time recordings of all staff members' => '',
   'Edit title'                  => '',
   'Edit units'                  => '',
@@ -3754,7 +3751,6 @@ $self->{texts} = {
   'Time'                        => '',
   'Time Format'                 => '',
   'Time Recording'              => '',
   'Time'                        => '',
   'Time Format'                 => '',
   'Time Recording'              => '',
-  'Time Recording Types'        => '',
   'Time Recordings'             => '',
   'Time and price estimate'     => '',
   'Time estimate'               => '',
   'Time Recordings'             => '',
   'Time and price estimate'     => '',
   'Time estimate'               => '',
diff --git a/sql/Pg-upgrade2/time_recordings_remove_type.sql b/sql/Pg-upgrade2/time_recordings_remove_type.sql
new file mode 100644 (file)
index 0000000..db79bba
--- /dev/null
@@ -0,0 +1,6 @@
+-- @tag: time_recordings_remove_type
+-- @description: Zeiterfassungs-Typen entfernen
+-- @depends: time_recordings time_recordings2
+
+ALTER TABLE time_recordings DROP column type_id;
+DROP TABLE time_recording_types;
index 0493b2d04df6f0c1376be31956619c256cd04593..08a871f9764b0812e4cbb2025739b071ee6d3d0d 100644 (file)
@@ -18,7 +18,6 @@
         <th>[% 'Start' | $T8 %]</th>
         <th>[% 'End' | $T8 %]</th>
         <th>[% 'Customer' | $T8 %]</th>
         <th>[% 'Start' | $T8 %]</th>
         <th>[% 'End' | $T8 %]</th>
         <th>[% 'Customer' | $T8 %]</th>
-        <th>[% 'Type' | $T8 %]</th>
         <th>[% 'Project' | $T8 %]</th>
         <th>[% 'Description' | $T8 %]</th>
         <th>[% 'Mitarbeiter' | $T8 %]</th>
         <th>[% 'Project' | $T8 %]</th>
         <th>[% 'Description' | $T8 %]</th>
         <th>[% 'Mitarbeiter' | $T8 %]</th>
@@ -37,7 +36,6 @@
           [% P.button_tag('kivi.TimeRecording.set_current_date_time("end")', LxERP.t8('now')) %]
         </td>
         <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>
           [% P.button_tag('kivi.TimeRecording.set_current_date_time("end")', LxERP.t8('now')) %]
         </td>
         <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>
-        <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>
         <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, style='width: 300px') %]</td>
         <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>
         <td>
         <td>[% P.project.picker('time_recording.project_id', SELF.time_recording.project_id, style='width: 300px') %]</td>
         <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>
         <td>