X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fpe.pl;h=8c6132ecb61adb2acd38cedd606cc9ad42d7500d;hb=b2f45e7ebfee8fd1cf79632baccad61d6814fd8c;hp=83273491367dc32b5499669ea31bd0d64deca3d2;hpb=4dbb09950c9f5596646537c12d991c99086fe7c1;p=kivitendo-erp.git diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl index 832734913..8c6132ecb 100644 --- a/bin/mozilla/pe.pl +++ b/bin/mozilla/pe.pl @@ -27,82 +27,87 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #====================================================================== # -# project administration -# partsgroup administration +# partsgroup, pricegroup administration # #====================================================================== - use SL::PE; -1; -# end of main +require "bin/mozilla/common.pl"; +1; +# end of main 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}" unless $form->{callback}; + $form->{callback} = + "$form->{script}?action=add&type=$form->{type}" + unless $form->{callback}; + + call_sub("form_$form->{type}_header"); + call_sub("form_$form->{type}_footer"); - &{ "form_$form->{type}_header" }; - &{ "form_$form->{type}_footer" }; - $lxdebug->leave_sub(); } - 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); + } + call_sub("form_$form->{type}_header"); + call_sub("form_$form->{type}_footer"); - &{ "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'); + $auth->assert('config'); + + if ($form->{type} eq 'partsgroup') { + $report = "partsgroup_report"; + $sort = 'partsgroup'; + $form->{title} = $locale->text('Groups'); $number = qq|