From 0884406403ce36af3484924086527ba689807329 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 21 Jan 2008 17:37:48 +0000 Subject: [PATCH] Projektverwaltung in eine eigene Datei ausgelagert und auf die Verwendung von Template umgestellt. --- SL/Form.pm | 1 + SL/PE.pm | 135 +------- SL/Projects.pm | 204 ++++++++++++ bin/mozilla/arap.pl | 5 +- bin/mozilla/pe.pl | 298 +----------------- bin/mozilla/projects.pl | 232 ++++++++++++++ locale/de/all | 5 +- locale/de/pe | 17 - locale/de/projects | 202 ++++++++++++ menu.ini | 6 +- projects.pl | 1 + .../webpages/projects/project_form_de.html | 63 ++++ .../projects/project_form_master.html | 63 ++++ templates/webpages/projects/search_de.html | 52 +++ .../webpages/projects/search_master.html | 52 +++ 15 files changed, 883 insertions(+), 453 deletions(-) create mode 100644 SL/Projects.pm create mode 100644 bin/mozilla/projects.pl create mode 100644 locale/de/projects create mode 120000 projects.pl create mode 100644 templates/webpages/projects/project_form_de.html create mode 100644 templates/webpages/projects/project_form_master.html create mode 100644 templates/webpages/projects/search_de.html create mode 100644 templates/webpages/projects/search_master.html diff --git a/SL/Form.pm b/SL/Form.pm index d7da58c16..290eb754e 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -763,6 +763,7 @@ sub parse_html_template { if (!$template->process($file, $additional_params, \$output)) { print STDERR $template->error(); } + $main::lxdebug->message(0, "err " . $template->error()); $output = $main::locale->{iconv}->convert($output) if ($main::locale); diff --git a/SL/PE.pm b/SL/PE.pm index d04c57683..d165a2f9a 100644 --- a/SL/PE.pm +++ b/SL/PE.pm @@ -28,8 +28,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #====================================================================== # -# Project module -# also used for partsgroups +# Partsgroups and pricegroups # #====================================================================== @@ -39,133 +38,6 @@ use Data::Dumper; use SL::DBUtils; -sub projects { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $form) = @_; - - # connect to database - my $dbh = $form->dbconnect($myconfig); - - my ($where, @values); - - foreach my $column (qw(projectnumber description)) { - if ($form->{$column}) { - $where .= qq|AND $column ILIKE ? |; - push(@values, '%' . $form->{$column} . '%'); - } - } - - if ($form->{status} eq 'orphaned') { - my %col_prefix = ("ar" => "global", "ap" => "global", "oe" => "global"); - my $first = 1; - - $where .= qq|AND id NOT IN (|; - foreach my $table (qw(acc_trans invoice orderitems rmaitems ar ap oe)) { - $where .= "UNION " unless ($first); - $first = 0; - $where .= - qq|SELECT DISTINCT $col_prefix{$table}project_id FROM $table | . - qq|WHERE NOT $col_prefix{$table}project_id ISNULL |; - } - $where .= qq|) |; - } - - if ($form->{active} eq "active") { - $where .= qq|AND active |; - } elsif ($form->{active} eq "inactive") { - $where .= qq|AND NOT active |; - } - - substr($where, 0, 4) = "WHERE " if ($where); - - my $sortorder = $form->{sort} ? $form->{sort} : "projectnumber"; - $sortorder =~ s/[^a-z_]//g; - my $query = - qq|SELECT id, projectnumber, description, active | . - qq|FROM project | . - $where . - qq|ORDER BY $sortorder|; - - $form->{project_list} = - selectall_hashref_query($form, $dbh, $query, @values); - $dbh->disconnect; - - $main::lxdebug->leave_sub(); - - return scalar(@{ $form->{project_list} }); -} - -sub get_project { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $form) = @_; - - # connect to database - my $dbh = $form->dbconnect($myconfig); - - my $query = - qq|SELECT * FROM project | . - qq|WHERE id = ?|; - my @values = ($form->{id}); - my $sth = $dbh->prepare($query); - $sth->execute(@values) || $form->dberror($query); - - my $ref = $sth->fetchrow_hashref(NAME_lc); - - map { $form->{$_} = $ref->{$_} } keys %$ref; - - $sth->finish; - - # check if it is orphaned - my %col_prefix = ("ar" => "global", "ap" => "global", "oe" => "global"); - @values = (); - $query = qq|SELECT |; - my $first = 1; - foreach my $table (qw(acc_trans invoice orderitems rmaitems ar ap oe)) { - $query .= " + " unless ($first); - $first = 0; - $query .= - qq|(SELECT COUNT(*) FROM $table | . - qq| WHERE $col_prefix{$table}project_id = ?) |; - push(@values, $form->{id}); - } - - ($form->{orphaned}) = selectrow_query($form, $dbh, $query, @values); - $form->{orphaned} = !$form->{orphaned}; - - $dbh->disconnect; - - $main::lxdebug->leave_sub(); -} - -sub save_project { - $main::lxdebug->enter_sub(); - - my ($self, $myconfig, $form) = @_; - - # connect to database - my $dbh = $form->dbconnect($myconfig); - - my @values = ($form->{projectnumber}, $form->{description}); - - if ($form->{id}) { - $query = - qq|UPDATE project SET projectnumber = ?, description = ?, active = ? | . - qq|WHERE id = ?|; - push(@values, ($form->{active} ? 't' : 'f'), $form->{id}); - } else { - $query = - qq|INSERT INTO project (projectnumber, description, active) | . - qq|VALUES (?, ?, 't')|; - } - do_query($form, $dbh, $query, @values); - - $dbh->disconnect; - - $main::lxdebug->leave_sub(); -} - sub partsgroups { $main::lxdebug->enter_sub(); @@ -265,10 +137,7 @@ sub delete_tuple { # connect to database my $dbh = $form->dbconnect($myconfig); - my $table = - $form->{type} eq "project" ? "project" : - $form->{type} eq "pricegroup" ? "pricegroup" : - "partsgroup"; + my $table = $form->{type} eq "pricegroup" ? "pricegroup" : "partsgroup"; $query = qq|DELETE FROM $table WHERE id = ?|; do_query($form, $dbh, $query, $form->{id}); diff --git a/SL/Projects.pm b/SL/Projects.pm new file mode 100644 index 000000000..5327e91ad --- /dev/null +++ b/SL/Projects.pm @@ -0,0 +1,204 @@ +#===================================================================== +# LX-Office ERP +# Copyright (C) 2004 +# Based on SQL-Ledger Version 2.1.9 +# Web http://www.lx-office.org +# +#===================================================================== +# SQL-Ledger Accounting +# Copyright (C) 1998-2002 +# +# Author: Dieter Simader +# Email: dsimader@sql-ledger.org +# Web: http://www.sql-ledger.org +# +# Contributors: +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#====================================================================== +# +# Project module +# +#====================================================================== + +package Projects; + +use Data::Dumper; + +use SL::DBUtils; + +my %project_id_column_prefixes = ("ar" => "global", + "ap" => "global", + "oe" => "global", + "delivery_orders" => "global"); + +my @tables_with_project_id_cols = qw(acc_trans + invoice + orderitems + rmaitems + ar + ap + oe + delivery_orders + delivery_order_items); + +sub search_projects { + $main::lxdebug->enter_sub(); + + my $self = shift; + my %params = @_; + + my $myconfig = \%main::myconfig; + my $form = $main::form; + + my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig); + + my (@filters, @values); + + foreach my $column (qw(projectnumber description)) { + if ($params{$column}) { + push @filters, "$column ILIKE ?"; + push @values, '%' . $params{$column} . '%'; + } + } + + if ($params{status} eq 'orphaned') { + my @sub_filters; + + foreach my $table (@tables_with_project_id_cols) { + push @sub_filters, qq|SELECT DISTINCT $project_id_column_prefixes{$table}project_id FROM $table + WHERE NOT $project_id_column_prefixes{$table}project_id ISNULL|; + } + + push @filters, "id NOT IN (" . join(" UNION ", @sub_filters) . ")"; + } + + if ($params{active} eq "active") { + push @filters, 'active'; + + } elsif ($params{active} eq "inactive") { + push @filters, 'NOT COALESCE(active, FALSE)'; + } + + my $where = 'WHERE ' . join(' AND ', map { "($_)" } @filters) if (scalar @filters); + + my $sortorder = $params{sort} ? $params{sort} : "projectnumber"; + $sortorder =~ s/[^a-z_]//g; + my $query = qq|SELECT id, projectnumber, description, active + FROM project + $where + ORDER BY $sortorder|; + + $form->{project_list} = selectall_hashref_query($form, $dbh, $query, @values); + + $main::lxdebug->leave_sub(); + + return scalar(@{ $form->{project_list} }); +} + +sub get_project { + $main::lxdebug->enter_sub(); + + my $self = shift; + my %params = @_; + + if (!$params{id}) { + $main::lxdebug->leave_sub(); + return { }; + } + + my $myconfig = \%main::myconfig; + my $form = $main::form; + + my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig); + + my $project = selectfirst_hashref_query($form, $dbh, qq|SELECT * FROM project WHERE id = ?|, conv_i($params{id})) || { }; + + if ($params{orphaned}) { + # check if it is orphaned + my (@values, $query); + + foreach my $table (@tables_with_project_id_cols) { + $query .= " + " if ($query); + $query .= qq|(SELECT COUNT(*) FROM $table + WHERE $project_id_column_prefixes{$table}project_id = ?) |; + push @values, conv_i($params{id}); + } + + $query = 'SELECT ' . $query; + + ($project->{orphaned}) = selectrow_query($form, $dbh, $query, @values); + $project->{orphaned} = !$project->{orphaned}; + } + + $main::lxdebug->leave_sub(); + + return $project; +} + +sub save_project { + $main::lxdebug->enter_sub(); + + my $self = shift; + my %params = @_; + + my $myconfig = \%main::myconfig; + my $form = $main::form; + + my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig); + + my @values; + + if (!$params{id}) { + ($params{id}) = selectfirst_array_query($form, $dbh, qq|SELECT nextval('id')|); + do_query($form, $dbh, qq|INSERT INTO project (id) VALUES (?)|, conv_i($params{id})); + + $params{active} = 1; + } + + $query = qq|UPDATE project SET projectnumber = ?, description = ?, active = ? + WHERE id = ?|; + + @values = ($params{projectnumber}, $params{description}, $params{active} ? 't' : 'f', conv_i($params{id})); + do_query($form, $dbh, $query, @values); + + $dbh->commit(); + + $main::lxdebug->leave_sub(); + + return $params{id}; +} + +sub delete_project { + $main::lxdebug->enter_sub(); + + my $self = shift; + my %params = @_; + + Common::check_params(\%params, qw(id)); + + my $myconfig = \%main::myconfig; + my $form = $main::form; + + my $dbh = $params{dbh} || $form->get_standard_dbh($myconfig); + + do_query($form, $dbh, qq|DELETE FROM project WHERE id = ?|, conv_i($params{id})); + + $dbh->commit(); + + $main::lxdebug->leave_sub(); +} + +1; + diff --git a/bin/mozilla/arap.pl b/bin/mozilla/arap.pl index 38308a97b..8971da532 100644 --- a/bin/mozilla/arap.pl +++ b/bin/mozilla/arap.pl @@ -30,6 +30,8 @@ # common routines for gl, ar, ap, is, ir, oe # +use SL::Projects; + # any custom scripts for this one if (-f "bin/mozilla/custom_arap.pl") { eval { require "bin/mozilla/custom_arap.pl"; }; @@ -281,7 +283,8 @@ sub check_project { # get new project $form->{projectnumber} = $form->{"${prefix}projectnumber${suffix}"}; - if (($rows = PE->projects(\%myconfig, $form)) > 1) { + my %params = map { $_ => $form->{$_} } qw(projectnumber description active); + if (($rows = Projects->search_projects(%params)) > 1) { # check form->{project_list} how many there are $form->{rownumber} = $i; diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl index 5a617ba4d..8c6132ecb 100644 --- a/bin/mozilla/pe.pl +++ b/bin/mozilla/pe.pl @@ -27,8 +27,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #====================================================================== # -# project administration -# partsgroup administration +# partsgroup, pricegroup administration # #====================================================================== @@ -68,9 +67,6 @@ sub edit { #/show hhistory button $form->{title} = "Edit"; - if ($form->{type} eq 'project') { - PE->get_project(\%myconfig, \%$form); - } if ($form->{type} eq 'partsgroup') { PE->get_partsgroup(\%myconfig, \%$form); } @@ -88,33 +84,6 @@ sub search { $auth->assert('config'); - if ($form->{type} eq 'project') { - $report = "project_report"; - $sort = 'projectnumber'; - $form->{title} = $locale->text('Projects'); - - $number = qq| - - | . $locale->text('Number') . qq| - | . $cgi->textfield('-name' => 'projectnumber', '-size' => 20) . qq| - - - | . $locale->text('Description') . qq| - | . $cgi->textfield('-name' => 'description', '-size' => 60) . qq| - - -   - | . - $cgi->radio_group('-name' => 'active', '-default' => 'active', - '-values' => ['active', 'inactive', 'both'], - '-labels' => { 'active' => ' ' . $locale->text("Active"), - 'inactive' => ' ' . $locale->text("Inactive"), - 'both' => ' ' . $locale->text("Both") }) - . qq| - -|; - - } if ($form->{type} eq 'partsgroup') { $report = "partsgroup_report"; $sort = 'partsgroup'; @@ -192,273 +161,11 @@ sub search { $lxdebug->leave_sub(); } -sub project_report { - $lxdebug->enter_sub(); - - $auth->assert('config'); - - map { $form->{$_} = $form->unescape($form->{$_}) } - (projectnumber, description); - PE->projects(\%myconfig, \%$form); - - $callback = - "$form->{script}?action=project_report&type=$form->{type}&status=$form->{status}&active=" . - E($form->{active}); - $href = $callback; - - if ($form->{status} eq 'all') { - $option = $locale->text('All'); - } - if ($form->{status} eq 'orphaned') { - $option .= $locale->text('Orphaned'); - } - if ($form->{projectnumber}) { - $href .= "&projectnumber=" . $form->escape($form->{projectnumber}); - $callback .= "&projectnumber=$form->{projectnumber}"; - $option .= - "\n
" . $locale->text('Project') . " : $form->{projectnumber}"; - } - if ($form->{description}) { - $href .= "&description=" . $form->escape($form->{description}); - $callback .= "&description=$form->{description}"; - $option .= - "\n
" . $locale->text('Description') . " : $form->{description}"; - } - - @column_index = qw(projectnumber description); - - push(@column_index, "active") if ("both" eq $form->{active}); - - $column_header{projectnumber} = - qq|| - . $locale->text('Number') - . qq||; - $column_header{description} = - qq|| - . $locale->text('Description') - . qq||; - $column_header{active} = - qq|| . $locale->text('Active') . qq||; - - $form->{title} = $locale->text('Projects'); - - $form->header; - - print qq| - - - - - - - - - - - - - - - - -
$form->{title}
$option
- - -|; - - map { print "$column_header{$_}\n" } @column_index; - - print qq| - -|; - - # escape callback - $form->{callback} = $callback .= "&sort=$form->{sort}"; - - # escape callback for href - $callback = $form->escape($callback); - - foreach $ref (@{ $form->{project_list} }) { - - $i++; - $i %= 2; - - print qq| - -|; - - $column_data{projectnumber} = - qq||; - $column_data{description} = qq||; - $column_data{active} = - qq||; - - map { print "$column_data{$_}\n" } @column_index; - - print " - -"; - } - - print qq| -
{script}?action=edit&type=$form->{type}&status=$form->{status}&id=$ref->{id}&callback=$callback>$ref->{projectnumber}$ref->{description} | . - ($ref->{active} ? $locale->text("Yes") : $locale->text("No")) . - qq|
-

- -
-
{script}> - - - -{type}> - - - -
- - - -|; - - $lxdebug->leave_sub(); -} - -sub form_project_header { - $lxdebug->enter_sub(); - - $auth->assert('config'); - - $form->{title} = $locale->text("$form->{title} Project"); - - # $locale->text('Add Project') - # $locale->text('Edit Project') - - $form->{description} =~ s/\"/"/g; - - my $projectnumber = - $cgi->textfield('-name' => 'projectnumber', '-size' => 20, - '-default' => $form->{projectnumber}); - - my $description; - if (($rows = $form->numtextrows($form->{description}, 60)) > 1) { - $description = - $cgi->textarea('-name' => 'description', '-rows' => $rows, '-cols' => 60, - '-style' => 'width: 100%', '-wrap' => 'soft', - '-default' => $form->{description}); - } else { - $description = - $cgi->textfield('-name' => 'description', '-size' => 60, - '-default' => $form->{description}); - } - - my $active; - if ($form->{id}) { - $active = - qq| - -   - | . - $cgi->radio_group('-name' => 'active', - '-values' => [1, 0], - '-default' => $form->{active} * 1, - '-labels' => { 1 => $locale->text("Active"), - 0 => $locale->text("Inactive") }) - . qq| - -|; - } - - $form->header; - - print qq| - - -
{script}> - -{id}> - - - - - - - - - - - - - -
$form->{title}
- - - - - - - - - - $active -
| . $locale->text('Number') . qq|$projectnumber
| . $locale->text('Description') . qq|$description
-

-|; - - $lxdebug->leave_sub(); -} - -sub form_project_footer { - $lxdebug->enter_sub(); - - $auth->assert('config'); - - print qq| - - - -
-|; - - if ($form->{id} && $form->{orphaned}) { - print qq| -|; - } - - if ($form->{id}) { - # button for saving history - print qq| - {id} - . qq|); name=history id=history value=| - . $locale->text('history') - . qq|>|; - # /button for saving history - } - - print qq| -
- - - -|; - - $lxdebug->leave_sub(); -} - sub save { $lxdebug->enter_sub(); $auth->assert('config'); - if ($form->{type} eq 'project') { - $form->isblank("projectnumber", $locale->text('Project Number missing!')); - PE->save_project(\%myconfig, \%$form); - $form->redirect($locale->text('Project saved!')); - } if ($form->{type} eq 'partsgroup') { $form->isblank("partsgroup", $locale->text('Group missing!')); PE->save_partsgroup(\%myconfig, \%$form); @@ -489,9 +196,6 @@ sub delete { PE->delete_tuple(\%myconfig, \%$form); - if ($form->{type} eq 'project') { - $form->redirect($locale->text('Project deleted!')); - } if ($form->{type} eq 'partsgroup') { $form->redirect($locale->text('Group deleted!')); } diff --git a/bin/mozilla/projects.pl b/bin/mozilla/projects.pl new file mode 100644 index 000000000..768a21292 --- /dev/null +++ b/bin/mozilla/projects.pl @@ -0,0 +1,232 @@ +#===================================================================== +# LX-Office ERP +# Copyright (C) 2004 +# Based on SQL-Ledger Version 2.1.9 +# Web http://www.lx-office.org +# +#===================================================================== +# SQL-Ledger Accounting +# Copyright (c) 1998-2002 +# +# Author: Dieter Simader +# Email: dsimader@sql-ledger.org +# Web: http://www.sql-ledger.org +# +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +#====================================================================== +# +# project administration +#====================================================================== + +use POSIX qw(strftime); + +use SL::Projects; +use SL::ReportGenerator; + +require "bin/mozilla/common.pl"; +require "bin/mozilla/reportgenerator.pl"; + +sub add { + $lxdebug->enter_sub(); + + $auth->assert('project_edit'); + + # construct callback + $form->{callback} = build_std_url('action') unless $form->{callback}; + + display_project_form(); + + $lxdebug->leave_sub(); +} + +sub edit { + $lxdebug->enter_sub(); + + $auth->assert('project_edit'); + + # show history button + $form->{javascript} = qq||; + #/show hhistory button + $form->{title} = "Edit"; + + $form->{project} = Projects->get_project('id' => $form->{id}, 'orphaned' => 1); + + display_project_form(); + + $lxdebug->leave_sub(); +} + +sub search { + $lxdebug->enter_sub(); + + $auth->assert('project_edit'); + + $form->{title} = $locale->text('Projects'); + + $form->header(); + print $form->parse_html_template('projects/search'); + + $lxdebug->leave_sub(); +} + +sub project_report { + $lxdebug->enter_sub(); + + $auth->assert('project_edit'); + + $form->{sort} ||= 'projectnumber'; + + my $filter = $form->{filter} || { }; + Projects->search_projects(%{ $filter }, 'sort' => $form->{sort}); + + 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 %column_defs = ( + 'projectnumber' => { 'text' => $locale->text('Number'), }, + 'description' => { 'text' => $locale->text('Description'), }, + 'active' => { 'text' => $locale->text('Active'), 'visible' => 'both' eq $filter->{active}, }, + ); + + foreach (qw(projectnumber description)) { + $column_defs{$_}->{link} = $href . "&sort=$_"; + $column_defs{$_}->{visible} = 1; + } + + $report->set_columns(%column_defs); + $report->set_column_order(@columns); + + $report->set_export_options('project_report', @hidden_vars); + + $report->set_sort_indicator($form->{sort}, 1); + + my @options; + push @options, $locale->text('All') if ($filter->{all}); + push @options, $locale->text('Orphaned') if ($filter->{orphaned}); + push @options, $locale->text('Project Number') . " : $filter->{projectnumber}" if ($filter->{projectnumber}); + push @options, $locale->text('Description') . " : $filter->{description}" if ($filter->{description}); + push @options, $locale->text('Active') if ($filter->{active} eq 'active'); + push @options, $locale->text('Inactive') if ($filter->{active} eq 'inactive'); + push @options, $locale->text('Orphaned') if ($filter->{status} eq 'orphaned'); + + $form->{title} = $locale->text('Projects'); + + $report->set_options('top_info_text' => join("\n", @options), + 'output_format' => 'HTML', + 'title' => $form->{title}, + 'attachment_basename' => $locale->text('project_list') . strftime('_%Y%m%d', localtime time), + ); + $report->set_options_from_form(); + + my $edit_url = build_std_url('action=edit&type=project'); + my $callback = $form->escape($href) . '&sort=' . E($form->{sort}); + + foreach $project (@{ $form->{project_list} }) { + $project->{active} = $project->{active} ? $locale->text('Yes') : $locale->text('No'); + + my $row = { map { $_ => { 'data' => $project->{$_} } } keys %{ $project } }; + + $row->{projectnumber}->{link} = $edit_url . "&id=" . E($project->{id}) . "&callback=${callback}"; + + $report->add_data($row); + } + + $report->generate_with_headers(); + + $lxdebug->leave_sub(); +} + +sub display_project_form { + $lxdebug->enter_sub(); + + $auth->assert('project_edit'); + + $form->{project} ||= { }; + + $form->{title} = $form->{project}->{id} ? $locale->text("Edit Project") : $locale->text("Add Project"); + + $form->header(); + print $form->parse_html_template('projects/project_form'); + + $lxdebug->leave_sub(); +} + +sub save { + $lxdebug->enter_sub(); + + $auth->assert('project_edit'); + + $form->isblank("project.projectnumber", $locale->text('Project Number missing!')); + + my $project = $form->{project} || { }; + my $is_new = !$project->{id}; + $project->{id} = Projects->save_project(%{ $project }); + + # saving the history + if(!exists $form->{addition} && $project->{id} ne "") { + $form->{id} = $project->{id}; + $form->{snumbers} = qq|projectnumber_| . $project->{projectnumber}; + $form->{addition} = "SAVED"; + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history + + if ($form->{callback}) { + map { $form->{callback} .= "&new_${_}=" . $form->escape($project->{$_}); } qw(projectnumber description id); + my $message = $is_new ? $locale->text('The project has been added.') : $locale->text('The project has been saved.'); + $form->{callback} .= "&message=" . E($message); + } + + $form->redirect($locale->text('Project saved!')); + + $lxdebug->leave_sub(); +} + +sub save_as_new { + $lxdebug->enter_sub(); + + delete $form->{project}->{id} if ($form->{project}); + save(); + + $lxdebug->leave_sub(); +} + +sub delete { + $lxdebug->enter_sub(); + + $auth->assert('project_edit'); + + my $project = $form->{project} || { }; + Projects->delete_project('id' => $project->{id}); + + # saving the history + if(!exists $form->{addition}) { + $form->{snumbers} = qq|projectnumber_| . $project->{projectnumber}; + $form->{addition} = "DELETED"; + $form->save_history($form->dbconnect(\%myconfig)); + } + # /saving the history + + $form->redirect($locale->text('Project deleted!')); + + $lxdebug->leave_sub(); +} + +sub continue { + call_sub($form->{nextsub}); +} diff --git a/locale/de/all b/locale/de/all index 04b2a5ac5..9e76a5acb 100644 --- a/locale/de/all +++ b/locale/de/all @@ -237,7 +237,7 @@ aktualisieren wollen?', 'Body:' => 'Text:', 'Books are open' => 'Die Bücher sind geöffnet.', 'Boolean variables: If the default value is non-empty then the checkbox will be checked by default and unchecked otherwise.' => 'Ja/Nein-Variablen: Wenn der Standardwert nicht leer ist, so wird die Checkbox standardmäßig angehakt.', - 'Both' => 'Sowohl als auch', + 'Both' => 'Beide', 'Bottom' => 'Unten', 'Bought' => 'Gekauft', 'Buchungsdatum' => 'Buchungsdatum', @@ -1407,6 +1407,8 @@ aktualisieren wollen?', 'The pg_restore process could not be started.' => 'Der pg_restore-Prozess konnte nicht gestartet werden.', 'The preferred one is to install packages provided by your operating system distribution (e.g. Debian or RPM packages).' => 'Die bevorzugte Art, ein Perl-Modul zu installieren, ist durch Installation eines von Ihrem Betriebssystem zur Verfügung gestellten Paketes (z.B. Debian-Pakete oder RPM).', 'The program\'s exit code was [% HTML.escape(retval) %] ("0" usually means that everything went OK).' => 'Der Exitcode des Programms war [% HTML.escape(retval) %] ("0" bedeutet normalerweise, dass die Wiederherstellung erfolgreich war).', + 'The project has been added.' => 'Das Projekt wurde erfasst.', + 'The project has been saved.' => 'Das Projekt wurde gespeichert.', 'The restoration process has started. Here\'s the output of the "pg_restore" command:' => 'Der Wiederherstellungsprozess wurde gestartet. Hier ist die Ausgabe des "pg_restore"-Programmes:', 'The restoration process is complete. Please review "pg_restore"\'s output to find out if the restoration was successful.' => 'Die Wiederherstellung ist abgeschlossen. Bitte sehen Sie sich die Ausgabe von "pg_restore" an, um festzustellen, ob die Wiederherstellung erfolgreich war.', 'The second way is to use Perl\'s CPAN module and let it download and install the module for you.' => 'Die zweite Variante besteht darin, Perls CPAN-Modul zu benutzen und es das Modul für Sie installieren zu lassen.', @@ -1688,6 +1690,7 @@ aktualisieren wollen?', 'prices updated!' => ' Preise aktualisiert!', 'print' => 'drucken', 'proforma' => 'Proforma', + 'project_list' => 'projektliste', 'purchase_delivery_order_list' => 'lieferscheinliste_einkauf', 'purchase_order' => 'Auftrag', 'purchase_order_list' => 'lieferantenauftragsliste', diff --git a/locale/de/pe b/locale/de/pe index d2305925f..f09932ff3 100644 --- a/locale/de/pe +++ b/locale/de/pe @@ -4,11 +4,9 @@ $self->{texts} = { 'ADDED' => 'Hinzugefügt', 'AP' => 'Einkauf', 'AR' => 'Verkauf', - 'Active' => 'Aktiv', 'Add' => 'Erfassen', 'Add Group' => 'Warengruppe erfassen', 'Add Pricegroup' => 'Preisgruppe erfassen', - 'Add Project' => 'Projekt erfassen', 'Address' => 'Adresse', 'Advance turnover tax return' => 'Umsatzsteuervoranmeldung', 'All' => 'Alle', @@ -17,7 +15,6 @@ $self->{texts} = { 'Bcc' => 'Bcc', 'Bin List' => 'Lagerliste', 'Binding to the LDAP server as "#1" failed. Please check config/authentication.pl.' => 'Die Anmeldung am LDAP-Server als "#1" schlug fehl. Bitte überprüfen Sie die Angaben in config/authentication.pl.', - 'Both' => 'Sowohl als auch', 'CANCELED' => 'Storniert', 'Cc' => 'Cc', 'Change Lx-Office installation settings (all menu entries beneath \'System\')' => 'Verändern der Lx-Office-Installationseinstellungen (Menüpunkte unterhalb von \'System\')', @@ -47,12 +44,10 @@ $self->{texts} = { 'Delete' => 'Löschen', 'Delivery Order' => 'Lieferschein', 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', - 'Description' => 'Beschreibung', 'Directory' => 'Verzeichnis', 'ELSE' => 'Zusatz', 'Edit Group' => 'Warengruppe editieren', 'Edit Pricegroup' => 'Preisgruppe bearbeiten', - 'Edit Project' => 'Projekt bearbeiten', 'Enter longdescription' => 'Langtext eingeben', 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', 'File' => 'Datei', @@ -63,7 +58,6 @@ $self->{texts} = { 'Group saved!' => 'Warengruppe gespeichert!', 'Groups' => 'Warengruppen', 'History' => 'Historie', - 'Inactive' => 'Inaktiv', 'Invoice' => 'Rechnung', 'MAILED' => 'Gesendet', 'Manage license keys' => 'Lizenzschlüssel verwalten', @@ -77,7 +71,6 @@ $self->{texts} = { 'Missing parameter #1 in call to sub #2.' => 'Fehlernder Parameter \'#1\' in Funktionsaufruf \'#2\'.', 'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.', 'Name' => 'Name', - 'No' => 'Nein', 'No %s was found matching the search parameters.' => 'Es wurde kein %s gefunden, auf den die Suchparameter zutreffen.', 'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden', 'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Händler gefunden', @@ -85,7 +78,6 @@ $self->{texts} = { 'No or an unknown authenticantion module specified in "config/authentication.pl".' => 'Es wurde kein oder ein unbekanntes Authentifizierungsmodul in "config/authentication.pl" angegeben.', 'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.', 'No vendor has been selected yet.' => 'Es wurde noch kein Lieferant ausgewählt.', - 'Number' => 'Nummer', 'Orphaned' => 'Nie benutzt', 'Others' => 'Andere', 'PAYMENT POSTED' => 'Rechung gebucht', @@ -103,11 +95,6 @@ $self->{texts} = { 'Pricegroup missing!' => 'Preisgruppe fehlt!', 'Pricegroup saved!' => 'Preisgruppe gespeichert!', 'Proforma Invoice' => 'Proformarechnung', - 'Project' => 'Projekt', - 'Project Number missing!' => 'Projektnummer fehlt!', - 'Project deleted!' => 'Projekt gelöscht!', - 'Project saved!' => 'Projekt gespeichert!', - 'Projects' => 'Projekte', 'Purchase Order' => 'Lieferantenauftrag', 'Quotation' => 'Angebot', 'RFQ' => 'Anfrage', @@ -142,7 +129,6 @@ $self->{texts} = { 'Vendor details' => 'Lieferantendetails', 'View warehouse content' => 'Lagerbestand ansehen', 'Warehouse management' => 'Lagerverwaltung/Bestandsveränderung', - 'Yes' => 'Ja', 'You do not have the permissions to access this function.' => 'Sie verfügen nicht über die notwendigen Rechte, um auf diese Funktion zuzugreifen.', '[email]' => '[email]', 'bin_list' => 'Lagerliste', @@ -183,14 +169,11 @@ $self->{subs} = { 'form_partsgroup_header' => 'form_partsgroup_header', 'form_pricegroup_footer' => 'form_pricegroup_footer', 'form_pricegroup_header' => 'form_pricegroup_header', - 'form_project_footer' => 'form_project_footer', - 'form_project_header' => 'form_project_header', 'format_dates' => 'format_dates', 'mark_as_paid_common' => 'mark_as_paid_common', 'part_selection_internal' => 'part_selection_internal', 'partsgroup_report' => 'partsgroup_report', 'pricegroup_report' => 'pricegroup_report', - 'project_report' => 'project_report', 'reformat_numbers' => 'reformat_numbers', 'retrieve_partunits' => 'retrieve_partunits', 'save' => 'save', diff --git a/locale/de/projects b/locale/de/projects new file mode 100644 index 000000000..93bdf2c06 --- /dev/null +++ b/locale/de/projects @@ -0,0 +1,202 @@ +#!/usr/bin/perl + +$self->{texts} = { + 'ADDED' => 'Hinzugefügt', + 'AP' => 'Einkauf', + 'AR' => 'Verkauf', + 'Active' => 'Aktiv', + 'Add Project' => 'Projekt erfassen', + 'Address' => 'Adresse', + 'Advance turnover tax return' => 'Umsatzsteuervoranmeldung', + 'All' => 'Alle', + 'All reports' => 'Alle Berichte (Kontenübersicht, Summen- u. Saldenliste, GuV, BWA, Bilanz, Projektbuchungen)', + 'Attempt to call an undefined sub named \'%s\'' => 'Es wurde versucht, eine nicht definierte Unterfunktion namens \'%s\' aufzurufen.', + 'Bcc' => 'Bcc', + 'Bin List' => 'Lagerliste', + 'Binding to the LDAP server as "#1" failed. Please check config/authentication.pl.' => 'Die Anmeldung am LDAP-Server als "#1" schlug fehl. Bitte überprüfen Sie die Angaben in config/authentication.pl.', + 'CANCELED' => 'Storniert', + 'CSV export -- options' => 'CSV-Export -- Optionen', + 'Cc' => 'Cc', + 'Change Lx-Office installation settings (all menu entries beneath \'System\')' => 'Verändern der Lx-Office-Installationseinstellungen (Menüpunkte unterhalb von \'System\')', + 'Confirmation' => 'Auftragsbestätigung', + 'Contact' => 'Kontakt', + 'Could not spawn html2ps or GhostScript.' => 'html2ps oder GhostScript konnte nicht gestartet werden.', + 'Could not spawn the printer command.' => 'Die Druckanwendung konnte nicht gestartet werden.', + 'Could not write the html2ps config file.' => 'Die temporäre html2ps-Konfigurationsdatei konnte nicht geschrieben werden.', + 'Could not write the temporary HTML file.' => 'Eine temporäre HTML-Datei konnte nicht geschrieben werden.', + 'Create and edit RFQs' => 'Lieferantenanfragen erfassen und bearbeiten', + 'Create and edit customers and vendors' => 'Kunden und Lieferanten erfassen und bearbeiten', + 'Create and edit dunnings' => 'Mahnungen erfassen und bearbeiten', + 'Create and edit invoices and credit notes' => 'Rechnungen und Gutschriften erfassen und bearbeiten', + 'Create and edit parts, services, assemblies' => 'Artikel, Dienstleistungen, Erzeugnisse erfassen und bearbeiten', + 'Create and edit projects' => 'Projekte erfassen und bearbeiten', + 'Create and edit purchase delivery orders' => 'Lieferscheine von Lieferanten erfassen und bearbeiten', + 'Create and edit purchase orders' => 'Lieferantenaufträge erfassen und bearbeiten', + 'Create and edit sales delivery orders' => 'Lieferscheine für Kunden erfassen und bearbeiten', + 'Create and edit sales orders' => 'Auftragsbestätigungen erfassen und bearbeiten', + 'Create and edit sales quotations' => 'Angebote erfassen und bearbeiten', + 'Create and edit vendor invoices' => 'Eingangsrechnungen erfassen und bearbeiten', + 'Credit Note' => 'Gutschrift', + 'Customer Number' => 'Kundennummer', + 'Customer details' => 'Kundendetails', + 'DATEV Export' => 'DATEV-Export', + 'DELETED' => 'Gelöscht', + 'DUNNING STARTED' => 'Mahnprozess gestartet', + 'Dataset upgrade' => 'Datenbankaktualisierung', + 'Date' => 'Datum', + 'Delivery Order' => 'Lieferschein', + 'Dependency loop detected:' => 'Schleife in den Abhängigkeiten entdeckt:', + 'Description' => 'Beschreibung', + 'Directory' => 'Verzeichnis', + 'ELSE' => 'Zusatz', + 'Edit Project' => 'Projekt bearbeiten', + 'Enter longdescription' => 'Langtext eingeben', + 'Error in database control file \'%s\': %s' => 'Fehler in Datenbankupgradekontrolldatei \'%s\': %s', + 'File' => 'Datei', + 'General ledger and cash' => 'Finanzbuchhaltung und Zahlungsverkehr', + 'History' => 'Historie', + 'Inactive' => 'Inaktiv', + 'Invoice' => 'Rechnung', + 'MAILED' => 'Gesendet', + 'Manage license keys' => 'Lizenzschlüssel verwalten', + 'Mark as paid?' => 'Als bezahlt markieren?', + 'Marked as paid' => 'Als bezahlt markiert', + 'Master Data' => 'Stammdaten', + 'May set the BCC field when sending emails' => 'Beim Verschicken von Emails das Feld \'BCC\' setzen', + 'Message' => 'Nachricht', + 'Missing \'description\' field.' => 'Fehlendes Feld \'description\'.', + 'Missing \'tag\' field.' => 'Fehlendes Feld \'tag\'.', + 'Missing parameter #1 in call to sub #2.' => 'Fehlernder Parameter \'#1\' in Funktionsaufruf \'#2\'.', + 'More than one control file with the tag \'%s\' exist.' => 'Es gibt mehr als eine Kontrolldatei mit dem Tag \'%s\'.', + 'Name' => 'Name', + 'No' => 'Nein', + 'No %s was found matching the search parameters.' => 'Es wurde kein %s gefunden, auf den die Suchparameter zutreffen.', + 'No Customer was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Endkunde gefunden', + 'No Vendor was found matching the search parameters.' => 'Zu dem Suchbegriff wurde kein Händler gefunden', + 'No customer has been selected yet.' => 'Es wurde noch kein Kunde ausgewählt.', + 'No or an unknown authenticantion module specified in "config/authentication.pl".' => 'Es wurde kein oder ein unbekanntes Authentifizierungsmodul in "config/authentication.pl" angegeben.', + 'No part was found matching the search parameters.' => 'Es wurde kein Artikel gefunden, auf den die Suchparameter zutreffen.', + 'No vendor has been selected yet.' => 'Es wurde noch kein Lieferant ausgewählt.', + 'Number' => 'Nummer', + 'Orphaned' => 'Nie benutzt', + 'Others' => 'Andere', + 'PAYMENT POSTED' => 'Rechung gebucht', + 'PDF export -- options' => 'PDF-Export -- Optionen', + 'POSTED' => 'Gebucht', + 'POSTED AS NEW' => 'Als neu gebucht', + 'PRINTED' => 'Gedruckt', + 'Packing List' => 'Lieferschein', + 'Part Number' => 'Artikelnummer', + 'Part description' => 'Artikelbeschreibung', + 'Pick List' => 'Sammelliste', + 'Please enter values' => 'Bitte Werte eingeben', + 'Proforma Invoice' => 'Proformarechnung', + 'Project Number' => 'Projektnummer', + 'Project Number missing!' => 'Projektnummer fehlt!', + 'Project deleted!' => 'Projekt gelöscht!', + 'Project saved!' => 'Projekt gespeichert!', + 'Projects' => 'Projekte', + 'Purchase Order' => 'Lieferantenauftrag', + 'Quotation' => 'Angebot', + 'RFQ' => 'Anfrage', + 'Receipt, payment, reconciliation' => 'Zahlungseingang, Zahlungsausgang, Kontenabgleich', + 'Reports' => 'Berichte', + 'SAVED' => 'Gespeichert', + 'SAVED FOR DUNNING' => 'Gespeichert', + 'SCREENED' => 'Angezeigt', + 'Select a Customer' => 'Endkunde auswählen', + 'Select a customer' => 'Einen Kunden auswählen', + 'Select a part' => 'Artikel auswählen', + 'Select a vendor' => 'Einen Lieferanten auswählen', + 'Storno Invoice' => 'Stornorechnung', + 'Storno Packing List' => 'Stornolieferschein', + 'Subject' => 'Betreff', + 'The \'tag\' field must only consist of alphanumeric characters or the carachters - _ ( )' => 'Das Feld \'tag\' darf nur aus alphanumerischen Zeichen und den Zeichen - _ ( ) bestehen.', + 'The LDAP server "#1:#2" is unreachable. Please check config/authentication.pl.' => 'Der LDAP-Server "#1:#2" ist nicht erreichbar. Bitte überprüfen Sie die Angaben in config/authentication.pl.', + 'The config file "config/authentication.pl" contained invalid Perl code:' => 'Die Konfigurationsdatei "config/authentication.pl" enthielt ungütigen Perl-Code:', + 'The config file "config/authentication.pl" was not found.' => 'Die Konfigurationsdatei "config/authentication.pl" wurde nicht gefunden.', + 'The connection to the LDAP server cannot be encrypted (SSL/TLS startup failure). Please check config/authentication.pl.' => 'Die Verbindung zum LDAP-Server kann nicht verschlüsselt werden (Fehler bei SSL/TLS-Initialisierung). Bitte überprüfen Sie die Angaben in config/authentication.pl.', + 'The connection to the authentication database failed:' => 'Die Verbindung zur Authentifizierungsdatenbank schlug fehl:', + 'The connection to the template database failed:' => 'Die Verbindung zur Vorlagendatenbank schlug fehl:', + 'The creation of the authentication database failed:' => 'Das Anlegen der Authentifizierungsdatenbank schlug fehl:', + 'The list has been printed.' => 'Die Liste wurde ausgedruckt.', + 'The project has been added.' => 'Das Projekt wurde erfasst.', + 'The project has been saved.' => 'Das Projekt wurde gespeichert.', + 'To (email)' => 'An', + 'Transactions, AR transactions, AP transactions' => 'Dialogbuchen, Debitorenrechnungen, Kreditorenrechnungen', + 'Trying to call a sub without a name' => 'Es wurde versucht, eine Unterfunktion ohne Namen aufzurufen.', + 'Unit' => 'Einheit', + 'Unknown dependency \'%s\'.' => 'Unbekannte Abhängigkeit \'%s\'.', + 'Value' => 'Wert', + 'Variable' => 'Variable', + 'Vendor details' => 'Lieferantendetails', + 'View warehouse content' => 'Lagerbestand ansehen', + 'Warehouse management' => 'Lagerverwaltung/Bestandsveränderung', + 'Yes' => 'Ja', + 'You do not have the permissions to access this function.' => 'Sie verfügen nicht über die notwendigen Rechte, um auf diese Funktion zuzugreifen.', + '[email]' => '[email]', + 'bin_list' => 'Lagerliste', + 'config/authentication.pl: Key "DB_config" is missing.' => 'config/authentication.pl: Das Schlüsselwort "DB_config" fehlt.', + 'config/authentication.pl: Key "LDAP_config" is missing.' => 'config/authentication.pl: Der Schlüssel "LDAP_config" fehlt.', + 'config/authentication.pl: Missing parameters in "DB_config". Required parameters are "host", "db" and "user".' => 'config/authentication.pl: Fehlende Parameter in "DB_config". Benötigte Parameter sind "host", "db" und "user".', + 'config/authentication.pl: Missing parameters in "LDAP_config". Required parameters are "host", "attribute" and "base_dn".' => 'config/authentication.pl: Fehlende Parameter in "LDAP_config". Benötigt werden "host", "attribute" und "base_dn".', + 'customer' => 'Kunde', + 'invoice' => 'Rechnung', + 'no' => 'nein', + 'packing_list' => 'Versandliste', + 'pick_list' => 'Entnahmeliste', + 'proforma' => 'Proforma', + 'project_list' => 'projektliste', + 'purchase_order' => 'Auftrag', + 'report_generator_dispatch_to is not defined.' => 'report_generator_dispatch_to ist nicht definiert.', + 'report_generator_nextsub is not defined.' => 'report_generator_nextsub ist nicht definiert.', + 'request_quotation' => 'Angebotsanforderung', + 'sales_order' => 'Kundenauftrag', + 'sales_quotation' => 'Verkaufsangebot', + 'vendor' => 'Lieferant', + 'yes' => 'ja', +}; + +$self->{subs} = { + 'E' => 'E', + 'H' => 'H', + 'NTI' => 'NTI', + 'Q' => 'Q', + 'add' => 'add', + 'build_std_url' => 'build_std_url', + 'calculate_qty' => 'calculate_qty', + 'call_sub' => 'call_sub', + 'continue' => 'continue', + 'cov_selection_internal' => 'cov_selection_internal', + 'delete' => 'delete', + 'delivery_customer_selection' => 'delivery_customer_selection', + 'display_project_form' => 'display_project_form', + 'edit' => 'edit', + 'format_dates' => 'format_dates', + 'mark_as_paid_common' => 'mark_as_paid_common', + 'part_selection_internal' => 'part_selection_internal', + 'project_report' => 'project_report', + 'reformat_numbers' => 'reformat_numbers', + 'report_generator_back' => 'report_generator_back', + 'report_generator_dispatcher' => 'report_generator_dispatcher', + 'report_generator_do' => 'report_generator_do', + 'report_generator_export_as_csv' => 'report_generator_export_as_csv', + 'report_generator_export_as_pdf' => 'report_generator_export_as_pdf', + 'retrieve_partunits' => 'retrieve_partunits', + 'save' => 'save', + 'save_as_new' => 'save_as_new', + 'search' => 'search', + 'select_part' => 'select_part', + 'select_part_internal' => 'select_part_internal', + 'set_longdescription' => 'set_longdescription', + 'show_history' => 'show_history', + 'show_vc_details' => 'show_vc_details', + 'vendor_selection' => 'vendor_selection', + 'weiter' => 'continue', + 'löschen' => 'delete', + 'neue_ware' => 'new_part', + 'speichern' => 'save', + 'als_neu_speichern' => 'save_as_new', +}; + +1; diff --git a/menu.ini b/menu.ini index c2bcf058a..b0738420c 100644 --- a/menu.ini +++ b/menu.ini @@ -32,9 +32,8 @@ item=assembly [Master Data--Add Project] ACCESS=project_edit -module=pe.pl +module=projects.pl action=add -type=project [Master Data--Update Prices] ACCESS=part_service_assembly_edit @@ -85,9 +84,8 @@ searchitems=assembly [Master Data--Reports--Projects] ACCESS=project_edit -module=pe.pl +module=projects.pl action=search -type=project [Master Data--Reports--Projecttransactions] ACCESS=report diff --git a/projects.pl b/projects.pl new file mode 120000 index 000000000..385000d1b --- /dev/null +++ b/projects.pl @@ -0,0 +1 @@ +am.pl \ No newline at end of file diff --git a/templates/webpages/projects/project_form_de.html b/templates/webpages/projects/project_form_de.html new file mode 100644 index 000000000..231797b05 --- /dev/null +++ b/templates/webpages/projects/project_form_de.html @@ -0,0 +1,63 @@ +[% USE HTML %][% USE LxERP %] + + [%- IF message %] +

[% message %]

+ +
+ [%- END %] + +
+ + + +
[% title %]
+ +

+ + + + + + + + + + + + [%- IF project.id %] + + + + + [%- END %] +
Nummer
Beschreibung + [%- SET rows = LxERP.numtextrows(project.description, 60) %] + [%- IF rows > 1 %] + + [%- ELSE %] + + [%- END %] +
  + + +
+

+ +


+ + + +

+ + [%- IF project.id %] + + [%- IF project.orphaned %] + + [%- END %] + + [%- END %] +

+
+ + + diff --git a/templates/webpages/projects/project_form_master.html b/templates/webpages/projects/project_form_master.html new file mode 100644 index 000000000..c299818e9 --- /dev/null +++ b/templates/webpages/projects/project_form_master.html @@ -0,0 +1,63 @@ +[% USE HTML %][% USE LxERP %] + + [%- IF message %] +

[% message %]

+ +
+ [%- END %] + +
+ + + +
[% title %]
+ +

+ + + + + + + + + + + + [%- IF project.id %] + + + + + [%- END %] +
Number
Description + [%- SET rows = LxERP.numtextrows(project.description, 60) %] + [%- IF rows > 1 %] + + [%- ELSE %] + + [%- END %] +
  + + +
+

+ +


+ + + +

+ + [%- IF project.id %] + + [%- IF project.orphaned %] + + [%- END %] + + [%- END %] +

+
+ + + diff --git a/templates/webpages/projects/search_de.html b/templates/webpages/projects/search_de.html new file mode 100644 index 000000000..94bd529ca --- /dev/null +++ b/templates/webpages/projects/search_de.html @@ -0,0 +1,52 @@ +[% USE HTML %] + +
+ +
[% title %]
+ +

+ + + + + + + + + + + + + + + + + + + +
Nummer
Beschreibung
  + + + + + + +
  + + + + +
+

+ +
+ + + +

+ +

+
+ + + diff --git a/templates/webpages/projects/search_master.html b/templates/webpages/projects/search_master.html new file mode 100644 index 000000000..4f4138392 --- /dev/null +++ b/templates/webpages/projects/search_master.html @@ -0,0 +1,52 @@ +[% USE HTML %] + +
+ +
[% title %]
+ +

+ + + + + + + + + + + + + + + + + + + +
Number
Description
  + + + + + + +
  + + + + +
+

+ +
+ + + +

+ +

+
+ + + -- 2.20.1