+ if (!$form->{customernumber} && $form->{business}) {
+ $form->{customernumber} =
+ $form->update_business($myconfig, $form->{business});
+ }
+ if (!$form->{customernumber}) {
+ $form->{customernumber} =
+ $form->update_defaults($myconfig, "customernumber");
+ }
+
+ $query = qq|SELECT c.id FROM customer c
+ WHERE c.customernumber = '$form->{customernumber}'|;
+ $sth = $dbh->prepare($query);
+ $sth->execute || $form->dberror($query);
+ (${f_id}) = $sth->fetchrow_array;
+ $sth->finish;
+ if (${f_id} ne "") {
+ $main::lxdebug->leave_sub();
+ return 3;
+ }