From 2ad2d77d0a1f588c03acc8fd05c1817b70a99e27 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Wed, 15 Jul 2015 12:24:29 +0200 Subject: [PATCH] =?utf8?q?Projektliste=20in=20Detailsanzeige=20bei=20Angeb?= =?utf8?q?oten,=20Auftr=C3=A4gen=20und=20VK-Rechnungen=20f=C3=BCllen=20(v2?= =?utf8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit oe und is speichern die Projekt-Dropdowns, die im jeweiligen form_header zusammengebaut werden, in $TMPL_VAR{ALL_PROJECTS}. Das Projekt-Dropdown in io.pl für die Detailsanzeige (zweite Positionszeile) greift hingegen für alle Belege auf $form->{ALL_PROJECTS} zu, daher werden die Elemente nochmal gesondert in $form gespeichert. --- bin/mozilla/is.pl | 1 + bin/mozilla/oe.pl | 1 + 2 files changed, 2 insertions(+) diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index e184cd8cb..dec398d58 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -320,6 +320,7 @@ sub form_header { ]); $TMPL_VAR{ALL_PROJECTS} = SL::DB::Manager::Project->get_all_sorted(query => \@conditions); + $form->{ALL_PROJECTS} = $TMPL_VAR{ALL_PROJECTS}; # make projects available for second row drop-down in io.pl $TMPL_VAR{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all_sorted(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); $TMPL_VAR{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all_sorted(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); $TMPL_VAR{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all_sorted(query => [ diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index c3242ec29..1d3fe7f90 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -376,6 +376,7 @@ sub form_header { ]); $TMPL_VAR{ALL_PROJECTS} = SL::DB::Manager::Project->get_all_sorted(query => \@conditions); + $form->{ALL_PROJECTS} = $TMPL_VAR{ALL_PROJECTS}; # make projects available for second row drop-down in io.pl # label subs my $employee_list_query_gen = sub { $::form->{$_[0]} ? [ or => [ id => $::form->{$_[0]}, deleted => 0 ] ] : [ deleted => 0 ] }; -- 2.20.1