X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/5bc7284448a240bfebdaba20a65f845708665bd6..4c4939d0:/bin/mozilla/bp.pl diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index 8f34b19f6..1d9d79fae 100644 --- a/bin/mozilla/bp.pl +++ b/bin/mozilla/bp.pl @@ -44,8 +44,6 @@ use strict; # end of main sub assert_bp_access { - my $form = $main::form; - my %access_map = ( 'invoice' => 'invoice_edit', 'sales_order' => 'sales_order_edit', @@ -56,11 +54,11 @@ sub assert_bp_access { 'receipt' => 'cash', ); - if ($form->{type} && $access_map{$form->{type}}) { - $main::auth->assert($access_map{$form->{type}}); + if ($::form->{type} && $access_map{$::form->{type}}) { + $::auth->assert($access_map{$::form->{type}}); } else { - $main::auth->assert('DOES_NOT_EXIST'); + $::auth->assert('DOES_NOT_EXIST'); } } @@ -97,116 +95,51 @@ sub search { } sub remove { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my $locale = $main::locale; - - assert_bp_access(); - - my $selected = 0; - - for my $i (1 .. $form->{rowcount}) { - if ($form->{"checked_$i"}) { - $selected = 1; - last; - } - } - - $form->error('Nothing selected!') unless $selected; - - $form->{title} = $locale->text('Confirm!'); - - $form->header; - - print qq| -
- - - - -