From ba7276fa911871e2dcbb1fbc19e1ba4ce20ac658 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 9 Nov 2012 15:37:41 +0100 Subject: [PATCH] =?utf8?q?Bei=20Umwandlung=20Angebot=20->=20Auftrag=20Feld?= =?utf8?q?=20"reqdate"=20l=C3=B6schen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixt #1969. --- bin/mozilla/oe.pl | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 0bcb897bf..c7309dc86 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1736,13 +1736,14 @@ sub purchase_order { $form->{cp_id} *= 1; + my $source_type = $form->{type}; $form->{title} = $locale->text('Add Purchase Order'); $form->{vc} = "vendor"; $form->{type} = "purchase_order"; $form->get_employee(); - &poso; + poso(source_type => $form->{type}); delete $form->{sales_order_to_purchase_order}; @@ -1764,13 +1765,14 @@ sub sales_order { $form->{cp_id} *= 1; + my $source_type = $form->{type}; $form->{title} = $locale->text('Add Sales Order'); $form->{vc} = "customer"; $form->{type} = "sales_order"; $form->get_employee(); - &poso; + poso(source_type => $source_type); $main::lxdebug->leave_sub(); } @@ -1778,6 +1780,7 @@ sub sales_order { sub poso { $main::lxdebug->enter_sub(); + my %param = @_; my $form = $main::form; my %myconfig = %main::myconfig; @@ -1787,6 +1790,11 @@ sub poso { $form->{transdate} = $form->current_date(\%myconfig); delete $form->{duedate}; + # "reqdate" is the validity date for a quotation and the delivery + # date for an order. Therefore it makes no sense to keep the value + # when converting from one into the other. + delete $form->{reqdate} if ($param{source_type} =~ /_quotation$/) == ($form->{type} =~ /_quotation$/); + $form->{convert_from_oe_ids} = $form->{id}; $form->{closed} = 0; -- 2.20.1