X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/13dcc338c2e0051e091d2b7f70be023205600cad..3314d7c2247d46033fcd7cd1e1663a705db02fea:/bin/mozilla/bp.pl diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index 654a26776..10acafdaa 100644 --- a/bin/mozilla/bp.pl +++ b/bin/mozilla/bp.pl @@ -39,9 +39,13 @@ use List::Util qw(first); require "bin/mozilla/common.pl"; +use strict; + # end of main sub assert_bp_access { + my $form = $main::form; + my %access_map = ( 'invoice' => 'invoice_edit', 'sales_order' => 'sales_order_edit', @@ -53,23 +57,29 @@ sub assert_bp_access { ); if ($form->{type} && $access_map{$form->{type}}) { - $auth->assert($access_map{$form->{type}}); + $main::auth->assert($access_map{$form->{type}}); } elsif ($form->{type} eq 'packing_list') { - $lxdebug->message(0, "1"); - if (!$auth->assert('sales_order_edit', 1)) { - $lxdebug->message(0, "2"); - $auth->assert('invoice_edit') ; + $main::lxdebug->message(0, "1"); + if (!$main::auth->assert('sales_order_edit', 1)) { + $main::lxdebug->message(0, "2"); + $main::auth->assert('invoice_edit') ; } - $lxdebug->message(0, "3"); + $main::lxdebug->message(0, "3"); } else { - $auth->assert('DOES_NOT_EXIST'); + $main::auth->assert('DOES_NOT_EXIST'); } } sub search { - $lxdebug->enter_sub(); + $main::lxdebug->enter_sub(); + + my $form = $main::form; + my %myconfig = %main::myconfig; + my $locale = $main::locale; + + my ($name, $account, $onload); assert_bp_access(); @@ -96,7 +106,7 @@ sub search { # $locale->text('Customer') # $locale->text('Vendor') - %label = ( + my %label = ( invoice => { title => 'Sales Invoices', name => 'Customer', l_invnumber => 'Y' }, packing_list => @@ -161,7 +171,7 @@ sub search { $account .= qq|