X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fpe.pl;h=a9cee792dd558232bd8c741f9a12bb93606a0b6c;hb=505322c4b9b99beb3c0f1246edbfc54ff3a36790;hp=18c90c30afe3947f3fef4f03d7f91420283d9781;hpb=7ba6d673fa3b5a9316759670c74e645dd63995fe;p=kivitendo-erp.git diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl index 18c90c30a..a9cee792d 100644 --- a/bin/mozilla/pe.pl +++ b/bin/mozilla/pe.pl @@ -27,8 +27,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #====================================================================== # -# project administration -# partsgroup administration +# partsgroup, pricegroup administration # #====================================================================== @@ -36,860 +35,190 @@ use SL::PE; require "bin/mozilla/common.pl"; +use strict; + 1; # end of main sub add { - $lxdebug->enter_sub(); - - $form->{title} = "Add"; + $::lxdebug->enter_sub; + $::auth->assert('config'); - # construct callback - $form->{callback} = - "$form->{script}?action=add&type=$form->{type}&path=$form->{path}&login=$form->{login}&password=$form->{password}" - unless $form->{callback}; + $::form->{title} = "Add"; + $::form->{callback} ||= "$::form->{script}?action=add&type=$::form->{type}"; - &{"form_$form->{type}_header"}; - &{"form_$form->{type}_footer"}; + call_sub("form_$::form->{type}"); - $lxdebug->leave_sub(); + $::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') { - 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"}; - - $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| -