X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fbp.pl;h=1d9d79fae1adba3ca5989a0d28a0cb2e2b97dcc8;hb=5494f687372570c9d1c5eb5c6aad73767e50820a;hp=10acafdaa079005eb069856c80df4b768f83835f;hpb=3314d7c2247d46033fcd7cd1e1663a705db02fea;p=kivitendo-erp.git diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index 10acafdaa..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,621 +54,146 @@ sub assert_bp_access { 'receipt' => 'cash', ); - if ($form->{type} && $access_map{$form->{type}}) { - $main::auth->assert($access_map{$form->{type}}); - - } elsif ($form->{type} eq 'packing_list') { - $main::lxdebug->message(0, "1"); - if (!$main::auth->assert('sales_order_edit', 1)) { - $main::lxdebug->message(0, "2"); - $main::auth->assert('invoice_edit') ; - } - $main::lxdebug->message(0, "3"); + 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'); } } sub search { - $main::lxdebug->enter_sub(); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $locale = $main::locale; - - my ($name, $account, $onload); + $::lxdebug->enter_sub; assert_bp_access(); - # $locale->text('Sales Invoices') - # $locale->text('Packing Lists') - # $locale->text('Sales Orders') - # $locale->text('Purchase Orders') - # $locale->text('Quotations') - # $locale->text('RFQs') - # $locale->text('Checks') - # $locale->text('Receipts') - # setup customer/vendor selection - BP->get_vc(\%myconfig, \%$form); - - if (@{ $form->{"all_$form->{vc}"} }) { - map { $name .= "