X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fbp.pl;h=1d9d79fae1adba3ca5989a0d28a0cb2e2b97dcc8;hb=5494f687372570c9d1c5eb5c6aad73767e50820a;hp=87afc32932ba1f8e5da54d0dd8e37b519b78e35f;hpb=e6f4310417ed916979a24a8699c549f38609d34a;p=kivitendo-erp.git diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index 87afc3293..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,388 +95,105 @@ 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| -
- - - - -