X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fbp.pl;h=d8180a630201674dfb608338fb15ba1c1479e5f1;hb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44;hp=173f8b6c182b858b10ea18ebdaab10679f63a9bf;hpb=b1dbc0a2a7a5b363ee05d62acdc86bc8c76bb1be;p=kivitendo-erp.git diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index 173f8b6c1..d8180a630 100644 --- a/bin/mozilla/bp.pl +++ b/bin/mozilla/bp.pl @@ -44,617 +44,159 @@ use strict; # end of main sub assert_bp_access { - my $form = $main::form; - my %access_map = ( 'invoice' => 'invoice_edit', 'sales_order' => 'sales_order_edit', 'sales_quotation' => 'sales_quotation_edit', 'purchase_order' => 'purchase_order_edit', + 'packing_list' => 'sales_delivery_order_edit|purchase_delivery_order_edit', 'request_quotation' => 'request_quotation_edit', 'check' => 'cash', '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'); } } 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('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 .= "