- $query = qq|INSERT INTO orderitems (|;
- if ($form->{"orderitems_id_$i"}) {
- $query .= "id, ";
- }
- $query .= qq|trans_id, parts_id, description, longdescription, qty, base_qty, | .
- qq|sellprice, discount, unit, reqdate, project_id, serialnumber, ship, | .
- qq|pricegroup_id, ordnumber, transdate, cusordnumber, subtotal, | .
- qq|marge_percent, marge_total, lastcost, price_factor_id, price_factor, marge_price_factor) | .
- qq|VALUES (|;
- if($form->{"orderitems_id_$i"}) {
- $query .= qq|?,|;
- push(@values, $form->{"orderitems_id_$i"});
- }
- $query .= qq|?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
- (SELECT factor FROM price_factors WHERE id = ?), ?)|;
+ $query = qq|INSERT INTO orderitems (
+ id, trans_id, parts_id, description, longdescription, qty, base_qty,
+ sellprice, discount, unit, reqdate, project_id, serialnumber, ship,
+ pricegroup_id, ordnumber, transdate, cusordnumber, subtotal,
+ marge_percent, marge_total, lastcost, price_factor_id, price_factor, marge_price_factor)
+ VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
+ (SELECT factor FROM price_factors WHERE id = ?), ?)|;