shop = '$form->{shop}',
ve = '$form->{ve}',
gv = '$form->{gv}',
+ ean = '$form->{ean}',
not_discountable = '$form->{not_discountable}',
microfiche = '$form->{microfiche}',
partsgroup_id = $partsgroup_id
}
}
+ if ($form->{ean}) {
+ $var = $form->like(lc $form->{ean});
+ $where .= " AND lower(ean) LIKE '$var'";
+ }
+
if ($form->{searchitems} eq 'part') {
$where .= " AND p.inventory_accno_id > 0";
}
}
$sth->finish;
- if ($form->{id}) {
- $query = qq|SELECT weightunit
- FROM defaults|;
- $sth = $dbh->prepare($query);
- $sth->execute || $form->dberror($query);
-
- ($form->{weightunit}) = $sth->fetchrow_array;
- $sth->finish;
-
- } else {
- $query = qq|SELECT weightunit, current_date
- FROM defaults|;
+ if (!$form->{id}) {
+ $query = qq|SELECT current_date FROM defaults|;
$sth = $dbh->prepare($query);
$sth->execute || $form->dberror($query);
- ($form->{weightunit}, $form->{priceupdate}) = $sth->fetchrow_array;
+ ($form->{priceupdate}) = $sth->fetchrow_array;
$sth->finish;
}