X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fbp.pl;h=439709ebcd87f061a2f9c37376fb81b58cc095b3;hb=08e48f66590f580cbe2c8e3df76883d88b4c0fef;hp=9ce49155ab6dbd84545dcabcdaf909bb86b753bf;hpb=e055700faea1906bea6c03184ba4516b57cac887;p=kivitendo-erp.git diff --git a/bin/mozilla/bp.pl b/bin/mozilla/bp.pl index 9ce49155a..439709ebc 100644 --- a/bin/mozilla/bp.pl +++ b/bin/mozilla/bp.pl @@ -24,7 +24,8 @@ # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, +# MA 02110-1335, USA. #====================================================================== # # Batch printing @@ -32,6 +33,7 @@ #====================================================================== use SL::BP; +use SL::Locale::String qw(t8); use Data::Dumper; use List::Util qw(first); @@ -44,618 +46,190 @@ 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 .= "