275 |
275 |
$auth->assert('general_ledger | vendor_invoice_edit | sales_order_edit | invoice_edit |' .
|
276 |
276 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash | report');
|
277 |
277 |
|
|
278 |
my $nextsub = shift || 'update';
|
|
279 |
|
278 |
280 |
for $i (1 .. $form->{rowcount}) {
|
279 |
281 |
my $suffix = $i ? "_$i" : "";
|
280 |
282 |
my $prefix = $i ? "" : "global";
|
... | ... | |
289 |
291 |
|
290 |
292 |
# check form->{project_list} how many there are
|
291 |
293 |
$form->{rownumber} = $i;
|
292 |
|
&select_project($i ? undef : 1);
|
|
294 |
&select_project($i ? undef : 1, $nextsub);
|
293 |
295 |
exit;
|
294 |
296 |
}
|
295 |
297 |
|
... | ... | |
317 |
319 |
$auth->assert('general_ledger | vendor_invoice_edit | sales_order_edit | invoice_edit |' .
|
318 |
320 |
'request_quotation_edit | sales_quotation_edit | purchase_order_edit | cash | report');
|
319 |
321 |
|
320 |
|
my ($is_global) = @_;
|
|
322 |
my ($is_global, $nextsub) = @_;
|
321 |
323 |
|
322 |
324 |
@column_index = qw(ndx projectnumber description);
|
323 |
325 |
|
... | ... | |
405 |
407 |
print qq|<input name=$key type=hidden value="$form->{$key}">\n|;
|
406 |
408 |
}
|
407 |
409 |
|
408 |
|
print qq|
|
409 |
|
<input type="hidden" name="is_global" value="$is_global">
|
410 |
|
<input type=hidden name=nextsub value=project_selected>
|
|
410 |
print
|
|
411 |
$cgi->hidden('-name' => 'is_global', '-default' => [$is_global])
|
|
412 |
. $cgi->hidden('-name' => 'project_selected_nextsub', '-default' => [$nextsub])
|
|
413 |
. qq|<input type=hidden name=nextsub value=project_selected>
|
411 |
414 |
|
412 |
415 |
<br>
|
413 |
416 |
<input class=submit type=submit name=action value="|
|
... | ... | |
446 |
449 |
map { delete $form->{"new_${_}_$i"} } qw(id projectnumber description);
|
447 |
450 |
}
|
448 |
451 |
|
449 |
|
map { delete $form->{$_} } qw(ndx lastndx nextsub is_global);
|
|
452 |
my $nextsub = $form->{project_selected_nextsub} || 'update';
|
450 |
453 |
|
451 |
|
if ($form->{update}) {
|
452 |
|
call_sub($form->{"update"});
|
453 |
|
} else {
|
454 |
|
&update;
|
455 |
|
}
|
|
454 |
map { delete $form->{$_} } qw(ndx lastndx nextsub is_global project_selected_nextsub);
|
|
455 |
|
|
456 |
call_sub($nextsub);
|
456 |
457 |
|
457 |
458 |
$lxdebug->leave_sub();
|
458 |
459 |
}
|
Nach der Projektauswahl die richtige Funktion aufrufen.
Fix für Bug 940.