X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fpe.pl;h=e003e07d2ba79df7c66295392f6e3501fcec18f3;hb=dbd0ae115bd9a6ba0ede24f9655a29df6bf7dc3b;hp=660e37a9bfcf0e4a632de9bf1e6073a01310cedf;hpb=8ec0d29a33e23ce962b807e87cc8b577c8c98ec2;p=kivitendo-erp.git diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl index 660e37a9b..e003e07d2 100644 --- a/bin/mozilla/pe.pl +++ b/bin/mozilla/pe.pl @@ -27,83 +27,84 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #====================================================================== # -# project administration -# partsgroup administration +# partsgroup, pricegroup administration # #====================================================================== use SL::PE; +require "bin/mozilla/common.pl"; + +use strict; + 1; # end of main sub add { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); + + $main::auth->assert('config'); + + my $form = $main::form; $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(); + $main::lxdebug->leave_sub(); } sub edit { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); + + $main::auth->assert('config'); + + my $form = $main::form; + my %myconfig = %main::myconfig; + # 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(); + $main::lxdebug->leave_sub(); } sub search { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); - if ($form->{type} eq 'project') { - $report = "project_report"; - $sort = 'projectnumber'; - $form->{title} = $locale->text('Projects'); + $main::auth->assert('config'); - $number = qq| -
- | | - . $locale->text('All') . qq| - | - . $locale->text('Orphaned') . qq| | -
+ | | . $locale->text('All') . qq| + | . $locale->text('Orphaned') . qq| | +