Revision 08844064
Von Moritz Bunkus vor etwa 17 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
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);
|
||
|
SL/PE.pm | ||
---|---|---|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||
#======================================================================
|
||
#
|
||
# Project module
|
||
# also used for partsgroups
|
||
# Partsgroups and pricegroups
|
||
#
|
||
#======================================================================
|
||
|
||
... | ... | |
|
||
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();
|
||
|
||
... | ... | |
# 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});
|
SL/Projects.pm | ||
---|---|---|
#=====================================================================
|
||
# 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;
|
||
|
bin/mozilla/arap.pl | ||
---|---|---|
# 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"; };
|
||
... | ... | |
|
||
# 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;
|
bin/mozilla/pe.pl | ||
---|---|---|
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||
#======================================================================
|
||
#
|
||
# project administration
|
||
# partsgroup administration
|
||
# partsgroup, pricegroup administration
|
||
#
|
||
#======================================================================
|
||
|
||
... | ... | |
#/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);
|
||
}
|
||
... | ... | |
|
||
$auth->assert('config');
|
||
|
||
if ($form->{type} eq 'project') {
|
||
$report = "project_report";
|
||
$sort = 'projectnumber';
|
||
$form->{title} = $locale->text('Projects');
|
||
|
||
$number = qq|
|
||
<tr>
|
||
<th align=right width=1%>| . $locale->text('Number') . qq|</th>
|
||
<td>| . $cgi->textfield('-name' => 'projectnumber', '-size' => 20) . qq|</td>
|
||
</tr>
|
||
<tr>
|
||
<th align=right>| . $locale->text('Description') . qq|</th>
|
||
<td>| . $cgi->textfield('-name' => 'description', '-size' => 60) . qq|</td>
|
||
</tr>
|
||
<tr>
|
||
<th> </th>
|
||
<td>| .
|
||
$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|</td>
|
||
</tr>
|
||
|;
|
||
|
||
}
|
||
if ($form->{type} eq 'partsgroup') {
|
||
$report = "partsgroup_report";
|
||
$sort = 'partsgroup';
|
||
... | ... | |
$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<br>" . $locale->text('Project') . " : $form->{projectnumber}";
|
||
}
|
||
if ($form->{description}) {
|
||
$href .= "&description=" . $form->escape($form->{description});
|
||
$callback .= "&description=$form->{description}";
|
||
$option .=
|
||
"\n<br>" . $locale->text('Description') . " : $form->{description}";
|
||
}
|
||
|
||
@column_index = qw(projectnumber description);
|
||
|
||
push(@column_index, "active") if ("both" eq $form->{active});
|
||
|
||
$column_header{projectnumber} =
|
||
qq|<th><a class=listheading href=$href&sort=projectnumber>|
|
||
. $locale->text('Number')
|
||
. qq|</a></th>|;
|
||
$column_header{description} =
|
||
qq|<th><a class=listheading href=$href&sort=description>|
|
||
. $locale->text('Description')
|
||
. qq|</a></th>|;
|
||
$column_header{active} =
|
||
qq|<th class="listheading">| . $locale->text('Active') . qq|</th>|;
|
||
|
||
$form->{title} = $locale->text('Projects');
|
||
|
||
$form->header;
|
||
|
||
print qq|
|
||
<body>
|
||
|
||
<table width=100%>
|
||
<tr>
|
||
<th class=listtop>$form->{title}</th>
|
||
</tr>
|
||
<tr height="5"></tr>
|
||
<tr>
|
||
<td>$option</td>
|
||
</tr>
|
||
<tr>
|
||
<td>
|
||
<table width=100%>
|
||
<tr class=listheading>
|
||
|;
|
||
|
||
map { print "$column_header{$_}\n" } @column_index;
|
||
|
||
print qq|
|
||
</tr>
|
||
|;
|
||
|
||
# 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|
|
||
<tr valign=top class=listrow$i>
|
||
|;
|
||
|
||
$column_data{projectnumber} =
|
||
qq|<td><a href=$form->{script}?action=edit&type=$form->{type}&status=$form->{status}&id=$ref->{id}&callback=$callback>$ref->{projectnumber}</td>|;
|
||
$column_data{description} = qq|<td>$ref->{description} </td>|;
|
||
$column_data{active} =
|
||
qq|<td>| .
|
||
($ref->{active} ? $locale->text("Yes") : $locale->text("No")) .
|
||
qq|</td>|;
|
||
|
||
map { print "$column_data{$_}\n" } @column_index;
|
||
|
||
print "
|
||
</tr>
|
||
";
|
||
}
|
||
|
||
print qq|
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td><hr size=3 noshade></td>
|
||
</tr>
|
||
</table>
|
||
|
||
<br>
|
||
<form method=post action=$form->{script}>
|
||
|
||
<input name=callback type=hidden value="$form->{callback}">
|
||
|
||
<input type=hidden name=type value=$form->{type}>
|
||
|
||
<input class=submit type=submit name=action value="|
|
||
. $locale->text('Add') . qq|">
|
||
|
||
</form>
|
||
|
||
</body>
|
||
</html>
|
||
|;
|
||
|
||
$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|
|
||
<tr>
|
||
<th> </th>
|
||
<td>| .
|
||
$cgi->radio_group('-name' => 'active',
|
||
'-values' => [1, 0],
|
||
'-default' => $form->{active} * 1,
|
||
'-labels' => { 1 => $locale->text("Active"),
|
||
0 => $locale->text("Inactive") })
|
||
. qq|</td>
|
||
</tr>
|
||
|;
|
||
}
|
||
|
||
$form->header;
|
||
|
||
print qq|
|
||
<body>
|
||
|
||
<form method=post action=$form->{script}>
|
||
|
||
<input type=hidden name=id value=$form->{id}>
|
||
<input type=hidden name=type value=project>
|
||
|
||
<table width=100%>
|
||
<tr>
|
||
<th class=listtop>$form->{title}</th>
|
||
</tr>
|
||
<tr height="5"></tr>
|
||
<tr>
|
||
<td>
|
||
<table>
|
||
<tr>
|
||
<th align=right>| . $locale->text('Number') . qq|</th>
|
||
<td>$projectnumber</td>
|
||
</tr>
|
||
<tr>
|
||
<th align=right>| . $locale->text('Description') . qq|</th>
|
||
<td>$description</td>
|
||
</tr>
|
||
$active
|
||
</table>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan=2><hr size=3 noshade></td>
|
||
</tr>
|
||
</table>
|
||
|;
|
||
|
||
$lxdebug->leave_sub();
|
||
}
|
||
|
||
sub form_project_footer {
|
||
$lxdebug->enter_sub();
|
||
|
||
$auth->assert('config');
|
||
|
||
print qq|
|
||
|
||
<input name=callback type=hidden value="$form->{callback}">
|
||
|
||
<br><input type=submit class=submit name=action value="|
|
||
. $locale->text('Save') . qq|">
|
||
|;
|
||
|
||
if ($form->{id} && $form->{orphaned}) {
|
||
print qq|
|
||
<input type=submit class=submit name=action value="|
|
||
. $locale->text('Delete') . qq|">|;
|
||
}
|
||
|
||
if ($form->{id}) {
|
||
# button for saving history
|
||
print qq|
|
||
<input type=button onclick=set_history_window(|
|
||
. $form->{id}
|
||
. qq|); name=history id=history value=|
|
||
. $locale->text('history')
|
||
. qq|>|;
|
||
# /button for saving history
|
||
}
|
||
|
||
print qq|
|
||
</form>
|
||
|
||
</body>
|
||
</html>
|
||
|;
|
||
|
||
$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);
|
||
... | ... | |
|
||
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!'));
|
||
}
|
bin/mozilla/projects.pl | ||
---|---|---|
#=====================================================================
|
||
# 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|<script type="text/javascript" src="js/show_history.js"></script>|;
|
||
#/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});
|
||
}
|
locale/de/all | ||
---|---|---|
'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',
|
||
... | ... | |
'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.',
|
||
... | ... | |
'prices updated!' => ' Preise aktualisiert!',
|
||
'print' => 'drucken',
|
||
'proforma' => 'Proforma',
|
||
'project_list' => 'projektliste',
|
||
'purchase_delivery_order_list' => 'lieferscheinliste_einkauf',
|
||
'purchase_order' => 'Auftrag',
|
||
'purchase_order_list' => 'lieferantenauftragsliste',
|
locale/de/pe | ||
---|---|---|
'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',
|
||
... | ... | |
'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\')',
|
||
... | ... | |
'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',
|
||
... | ... | |
'Group saved!' => 'Warengruppe gespeichert!',
|
||
'Groups' => 'Warengruppen',
|
||
'History' => 'Historie',
|
||
'Inactive' => 'Inaktiv',
|
||
'Invoice' => 'Rechnung',
|
||
'MAILED' => 'Gesendet',
|
||
'Manage license keys' => 'Lizenzschlüssel verwalten',
|
||
... | ... | |
'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 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',
|
||
... | ... | |
'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',
|
||
... | ... | |
'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',
|
||
... | ... | |
'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',
|
locale/de/projects | ||
---|---|---|
#!/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;
|
menu.ini | ||
---|---|---|
|
||
[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
|
||
... | ... | |
|
||
[Master Data--Reports--Projects]
|
||
ACCESS=project_edit
|
||
module=pe.pl
|
||
module=projects.pl
|
||
action=search
|
||
type=project
|
||
|
||
[Master Data--Reports--Projecttransactions]
|
||
ACCESS=report
|
projects.pl | ||
---|---|---|
am.pl
|
templates/webpages/projects/project_form_de.html | ||
---|---|---|
[% USE HTML %][% USE LxERP %]<body>
|
||
|
||
[%- IF message %]
|
||
<p>[% message %]</p>
|
||
|
||
<hr>
|
||
[%- END %]
|
||
|
||
<form method="post" action="projects.pl">
|
||
|
||
<input type="hidden" name="project.id" value="[% HTML.escape(project.id) %]">
|
||
|
||
<div class="listtop">[% title %]</div>
|
||
|
||
<p>
|
||
<table>
|
||
<tr>
|
||
<th align="right">Nummer</th>
|
||
<td><input name="project.projectnumber" size="20" value="[% HTML.escape(project.projectnumber) %]"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<th align="right">Beschreibung</th>
|
||
<td>
|
||
[%- SET rows = LxERP.numtextrows(project.description, 60) %]
|
||
[%- IF rows > 1 %]
|
||
<textarea name="project.description" rows="rows" cols="60" style="width: 100%" wrap="soft">[% HTML.escape(project.description) %]</textarea>
|
||
[%- ELSE %]
|
||
<input name="project.description" size="60" value="[% HTML.escape(project.description) %]">
|
||
[%- END %]
|
||
</td>
|
||
</tr>
|
||
|
||
[%- IF project.id %]
|
||
<tr>
|
||
<th align="right"> </th>
|
||
<td>
|
||
<input type="radio" name="project.active" id="active_1" value="1"[% IF project.active %] checked[% END %]><label for="active_1">Aktiv</label>
|
||
<input type="radio" name="project.active" id="active_0" value="0"[% IF !project.active %] checked[% END %]><label for="active_0">Inaktiv</label>
|
||
</td>
|
||
</tr>
|
||
[%- END %]
|
||
</table>
|
||
</p>
|
||
|
||
<p><hr size="3" noshade></p>
|
||
|
||
<input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
|
||
|
||
<p>
|
||
<input type="submit" class="submit" name="action" value="Speichern">
|
||
[%- IF project.id %]
|
||
<input type="submit" class="submit" name="action" value="als neu speichern">
|
||
[%- IF project.orphaned %]
|
||
<input type="submit" class="submit" name="action" value="L?schen">
|
||
[%- END %]
|
||
<input type="button" onclick="set_history_window([% HTML.escape(project.id) %]);" name="history" id="history" value="Historie">
|
||
[%- END %]
|
||
</p>
|
||
</form>
|
||
|
||
</body>
|
||
</html>
|
templates/webpages/projects/project_form_master.html | ||
---|---|---|
[% USE HTML %][% USE LxERP %]<body>
|
||
|
||
[%- IF message %]
|
||
<p>[% message %]</p>
|
||
|
||
<hr>
|
||
[%- END %]
|
||
|
||
<form method="post" action="projects.pl">
|
||
|
||
<input type="hidden" name="project.id" value="[% HTML.escape(project.id) %]">
|
||
|
||
<div class="listtop">[% title %]</div>
|
||
|
||
<p>
|
||
<table>
|
||
<tr>
|
||
<th align="right"><translate>Number</translate></th>
|
||
<td><input name="project.projectnumber" size="20" value="[% HTML.escape(project.projectnumber) %]"></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
<th align="right"><translate>Description</translate></th>
|
||
<td>
|
||
[%- SET rows = LxERP.numtextrows(project.description, 60) %]
|
||
[%- IF rows > 1 %]
|
||
<textarea name="project.description" rows="rows" cols="60" style="width: 100%" wrap="soft">[% HTML.escape(project.description) %]</textarea>
|
||
[%- ELSE %]
|
||
<input name="project.description" size="60" value="[% HTML.escape(project.description) %]">
|
||
[%- END %]
|
||
</td>
|
||
</tr>
|
||
|
||
[%- IF project.id %]
|
||
<tr>
|
||
<th align="right"> </th>
|
||
<td>
|
||
<input type="radio" name="project.active" id="active_1" value="1"[% IF project.active %] checked[% END %]><label for="active_1"><translate>Active</translate></label>
|
||
<input type="radio" name="project.active" id="active_0" value="0"[% IF !project.active %] checked[% END %]><label for="active_0"><translate>Inactive</translate></label>
|
||
</td>
|
||
</tr>
|
||
[%- END %]
|
||
</table>
|
||
</p>
|
||
|
||
<p><hr size="3" noshade></p>
|
||
|
||
<input name="callback" type="hidden" value="[% HTML.escape(callback) %]">
|
||
|
||
<p>
|
||
<input type="submit" class="submit" name="action" value="<translate>Save</translate>">
|
||
[%- IF project.id %]
|
||
<input type="submit" class="submit" name="action" value="<translate>Save as new</translate>">
|
||
[%- IF project.orphaned %]
|
||
<input type="submit" class="submit" name="action" value="<translate>Delete</translate>">
|
||
[%- END %]
|
||
<input type="button" onclick="set_history_window([% HTML.escape(project.id) %]);" name="history" id="history" value="<translate>history</translate>">
|
||
[%- END %]
|
||
</p>
|
||
</form>
|
||
|
||
</body>
|
||
</html>
|
Auch abrufbar als: Unified diff
Projektverwaltung in eine eigene Datei ausgelagert und auf die Verwendung von Template umgestellt.