Revision d6db88a3
Von Sven Schöling vor fast 11 Jahren hinzugefügt
SL/IC.pm | ||
---|---|---|
461 | 461 |
my $i = $form->{assembly_rows}; |
462 | 462 |
# if last row is not empty add them |
463 | 463 |
if ($form->{"partnumber_$i"} ne "") { |
464 |
$query = qq|SELECT id FROM parts WHERE partnumber = ?|;
|
|
465 |
my ($partid) = selectrow_query($form, $dbh, $query,$form->{"partnumber_$i"} );
|
|
466 |
if ( $partid ) {
|
|
467 |
$form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
|
|
468 |
$form->{"id_$i"} = $partid;
|
|
469 |
$form->{"bom_$i"} = 0;
|
|
470 |
$form->{assembly_rows}++;
|
|
471 |
}
|
|
472 |
else {
|
|
473 |
$::form->error($::locale->text("uncorrect partnumber ").$form->{"partnumber_$i"});
|
|
474 |
}
|
|
464 |
$query = qq|SELECT id FROM parts WHERE partnumber = ?|;
|
|
465 |
my ($partid) = selectrow_query($form, $dbh, $query,$form->{"partnumber_$i"} );
|
|
466 |
if ( $partid ) {
|
|
467 |
$form->{"qty_$i"} = 1 unless ($form->{"qty_$i"});
|
|
468 |
$form->{"id_$i"} = $partid;
|
|
469 |
$form->{"bom_$i"} = 0;
|
|
470 |
$form->{assembly_rows}++;
|
|
471 |
}
|
|
472 |
else {
|
|
473 |
$::form->error($::locale->text("uncorrect partnumber ").$form->{"partnumber_$i"});
|
|
474 |
}
|
|
475 | 475 |
} |
476 | 476 |
|
477 | 477 |
for my $i (1 .. $form->{assembly_rows}) { |
Auch abrufbar als: Unified diff
no tabs