-
- # do not update if assembly consists of all services
- $query =
- qq|SELECT sum(p.inventory_accno_id)
- FROM parts p
- JOIN assembly a ON (a.parts_id = p.id)
- WHERE a.id = ?|;
- $sth = prepare_execute_query($form, $dbh, $query, conv_i($form->{"id_$i"}));
-
- if ($sth->fetchrow_array) {
- $form->update_balance($dbh, "parts", "onhand", qq|id = ?|,
- $baseqty * -1, $form->{"id_$i"})
- unless $form->{shipped};
- }
- $sth->finish;
-