X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Farap.pl;h=3ab764c7ed6a23443ba169dfc1531d8f69132d54;hb=2dc09cf507b099b014a405001a6d67aa58cd124d;hp=38308a97b29b539521fce216f8706f9f7cc19343;hpb=8c7e44938a661e035f62840e1e177353240ace5d;p=kivitendo-erp.git diff --git a/bin/mozilla/arap.pl b/bin/mozilla/arap.pl index 38308a97b..3ab764c7e 100644 --- a/bin/mozilla/arap.pl +++ b/bin/mozilla/arap.pl @@ -30,6 +30,8 @@ # common routines for gl, ar, ap, is, ir, oe # +use SL::Projects; + # any custom scripts for this one if (-f "bin/mozilla/custom_arap.pl") { eval { require "bin/mozilla/custom_arap.pl"; }; @@ -47,8 +49,9 @@ require "bin/mozilla/common.pl"; sub check_name { $lxdebug->enter_sub(); - $auth->assert('general_ledger | vendor_invoice_edit | sales_order_edit | invoice_edit |' . - 'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash'); + $auth->assert('general_ledger | vendor_invoice_edit | sales_order_edit | invoice_edit |' . + 'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash |' . + 'purchase_delivery_order_edit | sales_delivery_order_edit'); my ($name) = @_; @@ -281,7 +284,8 @@ sub check_project { # get new project $form->{projectnumber} = $form->{"${prefix}projectnumber${suffix}"}; - if (($rows = PE->projects(\%myconfig, $form)) > 1) { + my %params = map { $_ => $form->{$_} } qw(projectnumber description active); + if (($rows = Projects->search_projects(%params)) > 1) { # check form->{project_list} how many there are $form->{rownumber} = $i;