X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/57bf9c89a037036fcf433de39643778854defe51..1b9a64fa292f375c82b4af788d0606354bc4e8ff:/bin/mozilla/pe.pl diff --git a/bin/mozilla/pe.pl b/bin/mozilla/pe.pl index 4d06f5270..5e5e0644c 100644 --- a/bin/mozilla/pe.pl +++ b/bin/mozilla/pe.pl @@ -24,10 +24,11 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1335, USA. #====================================================================== # -# partsgroup, pricegroup administration +# partsgroup administration # #====================================================================== @@ -42,607 +43,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| -