X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fpe.pl;h=18c90c30afe3947f3fef4f03d7f91420283d9781;hb=82ab26a0d201bf24aba85e058e1cb23928a4b44a;hp=83273491367dc32b5499669ea31bd0d64deca3d2;hpb=4dbb09950c9f5596646537c12d991c99086fe7c1;p=kivitendo-erp.git
diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl
index 832734913..18c90c30a 100644
--- a/bin/mozilla/pe.pl
+++ b/bin/mozilla/pe.pl
@@ -32,13 +32,13 @@
#
#======================================================================
-
use SL::PE;
-1;
-# end of main
+require "bin/mozilla/common.pl";
+1;
+# end of main
sub add {
$lxdebug->enter_sub();
@@ -46,18 +46,21 @@ sub add {
$form->{title} = "Add";
# construct callback
- $form->{callback} = "$form->{script}?action=add&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}" unless $form->{callback};
+ $form->{callback} =
+ "$form->{script}?action=add&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ unless $form->{callback};
+
+ &{"form_$form->{type}_header"};
+ &{"form_$form->{type}_footer"};
- &{ "form_$form->{type}_header" };
- &{ "form_$form->{type}_footer" };
-
$lxdebug->leave_sub();
}
-
sub edit {
$lxdebug->enter_sub();
-
+ # show history button
+ $form->{javascript} = qq||;
+ #/show hhistory button
$form->{title} = "Edit";
if ($form->{type} eq 'project') {
@@ -66,48 +69,74 @@ sub edit {
if ($form->{type} eq 'partsgroup') {
PE->get_partsgroup(\%myconfig, \%$form);
}
+ if ($form->{type} eq 'pricegroup') {
+ PE->get_pricegroup(\%myconfig, \%$form);
+ }
+ &{"form_$form->{type}_header"};
+ &{"form_$form->{type}_footer"};
- &{ "form_$form->{type}_header" };
- &{ "form_$form->{type}_footer" };
-
$lxdebug->leave_sub();
}
-
sub search {
$lxdebug->enter_sub();
if ($form->{type} eq 'project') {
- $report = "project_report";
- $sort = 'projectnumber';
+ $report = "project_report";
+ $sort = 'projectnumber';
$form->{title} = $locale->text('Projects');
$number = qq|
- |.$locale->text('Number').qq| |
- |
+ | . $locale->text('Number') . qq| |
+ | . $cgi->textfield('-name' => 'projectnumber', '-size' => 20) . qq| |
- |.$locale->text('Description').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';
+ $report = "partsgroup_report";
+ $sort = 'partsgroup';
$form->{title} = $locale->text('Groups');
-
+
$number = qq|
- |.$locale->text('Group').qq| |
+ | . $locale->text('Group') . qq| |
|
|;
}
+ # for pricesgroups
+ if ($form->{type} eq 'pricegroup') {
+ $report = "pricegroup_report";
+ $sort = 'pricegroup';
+ $form->{title} = $locale->text('Pricegroup');
+
+ $number = qq|
+
+ | . $locale->text('Pricegroup') . qq| |
+ |
+
+|;
+
+ }
+
$form->header;
print qq|
@@ -129,8 +158,10 @@ sub search {
$number
|
- |.$locale->text('All').qq|
- |.$locale->text('Orphaned').qq| |
+ |
+ . $locale->text('All') . qq|
+ |
+ . $locale->text('Orphaned') . qq| |
@@ -147,7 +178,8 @@ sub search {
{password}>
-
+
@@ -213,7 +257,7 @@ sub project_report {
|;
map { print "$column_header{$_}\n" } @column_index;
-
+
print qq|
|;
@@ -223,25 +267,31 @@ sub project_report {
# escape callback for href
$callback = $form->escape($callback);
-
+
foreach $ref (@{ $form->{project_list} }) {
-
- $i++; $i %= 2;
-
+
+ $i++;
+ $i %= 2;
+
print qq|
|;
-
- $column_data{projectnumber} = qq|{script}?action=edit&type=$form->{type}&status=$form->{status}&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{projectnumber} | |;
+
+ $column_data{projectnumber} =
+ qq|{script}?action=edit&type=$form->{type}&status=$form->{status}&id=$ref->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ref->{projectnumber} | |;
$column_data{description} = qq|$ref->{description} | |;
-
+ $column_data{active} =
+ qq|| .
+ ($ref->{active} ? $locale->text("Yes") : $locale->text("No")) .
+ qq| | |;
+
map { print "$column_data{$_}\n" } @column_index;
-
+
print "
";
}
-
+
print qq|
@@ -262,16 +312,11 @@ sub project_report {
{login}>
{password}>
-|;
-
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
+
- print qq|
-
+