From: Jan Büren Date: Wed, 12 Oct 2011 14:44:44 +0000 (+0200) Subject: Merge branch 'master' of git@vc.linet-services.de:public/lx-office-erp X-Git-Tag: release-2.7.0beta1~230^2~1 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/debd14edcc23a6168e827be861a052f396aee901?hp=80b36869dd9b1ff2ed9063fabe79ca5001dc276e Merge branch 'master' of git@vc.linet-services.de:public/lx-office-erp --- diff --git a/SL/Controller/Department.pm b/SL/Controller/Department.pm index d1ba94239..03d3fb676 100644 --- a/SL/Controller/Department.pm +++ b/SL/Controller/Department.pm @@ -30,7 +30,6 @@ sub action_list { sub action_new { my ($self) = @_; - $self->{department} = SL::DB::Department->new(role => 'P'); $self->render('department/form', title => $::locale->text('Create a new department')); } @@ -89,7 +88,6 @@ sub create_or_update { $self->render('department/form', title => $is_new ? $::locale->text('Create a new department') : $::locale->text('Edit department')); return; } - $self->{department}->save; flash_later('info', $is_new ? $::locale->text('The department has been created.') : $::locale->text('The department has been saved.')); diff --git a/SL/DB/MetaSetup/Department.pm b/SL/DB/MetaSetup/Department.pm index 1d1d95709..93aa92cdc 100644 --- a/SL/DB/MetaSetup/Department.pm +++ b/SL/DB/MetaSetup/Department.pm @@ -12,14 +12,11 @@ __PACKAGE__->meta->setup( columns => [ id => { type => 'integer', not_null => 1, sequence => 'id' }, description => { type => 'text' }, - role => { type => 'character', default => 'P', length => 1 }, itime => { type => 'timestamp', default => 'now()' }, mtime => { type => 'timestamp' }, ], primary_key_columns => [ 'id' ], - - allow_inline_column_values => 1, ); 1; diff --git a/SL/Form.pm b/SL/Form.pm index a1bb2b1f3..b9ba6942f 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -2757,20 +2757,12 @@ sub all_vc { @{ $self->{all_employees} } = sort { $a->{name} cmp $b->{name} } @{ $self->{all_employees} }; - if ($module eq 'AR') { # prepare query for departments $query = qq|SELECT id, description FROM department - WHERE role = 'P' ORDER BY description|; - } else { - $query = qq|SELECT id, description - FROM department - ORDER BY description|; - } - $self->{all_departments} = selectall_hashref_query($self, $dbh, $query); # get languages @@ -2840,15 +2832,9 @@ sub all_departments { my ($self, $myconfig, $table) = @_; my $dbh = $self->get_standard_dbh($myconfig); - my $where; - - if ($table eq 'customer') { - $where = "WHERE role = 'P' "; - } my $query = qq|SELECT id, description FROM department - $where ORDER BY description|; $self->{all_departments} = selectall_hashref_query($self, $dbh, $query); diff --git a/sql/Pg-upgrade2/department_drop_role.sql b/sql/Pg-upgrade2/department_drop_role.sql new file mode 100644 index 000000000..a7f221a8d --- /dev/null +++ b/sql/Pg-upgrade2/department_drop_role.sql @@ -0,0 +1,8 @@ +-- @tag: department_drop_role +-- @description: Kosten- und Erfolgstellen zu unterscheiden macht(e) mittlerweile keinen Sinn mehr, da man ja entsprechend Kosten als Erfolg auf eine Kostenstelle buchen möchte. Ferner wird auch die Auswahlliste schon länger nicht mehr unterschieden +-- @depends: release_2_6_3 +-- @charset: utf-8 +-- @ignore: 0 + + +ALTER TABLE department DROP COLUMN role; diff --git a/sql/Pg-upgrade2/license_invoice_drop.sql b/sql/Pg-upgrade2/license_invoice_drop.sql new file mode 100644 index 000000000..6d88a3baa --- /dev/null +++ b/sql/Pg-upgrade2/license_invoice_drop.sql @@ -0,0 +1,8 @@ +-- @tag: license_invoice_drop +-- @description: Weder Lizenzen noch Lizenzrechnungen können an der Oberfläche erfasst werden. Konsequenterweise auch die entsprechende Datenbankeinträge rausnehmen. +-- @depends: release_2_6_3 +-- @charset: utf-8 +-- @ignore: 0 +DROP TABLE license; +DROP TABLE licenseinvoice; +--DROP SEQUENCE licenseinvoice_id_seq; --wird schon automatisch mit entfernt diff --git a/sql/Pg-upgrade2/parts_add_unit_foreign_key.sql b/sql/Pg-upgrade2/parts_add_unit_foreign_key.sql new file mode 100644 index 000000000..0c6fc1d57 --- /dev/null +++ b/sql/Pg-upgrade2/parts_add_unit_foreign_key.sql @@ -0,0 +1,6 @@ +-- @tag: parts_add_unit_foreign_key +-- @description: Einheiten die Waren zugeordnet sind entsprechend als Fremdschlüssel verknüpfen. +-- @depends: release_2_6_3 +-- @charset: utf-8 +-- @ignore: 0 +ALTER TABLE parts ADD FOREIGN KEY (unit) REFERENCES units(name); diff --git a/templates/webpages/department/form.html b/templates/webpages/department/form.html index 2dc0dd9d8..d009ea0c3 100644 --- a/templates/webpages/department/form.html +++ b/templates/webpages/department/form.html @@ -12,20 +12,6 @@ [%- 'Description' | $T8 %] [% L.input_tag("department.description", SELF.department.description) %] - - - [%- 'Type' | $T8 %] - - [%- IF is_used %] - [% L.hidden_tag("role", SELF.department.role) %] - [%- IF SELF.department.role == "C" %][%- LxERP.t8('Cost Center') %][%- ELSE %][%- LxERP.t8('Profit Center') %][%- END %] - [%- ELSE %] - [% L.radio_button_tag("department.role", "value", "C", "label", LxERP.t8("Cost Center"), "checked", SELF.department.role == "C") %] -
- [% L.radio_button_tag("department.role", "value", "P", "label", LxERP.t8("Profit Center"), "checked", SELF.department.role == "P") %] - [%- END %] - -

diff --git a/templates/webpages/department/list.html b/templates/webpages/department/list.html index 059aa33b0..7433aa95a 100644 --- a/templates/webpages/department/list.html +++ b/templates/webpages/department/list.html @@ -16,8 +16,6 @@ [%- 'Description' | $T8 %] - [%- 'Cost Center' | $T8 %] - [%- 'Profit Center' | $T8 %] @@ -29,8 +27,6 @@ [%- HTML.escape(department.description) %] - [%- IF department.role == 'C' %]X[%- END %] - [%- IF department.role == 'P' %]X[%- END %] [%- END %]