From 9b67d27cd821260c8577a94358345f98e95a92db Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 20 Feb 2012 17:03:10 +0100 Subject: [PATCH] =?utf8?q?Lieferadressen,=20gel=C3=B6schte=20aber=20ausgew?= =?utf8?q?=C3=A4hlte=20weiterhin=20einblenden.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/do.pl | 6 ++++-- bin/mozilla/ir.pl | 3 +-- bin/mozilla/is.pl | 7 ++++--- bin/mozilla/oe.pl | 7 ++++--- templates/webpages/do/form_header.html | 12 +----------- templates/webpages/is/form_header.html | 2 +- templates/webpages/oe/form_header.html | 2 +- 7 files changed, 16 insertions(+), 23 deletions(-) diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index e16286de5..ccc5f2b13 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -266,8 +266,7 @@ sub form_header { if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"})); my $vc = $form->{vc} eq "customer" ? "customers" : "vendors"; - $form->get_lists("shipto" => "ALL_SHIPTO", - "projects" => { + $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 0, "old_id" => \@old_project_ids @@ -280,6 +279,9 @@ sub form_header { $::form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); $::form->{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); + $::form->{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [ + or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ] + ]); $::form->{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [ or => [ cp_cv_id => $::form->{"$::form->{vc}_id"} * 1, diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index cd4591d26..7d5c36ab6 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -283,8 +283,7 @@ sub form_header { my @old_project_ids = ($form->{"globalproject_id"}); map { push @old_project_ids, $form->{"project_id_$_"} if $form->{"project_id_$_"}; } 1..$form->{"rowcount"}; - $form->get_lists("shipto" => "ALL_SHIPTO", - "projects" => { "key" => "ALL_PROJECTS", + $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 0, "old_id" => \@old_project_ids }, "taxzones" => "ALL_TAXZONES", diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 6f433a98a..9c6cd67a5 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -300,8 +300,7 @@ sub form_header { my @old_project_ids = ($form->{"globalproject_id"}); map { push @old_project_ids, $form->{"project_id_$_"} if $form->{"project_id_$_"}; } 1..$form->{"rowcount"}; - $form->get_lists("shipto" => "ALL_SHIPTO", - "projects" => { "key" => "ALL_PROJECTS", + $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 0, "old_id" => \@old_project_ids }, "taxzones" => "ALL_TAXZONES", @@ -312,6 +311,9 @@ sub form_header { $TMPL_VAR{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); $TMPL_VAR{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); + $TMPL_VAR{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [ + or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ] + ]); $TMPL_VAR{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [ or => [ cp_cv_id => $::form->{"$::form->{vc}_id"} * 1, @@ -321,7 +323,6 @@ sub form_header { ] ] ]); - $TMPL_VAR{shipto_labels} = sub { join "; ", grep { $_ } map { $_[0]->{"shipto${_}" } } qw(name department_1 street city) }; $TMPL_VAR{department_labels} = sub { "$_[0]->{description}--$_[0]->{id}" }; # customer diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 3b62071a7..39ec0eb2f 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -327,8 +327,7 @@ sub form_header { my @old_project_ids = ($form->{"globalproject_id"}, grep { $_ } map { $form->{"project_id_$_"} } 1..$form->{"rowcount"}); my $vc = $form->{vc} eq "customer" ? "customers" : "vendors"; - $form->get_lists("shipto" => "ALL_SHIPTO", - "projects" => { "key" => "ALL_PROJECTS", + $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 0, "old_id" => \@old_project_ids }, "taxzones" => "ALL_TAXZONES", @@ -342,6 +341,9 @@ sub form_header { # label subs $TMPL_VAR{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); $TMPL_VAR{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); + $TMPL_VAR{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [ + or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, shipto_id => $::form->{shipto_id} * 1 ] + ]); $TMPL_VAR{ALL_CONTACTS} = SL::DB::Manager::Contact->get_all(query => [ or => [ cp_cv_id => $::form->{"$::form->{vc}_id"} * 1, @@ -352,7 +354,6 @@ sub form_header { ] ]); $TMPL_VAR{sales_employee_labels} = sub { $_[0]->{name} || $_[0]->{login} }; - $TMPL_VAR{shipto_labels} = sub { join "; ", grep { $_ } map { $_[0]->{"shipto${_}" } } qw(name department_1 street city) }; $TMPL_VAR{department_labels} = sub { "$_[0]->{description}--$_[0]->{id}" }; # vendor/customer diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index b195637e8..000811e39 100644 --- a/templates/webpages/do/form_header.html +++ b/templates/webpages/do/form_header.html @@ -159,17 +159,7 @@ [%- END %] [%- ELSE %] - + [% L.select_tag('shipto_id', L.options_for_select(ALL_SHIPTO, default=shipto_id, value='shipto_id', title='displayable_id', with_empty=1), class='fixed_width') %] [%- END %] diff --git a/templates/webpages/is/form_header.html b/templates/webpages/is/form_header.html index 6b25e8a8d..80dd758e1 100644 --- a/templates/webpages/is/form_header.html +++ b/templates/webpages/is/form_header.html @@ -63,7 +63,7 @@ [% 'Shipping Address' | $T8 %] - [% L.select_tag('shipto_id', L.options_for_select(ALL_SHIPTO, default=shipto_id, value='shipto_id', title_sub=\shipto_labels, with_empty=1), style='width: 250px', onChange="document.getElementById('update_button').click();") %] + [% L.select_tag('shipto_id', L.options_for_select(ALL_SHIPTO, default=shipto_id, value='shipto_id', title='displayable_id', with_empty=1), style='width: 250px', onChange="document.getElementById('update_button').click();") %] [%- END %] diff --git a/templates/webpages/oe/form_header.html b/templates/webpages/oe/form_header.html index 68c2286eb..ed67b02e3 100644 --- a/templates/webpages/oe/form_header.html +++ b/templates/webpages/oe/form_header.html @@ -66,7 +66,7 @@ [% 'Shipping Address' | $T8 %] - [% L.select_tag('shipto_id', L.options_for_select(ALL_SHIPTO, default=shipto_id, value='shipto_id', title_sub=\shipto_labels, with_empty=1), style='width: 250px', onChange="document.getElementById('update_button').click();") %] + [% L.select_tag('shipto_id', L.options_for_select(ALL_SHIPTO, default=shipto_id, value='shipto_id', title='displayable_id', with_empty=1), style='width: 250px', onChange="document.getElementById('update_button').click();") %] [%- END %] -- 2.20.1