X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fpe.pl;h=8c6132ecb61adb2acd38cedd606cc9ad42d7500d;hb=0e5b1ea3ee6a7ad8ec9b735971eb894c850c5a64;hp=0fd351dbe409545ab85fad472b27a769e0a3368a;hpb=07d71c33315605fcfc450d3b9abf0fd10e92bed5;p=kivitendo-erp.git
diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl
index 0fd351dbe..8c6132ecb 100644
--- a/bin/mozilla/pe.pl
+++ b/bin/mozilla/pe.pl
@@ -27,13 +27,14 @@
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#======================================================================
#
-# project administration
-# partsgroup administration
+# partsgroup, pricegroup administration
#
#======================================================================
use SL::PE;
+require "bin/mozilla/common.pl";
+
1;
# end of main
@@ -41,15 +42,17 @@ use SL::PE;
sub add {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
$form->{title} = "Add";
# construct callback
$form->{callback} =
- "$form->{script}?action=add&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}"
+ "$form->{script}?action=add&type=$form->{type}"
unless $form->{callback};
- &{"form_$form->{type}_header"};
- &{"form_$form->{type}_footer"};
+ call_sub("form_$form->{type}_header");
+ call_sub("form_$form->{type}_footer");
$lxdebug->leave_sub();
}
@@ -57,19 +60,21 @@ sub add {
sub edit {
$lxdebug->enter_sub();
+ $auth->assert('config');
+
+ # show history button
+ $form->{javascript} = qq||;
+ #/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);
}
if ($form->{type} eq 'pricegroup') {
PE->get_pricegroup(\%myconfig, \%$form);
}
- &{"form_$form->{type}_header"};
- &{"form_$form->{type}_footer"};
+ call_sub("form_$form->{type}_header");
+ call_sub("form_$form->{type}_footer");
$lxdebug->leave_sub();
}
@@ -77,23 +82,8 @@ sub edit {
sub search {
$lxdebug->enter_sub();
- if ($form->{type} eq 'project') {
- $report = "project_report";
- $sort = 'projectnumber';
- $form->{title} = $locale->text('Projects');
+ $auth->assert('config');
- $number = qq|
-
- | . $locale->text('Number') . qq| |
- |
-
-
- | . $locale->text('Description') . qq| |
- |
-
-|;
-
- }
if ($form->{type} eq 'partsgroup') {
$report = "partsgroup_report";
$sort = 'partsgroup';
@@ -159,10 +149,6 @@ sub search {
-{path}>
-{login}>
-{password}>
-
@@ -175,238 +161,11 @@ sub search {
$lxdebug->leave_sub();
}
-sub project_report {
- $lxdebug->enter_sub();
-
- map { $form->{$_} = $form->unescape($form->{$_}) }
- (projectnumber, description);
- PE->projects(\%myconfig, \%$form);
-
- $callback =
- "$form->{script}?action=project_report&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}&status=$form->{status}";
- $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 = $form->sort_columns(qw(projectnumber description));
-
- $column_header{projectnumber} =
- qq||
- . $locale->text('Number')
- . qq| | |;
- $column_header{description} =
- qq||
- . $locale->text('Description')
- . qq| | |;
-
- $form->{title} = $locale->text('Projects');
-
- $form->header;
-
- print qq|
-
-
-
-
- $form->{title} |
-
-
-
- $option |
-
-
-
-
- |
-
-
-
|
-
-
-
-
-
-
-
-