+ if ($form->{ordnumber}) {
+ require SL::DB::Order;
+ if (my $order = SL::DB::Manager::Order->find_by(ordnumber => $form->{ordnumber})) {
+ $order->load;
+ $form->{orddate} = $order->transdate_as_date;
+ $form->{$_} = $order->$_ for qw(payment_id salesman_id taxzone_id quonumber);
+ }
+ }
+
$form->{currency} = $currency;
$form->{exchangerate} = "";
$form->{forex} = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, $buysell);
$form->{currency} = $currency;
$form->{exchangerate} = "";
$form->{forex} = $form->check_exchangerate(\%myconfig, $form->{currency}, $form->{invdate}, $buysell);
push @{ $form->{ERRORS} }, $locale->text("There is not enough available of '#1' at warehouse '#2', bin '#3', #4, #5, for the transfer of #6.",
$pinfo->{description},
$binfo->{warehouse_description},
push @{ $form->{ERRORS} }, $locale->text("There is not enough available of '#1' at warehouse '#2', bin '#3', #4, #5, for the transfer of #6.",
$pinfo->{description},
$binfo->{warehouse_description},