X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Farap.pl;h=3b1a443113e2dcc28f59bfa6e715f49db5f24967;hb=06eebe9868a3890f47d128eeeded938441df8f21;hp=ac7747e7e8af439342bdfdca9a062895621ebe5a;hpb=37452fcb0ef4537ac851fa3e816148cec345ae0c;p=kivitendo-erp.git diff --git a/bin/mozilla/arap.pl b/bin/mozilla/arap.pl index ac7747e7e..3b1a44311 100644 --- a/bin/mozilla/arap.pl +++ b/bin/mozilla/arap.pl @@ -59,7 +59,7 @@ sub check_name { 'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash |' . 'purchase_delivery_order_edit | sales_delivery_order_edit'); - my ($name) = @_; + my ($name, %params) = @_; $name = $name eq "customer" ? "customer" : "vendor"; @@ -99,9 +99,17 @@ sub check_name { $form->{calctax} = 1; # return one name or a list of names in $form->{name_list} - if (($i = $form->get_name(\%myconfig, $name)) > 1) { - &select_name($name); - exit; + $i = $form->get_name(\%myconfig, $name); + + if ($i > 1) { + if ($params{no_select}) { + # $locale->text('Customer') + # $locale->text('Vendor') + $form->error($locale->text("More than one #1 found matching, please be more specific.", $locale->text(ucfirst $name))); + } else { + &select_name($name); + ::end_of_request(); + } } if ($i == 1) { @@ -310,7 +318,7 @@ sub check_project { # check form->{project_list} how many there are $form->{rownumber} = $i; &select_project($i ? undef : 1, $nextsub); - exit; + ::end_of_request(); } if ($rows == 1) { @@ -332,120 +340,28 @@ sub check_project { } sub select_project { - $main::lxdebug->enter_sub(); + $::lxdebug->enter_sub; - my $form = $main::form; - my $locale = $main::locale; - my $cgi = $main::cgi; - - $main::auth->assert('general_ledger | vendor_invoice_edit | sales_order_edit | invoice_edit |' . - 'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash | report'); + $::auth->assert('general_ledger | vendor_invoice_edit | sales_order_edit | invoice_edit |' . + 'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash | report'); my ($is_global, $nextsub) = @_; + my $project_list = delete $::form->{project_list}; - my @column_index = qw(ndx projectnumber description); - - my %column_data; - $column_data{ndx} = qq|