X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fpe.pl;h=a9cee792dd558232bd8c741f9a12bb93606a0b6c;hb=72be9c763f3b7f7df1fae4fe10011e45f9e2ad1d;hp=4d06f5270530df5865aa878cc62ae139fdb3b226;hpb=8fd8506061896718059ada99c1b5f11780415568;p=kivitendo-erp.git diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl index 4d06f5270..a9cee792d 100644 --- a/bin/mozilla/pe.pl +++ b/bin/mozilla/pe.pl @@ -42,607 +42,183 @@ 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(); + $::lxdebug->enter_sub; + $::auth->assert('config'); - $main::auth->assert('config'); + $::form->{title} = "Edit"; - my $form = $main::form; - my %myconfig = %main::myconfig; - - # 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 'partsgroup') { + PE->get_partsgroup(\%::myconfig, $::form); } - if ($form->{type} eq 'pricegroup') { - PE->get_pricegroup(\%myconfig, \%$form); + if ($::form->{type} eq 'pricegroup') { + PE->get_pricegroup(\%::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; - - my ($report, $sort, $number); - if ($form->{type} eq 'partsgroup') { - $report = "partsgroup_report"; - $sort = 'partsgroup'; - $form->{title} = $locale->text('Groups'); - - $number = qq| -