X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Farap.pl;h=1ed40a7f942b3b58c47961223edd1246fd3cd754;hb=56e9d81259d7f0b45b8a9dd3dc8dce6e048806c3;hp=8971da532fe5206140abd5b98390217f9bc82caa;hpb=0884406403ce36af3484924086527ba689807329;p=kivitendo-erp.git diff --git a/bin/mozilla/arap.pl b/bin/mozilla/arap.pl index 8971da532..1ed40a7f9 100644 --- a/bin/mozilla/arap.pl +++ b/bin/mozilla/arap.pl @@ -49,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) = @_; @@ -274,6 +275,8 @@ sub check_project { $auth->assert('general_ledger | vendor_invoice_edit | sales_order_edit | invoice_edit |' . 'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash | report'); + my $nextsub = shift || 'update'; + for $i (1 .. $form->{rowcount}) { my $suffix = $i ? "_$i" : ""; my $prefix = $i ? "" : "global"; @@ -288,7 +291,7 @@ sub check_project { # check form->{project_list} how many there are $form->{rownumber} = $i; - &select_project($i ? undef : 1); + &select_project($i ? undef : 1, $nextsub); exit; } @@ -316,7 +319,7 @@ sub select_project { $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) = @_; + my ($is_global, $nextsub) = @_; @column_index = qw(ndx projectnumber description); @@ -404,9 +407,10 @@ sub select_project { print qq|\n|; } - print qq| - - + print + $cgi->hidden('-name' => 'is_global', '-default' => [$is_global]) + . $cgi->hidden('-name' => 'project_selected_nextsub', '-default' => [$nextsub]) + . qq|
{$_} } qw(ndx lastndx nextsub is_global); + my $nextsub = $form->{project_selected_nextsub} || 'update'; - if ($form->{update}) { - call_sub($form->{"update"}); - } else { - &update; - } + map { delete $form->{$_} } qw(ndx lastndx nextsub is_global project_selected_nextsub); + + call_sub($nextsub); $lxdebug->leave_sub(); }