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) ],
);
start_time => t8('Start'),
end_time => t8('End'),
customer => t8('Customer'),
- type => t8('Type'),
project => t8('Project'),
description => t8('Description'),
staff_member => t8('Mitarbeiter'),
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 ]);
}
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 },
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(?)
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;
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',
+++ /dev/null
-# 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;
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' ]);
class => 'SL::DB::Employee',
key_columns => { staff_member_id => 'id' },
},
-
- type => {
- class => 'SL::DB::TimeRecordingType',
- key_columns => { type_id => 'id' },
- },
);
1;
+++ /dev/null
-# 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;
-;
+++ /dev/null
-# 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;
'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',
'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',
'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',
'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',
'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' => '',
'Add sub function block' => '',
'Add taxzone' => '',
'Add text block' => '',
- 'Add time recording type' => '',
'Add title' => '',
'Add unit' => '',
'Added sections and function blocks: #1' => '',
'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' => '',
'Time' => '',
'Time Format' => '',
'Time Recording' => '',
- 'Time Recording Types' => '',
'Time Recordings' => '',
'Time and price estimate' => '',
'Time estimate' => '',
--- /dev/null
+-- @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;
<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>
[% 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>