From b03dd3d7b7f7d8de0a5785e56d72511ba916daac Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Thu, 3 Sep 2009 15:41:08 +0200 Subject: [PATCH] =?utf8?q?Feature:=20Bei=20Save=20as=20new=20von=20Auftr?= =?utf8?q?=C3=A4gen=20werden=20jetzt=20die=20folgenden=20Felder=20beachtet?= =?utf8?q?:?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit - Lieferdatum wird geleert, solange nicht geändert. - Bearbeiter wird auf den aktuellen Benutzer gesetzt. - Zusätzlich zum geschlossen Status wird jetzt auch der geliefert Status geleert. Fix zu Bug 1110. --- bin/mozilla/oe.pl | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 094c3cd84..9de5cde98 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -1478,8 +1478,7 @@ sub save_as_new { check_oe_access(); $form->{saveasnew} = 1; - $form->{closed} = 0; - map { delete $form->{$_} } qw(printed emailed queued); + map { delete $form->{$_} } qw(printed emailed queued delivered closed); # Let Lx-Office assign a new order number if the user hasn't changed the # previous one. If it has been changed manually then use it as-is. @@ -1491,6 +1490,17 @@ sub save_as_new { delete($form->{$idx}); } + # clear reqdate unless changed + if ($form->{reqdate} && $form->{id}) { + my $saved_order = OE->retrieve_simple(id => $form->{id}); + if ($saved_order && $saved_order->{reqdate} eq $form->{reqdate}) { + delete $form->{reqdate}; + } + } + + # update employee + $form->get_employee(); + &save; $lxdebug->leave_sub(); -- 2.20.1