$form->isblank("invdate", $locale->text('Invoice Date missing!'));
$form->isblank("vendor", $locale->text('Vendor missing!'));
+ $form->{invnumber} =~ s/^\s*//g;
+ $form->{invnumber} =~ s/\s*$//g;
+
# if the vendor changed get new values
if (&check_name(vendor)) {
&update;
$form->isblank("invdate", $locale->text('Invoice Date missing!'));
$form->isblank("customer", $locale->text('Customer missing!'));
+ $form->{invnumber} =~ s/^\s*//g;
+ $form->{invnumber} =~ s/\s*$//g;
+
# if oldcustomer ne customer redo form
if (&check_name(customer)) {
&update;
}
my $vc = qq|
+ <input type="hidden" name="old$form->{vc}" value="| . H($form->{"old$form->{vc}"}) . qq|">
<th align="right">| . $locale->text(ucfirst($form->{vc})) . qq|</th>
<td>| .
(($myconfig{vclimit} == 1 )
$form->isblank("transdate", $locale->text('Quotation Date missing!'));
}
+ my $idx = $form->{type} =~ /_quotation$/ ? "quonumber" : "ordnumber";
+ $form->{$idx} =~ s/^\s*//g;
+ $form->{$idx} =~ s/\s*$//g;
+
$msg = ucfirst $form->{vc};
$form->isblank($form->{vc}, $locale->text($msg . " missing!"));
$form->isblank("transdate", $locale->text('Quotation Date missing!'));
}
+ my $idx = $form->{type} =~ /_quotation$/ ? "quonumber" : "ordnumber";
+ $form->{$idx} =~ s/^\s*//g;
+ $form->{$idx} =~ s/\s*$//g;
+
$msg = ucfirst $form->{vc};
$form->isblank($form->{vc}, $locale->text($msg . " missing!"));
# Let Lx-Office assign a new order number if the user hasn't changed the
# previous one. If it has been changed manually then use it as-is.
my $idx = $form->{type} =~ /_quotation$/ ? "quonumber" : "ordnumber";
+ $form->{$idx} =~ s/^\s*//g;
+ $form->{$idx} =~ s/\s*$//g;
if ($form->{saved_xyznumber} &&
($form->{saved_xyznumber} eq $form->{$idx})) {
delete($form->{$idx});