# need the current dbh to get the not yet committed mtime
$form->new_lastmtime('ar', $provided_dbh);
# need the current dbh to get the not yet committed mtime
$form->new_lastmtime('ar', $provided_dbh);
# add shipto
if (!$form->{shipto_id}) {
$form->add_shipto($dbh, $form->{id}, "AR");
# add shipto
if (!$form->{shipto_id}) {
$form->add_shipto($dbh, $form->{id}, "AR");
do_query($form, $dbh, $query, @orphaned_ids);
}
do_query($form, $dbh, $query, @orphaned_ids);
}
$query =
qq|SELECT
c.id AS customer_id, c.name AS customer, c.discount as customer_discount, c.creditlimit,
$query =
qq|SELECT
c.id AS customer_id, c.name AS customer, c.discount as customer_discount, c.creditlimit,
$ref = selectfirst_hashref_query($form, $dbh, $query, @values);
delete $ref->{salesman_id} if !$ref->{salesman_id};
$ref = selectfirst_hashref_query($form, $dbh, $query, @values);
delete $ref->{salesman_id} if !$ref->{salesman_id};