X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/be6f6cfd8dc7def5356edd0c5aacb814b4baded1..51fa09f29ebea609f58d14506d6938c0e0ee1ab0:/bin/mozilla/do.pl diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 27b3fa17f..2bd7f6b42 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -751,6 +751,15 @@ sub invoice { my $currency = $form->{currency}; invoice_links(); + 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); @@ -1352,7 +1361,7 @@ sub transfer_out { my $pinfo = $part_info_map{$request->{parts_id}}; my $binfo = $bin_info_map{$request->{bin_id}}; - if ($::lx_office_conf{system}->{show_best_before}) { + if ($::lx_office_conf{features}->{show_best_before}) { 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},