- }
-
- #correct rows
- $form->{price_rows} = $i - 1;
-
- unless ($form->{item} eq 'service') {
-
- # get makes
- if ($form->{makemodel}) {
- #hli
- $query = qq|SELECT m.make, m.model,m.lastcost,m.lastcost,m.lastupdate,m.sortorder FROM makemodel m | .
- qq|WHERE m.parts_id = ? order by m.sortorder asc|;
- my @values = ($form->{id});
- $sth = $dbh->prepare($query);
- $sth->execute(@values) || $form->dberror("$query (" . join(', ', @values) . ")");
-
- my $i = 1;
-
- while (($form->{"make_$i"}, $form->{"model_$i"}, $form->{"old_lastcost_$i"},
- $form->{"lastcost_$i"}, $form->{"lastupdate_$i"}, $form->{"sortorder_$i"}) = $sth->fetchrow_array)
- {
- $i++;
- }
- $sth->finish;
- $form->{makemodel_rows} = $i - 1;