X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fprojects.pl;h=b7614ffc62c6a6ae9b698f7e602f312ab60d6427;hb=c57ef415561fbdbbf95e45516dc71a643e22369a;hp=0e74d53e2277d7cb5d58f9ce3032bb34b307cf4c;hpb=b65a230d60e86d2c18a3ab7222379905aea5ecd7;p=kivitendo-erp.git diff --git a/bin/mozilla/projects.pl b/bin/mozilla/projects.pl index 0e74d53e2..b7614ffc6 100644 --- a/bin/mozilla/projects.pl +++ b/bin/mozilla/projects.pl @@ -92,6 +92,7 @@ sub search { $form->{CUSTOM_VARIABLES_INCLUSION_CODE}) = CVar->render_search_options('variables' => $form->{CUSTOM_VARIABLES}, 'include_prefix' => 'l_', 'include_value' => 'Y'); + $::request->{layout}->focus('#projectnumber'); $form->header(); print $form->parse_html_template('projects/search'); @@ -118,8 +119,6 @@ sub project_report { my $report = SL::ReportGenerator->new(\%myconfig, $form); my @columns = qw(projectnumber description active); - my @hidden_vars = ('filter'); - my $href = build_std_url('action=project_report', @hidden_vars); my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs }; my %column_defs_cvars = (); @@ -132,6 +131,11 @@ sub project_report { push @columns, map { "cvar_$_->{name}" } @includeable_custom_variables; + + my @hidden_vars = ('filter', map { ('cvar_'. $_->{name} , 'l_cvar_'. $_->{name}) } @includeable_custom_variables); + my $href = build_std_url('action=project_report', @hidden_vars); + + my %column_defs = ( 'projectnumber' => { 'text' => $locale->text('Number'), }, 'description' => { 'text' => $locale->text('Description'), }, @@ -149,6 +153,13 @@ sub project_report { $report->set_export_options('project_report', @hidden_vars, 'sort'); + CVar->add_custom_variables_to_report('module' => 'Project', + 'trans_id_field' => 'id', + 'configs' => $cvar_configs, + 'column_defs' => \%column_defs, + 'data' => $form->{project_list}, + ); + $report->set_sort_indicator($form->{sort}, 1); my @options; @@ -168,6 +179,7 @@ sub project_report { 'attachment_basename' => $locale->text('project_list') . strftime('_%Y%m%d', localtime time), ); $report->set_options_from_form(); + $locale->set_numberformat_wo_thousands_separator(\%myconfig) if lc($report->{options}->{output_format}) eq 'csv'; CVar->add_custom_variables_to_report('module' => 'Projects', 'trans_id_field' => 'id', @@ -206,7 +218,7 @@ sub display_project_form { $form->{title} = $form->{project}->{id} ? $locale->text("Edit Project") : $locale->text("Add Project"); $form->{CUSTOM_VARIABLES} = CVar->get_custom_variables('module' => 'Projects', 'trans_id' => $form->{project}->{id}); - $main::lxdebug->dump(0, "cv", $form->{CUSTOM_VARIABLES}); +# $main::lxdebug->dump(0, "cv", $form->{CUSTOM_VARIABLES}); CVar->render_inputs('variables' => $form->{CUSTOM_VARIABLES}) if (scalar @{ $form->{CUSTOM_VARIABLES} }); $form->header(); @@ -235,7 +247,7 @@ sub save { $form->{id} = $project->{id}; $form->{snumbers} = qq|projectnumber_| . $project->{projectnumber}; $form->{addition} = "SAVED"; - $form->save_history($form->dbconnect(\%myconfig)); + $form->save_history; } # /saving the history @@ -278,7 +290,7 @@ sub delete { if(!exists $form->{addition}) { $form->{snumbers} = qq|projectnumber_| . $project->{projectnumber}; $form->{addition} = "DELETED"; - $form->save_history($form->dbconnect(\%myconfig)); + $form->save_history; } # /saving the history