From: Moritz Bunkus Date: Tue, 20 Feb 2007 09:11:32 +0000 (+0000) Subject: Berichte -> GuV und BWA: Projektauswahl als Drop-Down-Box. Bei BWA erscheint aber... X-Git-Tag: release-2.4.2~81 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=185d7c5bea8e3b9098d81bf98a3da5c23db8fd84;p=kivitendo-erp.git Berichte -> GuV und BWA: Projektauswahl als Drop-Down-Box. Bei BWA erscheint aber noch ein SQL-Fehler, wenn ein Projekt ausgewählt wird. --- diff --git a/bin/mozilla/rp.pl b/bin/mozilla/rp.pl index fef3355b5..5cdeaa510 100644 --- a/bin/mozilla/rp.pl +++ b/bin/mozilla/rp.pl @@ -36,6 +36,7 @@ #====================================================================== require "$form->{path}/arap.pl"; +require "bin/mozilla/common.pl"; use SL::PE; use SL::RP; @@ -130,6 +131,21 @@ sub report { | if $form->{selectdepartment}; + $form->get_lists("projects" => { "key" => "ALL_PROJECTS", + "all" => 1 }); + + my %project_labels = (); + my @project_values = (""); + foreach my $item (@{ $form->{"ALL_PROJECTS"} }) { + push(@project_values, $item->{"id"}); + $project_labels{$item->{"id"}} = $item->{"projectnumber"}; + } + + my $projectnumber = + NTI($cgi->popup_menu('-name' => "project_id", + '-values' => \@project_values, + '-labels' => \%project_labels)); + # use JavaScript Calendar or not $form->{jsscript} = $jscalendar; $jsscript = ""; @@ -280,7 +296,7 @@ $jsscript print qq| | . $locale->text('Project') . qq| - + $projectnumber @@ -390,7 +406,7 @@ $jsscript print qq| | . $locale->text('Project') . qq| - + $projectnumber @@ -1062,10 +1078,6 @@ sub generate_income_statement { $form->{endbold} = ""; $form->{br} = "
"; - &get_project(generate_income_statement); - - $form->{projectnumber} = $form->{projectnumber_1}; - if ($form->{reporttype} eq "custom") { #forgotten the year --> thisyear @@ -2714,8 +2726,6 @@ sub generate_bwa { $form->{endbold} = ""; $form->{br} = "
"; - # &get_project(generate_bwa); - if ($form->{reporttype} eq "custom") { #forgotten the year --> thisyear