Verkaeufer und Bearbeiter wurden beim Umwandeln nicht uebernommen
authorPhilip Reetz <p.reetz@linet-services.de>
Thu, 7 Jun 2007 14:02:46 +0000 (14:02 +0000)
committerPhilip Reetz <p.reetz@linet-services.de>
Thu, 7 Jun 2007 14:02:46 +0000 (14:02 +0000)
bin/mozilla/is.pl
bin/mozilla/oe.pl

index 943dede..9fbbb9e 100644 (file)
@@ -279,6 +279,13 @@ sub prepare_invoice {
 sub form_header {
   $lxdebug->enter_sub();
 
+  if ($form->{old_employee_id}) {
+    $form->{employee_id} = $form->{old_employee_id};
+  }
+  if ($form->{old_salesman_id}) {
+    $form->{salesman_id} = $form->{old_salesman_id};
+  }
+
   if ($edit) {
 
     if ($form->{type} eq "credit_note") {
index c9cb92e..6ee8520 100644 (file)
@@ -324,6 +324,13 @@ sub form_header {
   my $checkedclosed = $form->{"closed"} ? "checked" : "";
   my $checkeddelivered = $form->{"delivered"} ? "checked" : "";
 
+  if ($form->{old_employee_id}) {
+    $form->{employee_id} = $form->{old_employee_id};
+  }
+  if ($form->{old_salesman_id}) {
+    $form->{salesman_id} = $form->{old_salesman_id};
+  }
+
   map { $form->{$_} =~ s/\"/&quot;/g }
     qw(ordnumber quonumber shippingpoint shipvia notes intnotes shiptoname
        shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact
@@ -2180,6 +2187,9 @@ sub delete_order_quotation {
 sub invoice {
   $lxdebug->enter_sub();
 
+  $form->{old_employee_id} = $form->{employee_id};
+  $form->{old_salesman_id} = $form->{salesman_id};
+
   if ($form->{type} =~ /_order$/) {
 
     # these checks only apply if the items don't bring their own ordnumbers/transdates.
@@ -2231,6 +2241,7 @@ sub invoice {
     $exchangerate =
       $form->check_exchangerate(\%myconfig, $form->{currency}, $orddate,
                                 $buysell);
+    print(STDERR "CURRENCY $form->{currency} DEFAULT: $form->{defaultcurrency} EXCHANGE $exchangerate\n");
 
     if (!$exchangerate) {
       &backorder_exchangerate($orddate, $buysell);
@@ -2621,6 +2632,9 @@ sub poso {
 
   $form->{closed} = 0;
 
+  $form->{old_employee_id} = $form->{employee_id};
+  $form->{old_salesman_id} = $form->{salesman_id};
+
   # reset
   map { delete $form->{$_} }
     qw(id subject message cc bcc printed emailed queued customer vendor creditlimit creditremaining discount tradediscount oldinvtotal);