X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fpe.pl;h=5dc9b89ee0395982212e96925b3452a8e19e55fa;hb=14562379bf33cf4b4388c6cf594ee8fc56ae3f87;hp=5a617ba4deaac7643c10e60ce0133dd82a525e4d;hpb=5b22b6b5b7dbb290048cd15b3ede7d18cba4d09c;p=kivitendo-erp.git diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl index 5a617ba4d..5dc9b89ee 100644 --- a/bin/mozilla/pe.pl +++ b/bin/mozilla/pe.pl @@ -27,7 +27,6 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #====================================================================== # -# project administration # partsgroup administration # #====================================================================== @@ -36,866 +35,126 @@ use SL::PE; require "bin/mozilla/common.pl"; +use strict; + 1; # end of main sub add { - $lxdebug->enter_sub(); - - $auth->assert('config'); - - $form->{title} = "Add"; + $::lxdebug->enter_sub; + $::auth->assert('config'); - # construct callback - $form->{callback} = - "$form->{script}?action=add&type=$form->{type}" - unless $form->{callback}; + $::form->{title} = "Add"; + $::form->{callback} ||= "$::form->{script}?action=add&type=$::form->{type}"; - call_sub("form_$form->{type}_header"); - call_sub("form_$form->{type}_footer"); + call_sub("form_$::form->{type}"); - $lxdebug->leave_sub(); + $::lxdebug->leave_sub; } sub edit { - $lxdebug->enter_sub(); + $::lxdebug->enter_sub; + $::auth->assert('config'); - $auth->assert('config'); + $::form->{title} = "Edit"; - # 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); + if ($::form->{type} eq 'partsgroup') { + PE->get_partsgroup(\%::myconfig, $::form); } - call_sub("form_$form->{type}_header"); - call_sub("form_$form->{type}_footer"); + call_sub("form_$::form->{type}"); - $lxdebug->leave_sub(); + $::lxdebug->leave_sub; } sub search { - $lxdebug->enter_sub(); - - $auth->assert('config'); - - if ($form->{type} eq 'project') { - $report = "project_report"; - $sort = 'projectnumber'; - $form->{title} = $locale->text('Projects'); - - $number = qq| -