X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/1072cd08c6f5b1905a34dcb3eeab3ddec98d6905..e055700faea1906bea6c03184ba4516b57cac887:/bin/mozilla/do.pl diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index 27b3fa17f..d6e594f5b 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);