X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fbp.pl;h=fe8a3fa38fad104a7f12c28da2d82673cdb5853d;hb=d79dde5a461087ffc71da63bb3764745571a4a60;hp=8f34b19f6e144d5e0d21014f5a081a0e781e10f0;hpb=5bc7284448a240bfebdaba20a65f845708665bd6;p=kivitendo-erp.git diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index 8f34b19f6..fe8a3fa38 100644 --- a/bin/mozilla/bp.pl +++ b/bin/mozilla/bp.pl @@ -44,23 +44,22 @@ 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'); } } @@ -78,6 +77,7 @@ sub search { purchase_order => { title => $::locale->text('Purchase Orders'), ordnumber => 1, }, sales_quotation => { title => $::locale->text('Quotations'), quonumber => 1, }, request_quotation => { title => $::locale->text('RFQs'), quonumber => 1, }, + packing_list => { title => $::locale->text('Delivery Orders'), donumber => 1, ordnumber => 1 }, check => { title => $::locale->text('Checks'), chknumber => 1, }, receipt => { title => $::locale->text('Receipts'), rctnumber => 1, }, ); @@ -97,116 +97,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| -
- - - - -