X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Farap.pl;h=3b1a443113e2dcc28f59bfa6e715f49db5f24967;hb=06eebe9868a3890f47d128eeeded938441df8f21;hp=7612166a52b121c09703521d70abe018f0a2f841;hpb=2e7983737542b36d9962073a7d04f2edcf6b8bb0;p=kivitendo-erp.git diff --git a/bin/mozilla/arap.pl b/bin/mozilla/arap.pl index 7612166a5..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) { @@ -173,12 +181,12 @@ sub select_name {
|; - $column_data{projectnumber} = qq| | | . $locale->text('Number') . qq| | |; - $column_data{description} = - qq|| . $locale->text('Description') . qq| | |; + my $prefix = $form->{"is_global"} ? "global" : ""; + my $suffix = $form->{"is_global"} ? "" : "_$form->{rownumber}"; - # list items with radio button on a form - $form->header; + $form->{"${prefix}projectnumber${suffix}"} = + $form->{"new_projectnumber_$i"}; + $form->{"old${prefix}projectnumber${suffix}"} = + $form->{"new_projectnumber_$i"}; + $form->{"${prefix}project_id${suffix}"} = $form->{"new_id_$i"}; - my $title = $locale->text('Select from one of the projects below'); + # delete all the new_ variables + for $i (1 .. $form->{lastndx}) { + map { delete $form->{"new_${_}_$i"} } qw(id projectnumber description); + } - print qq| - + my $nextsub = $form->{project_selected_nextsub} || 'update'; - +=item * - -
---|