X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fpe.pl;h=a9cee792dd558232bd8c741f9a12bb93606a0b6c;hb=e86e30de944c4bbe4b42f43d933e0a28a83408dd;hp=201e96b225e356bcf944418044b47f569dffdd1c;hpb=ee072e4f077213bf6f8792ca8f0a1afebbb6282f;p=kivitendo-erp.git diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl index 201e96b22..a9cee792d 100644 --- a/bin/mozilla/pe.pl +++ b/bin/mozilla/pe.pl @@ -27,587 +27,198 @@ # 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(); + $::lxdebug->enter_sub; + $::auth->assert('config'); - $form->{title} = "Add"; + $::form->{title} = "Add"; + $::form->{callback} ||= "$::form->{script}?action=add&type=$::form->{type}"; - # construct callback - $form->{callback} = - "$form->{script}?action=add&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}" - unless $form->{callback}; + call_sub("form_$::form->{type}"); - &{"form_$form->{type}_header"}; - &{"form_$form->{type}_footer"}; - - $lxdebug->leave_sub(); + $::lxdebug->leave_sub; } sub edit { - $lxdebug->enter_sub(); + $::lxdebug->enter_sub; + $::auth->assert('config'); - $form->{title} = "Edit"; + $::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 'partsgroup') { - PE->get_partsgroup(\%myconfig, \%$form); + if ($::form->{type} eq 'pricegroup') { + PE->get_pricegroup(\%::myconfig, $::form); } + call_sub("form_$::form->{type}"); - &{"form_$form->{type}_header"}; - &{"form_$form->{type}_footer"}; - - $lxdebug->leave_sub(); + $::lxdebug->leave_sub; } sub search { - $lxdebug->enter_sub(); - - if ($form->{type} eq 'project') { - $report = "project_report"; - $sort = 'projectnumber'; - $form->{title} = $locale->text('Projects'); - - $number = qq| -