X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fpe.pl;h=5dc9b89ee0395982212e96925b3452a8e19e55fa;hb=316b0432d8058d9366248e7b9aa9e44a98360c7f;hp=e003e07d2ba79df7c66295392f6e3501fcec18f3;hpb=9bd3030a376850c427c102c6e0c54f19bd19332e;p=kivitendo-erp.git diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl index e003e07d2..5dc9b89ee 100644 --- a/bin/mozilla/pe.pl +++ b/bin/mozilla/pe.pl @@ -27,7 +27,7 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #====================================================================== # -# partsgroup, pricegroup administration +# partsgroup administration # #====================================================================== @@ -42,604 +42,119 @@ use strict; # end of main sub add { - $main::lxdebug->enter_sub(); + $::lxdebug->enter_sub; + $::auth->assert('config'); - $main::auth->assert('config'); + $::form->{title} = "Add"; + $::form->{callback} ||= "$::form->{script}?action=add&type=$::form->{type}"; - my $form = $main::form; + call_sub("form_$::form->{type}"); - $form->{title} = "Add"; - - # construct 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"); - - $main::lxdebug->leave_sub(); + $::lxdebug->leave_sub; } sub edit { - $main::lxdebug->enter_sub(); - - $main::auth->assert('config'); + $::lxdebug->enter_sub; + $::auth->assert('config'); - my $form = $main::form; - my %myconfig = %main::myconfig; + $::form->{title} = "Edit"; - # show history button - $form->{javascript} = qq||; - #/show hhistory button - $form->{title} = "Edit"; - - 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}"); - $main::lxdebug->leave_sub(); + $::lxdebug->leave_sub; } sub search { - $main::lxdebug->enter_sub(); - - $main::auth->assert('config'); - - my $form = $main::form; - my $locale = $main::locale; + $::lxdebug->enter_sub; + $::auth->assert('config'); - my ($report, $sort, $number); - if ($form->{type} eq 'partsgroup') { - $report = "partsgroup_report"; - $sort = 'partsgroup'; - $form->{title} = $locale->text('Groups'); - - $number = qq| -