From 0cb4ad8c4f693d746e9d9fa5da900d4accd7119d Mon Sep 17 00:00:00 2001
From: Philip Reetz
Date: Thu, 7 Jun 2007 14:02:46 +0000
Subject: [PATCH] Verkaeufer und Bearbeiter wurden beim Umwandeln nicht
uebernommen
---
bin/mozilla/is.pl | 7 +++++++
bin/mozilla/oe.pl | 14 ++++++++++++++
2 files changed, 21 insertions(+)
diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl
index 943dede25..9fbbb9efe 100644
--- a/bin/mozilla/is.pl
+++ b/bin/mozilla/is.pl
@@ -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") {
diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl
index c9cb92e0a..6ee8520c2 100644
--- a/bin/mozilla/oe.pl
+++ b/bin/mozilla/oe.pl
@@ -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/\"/"/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);
--
2.20.1