From a426a83959cee5ffc733f14d120677330f873e30 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 7 May 2007 13:02:34 +0000 Subject: [PATCH] =?utf8?q?Zwei=20Fixes:=201.=20Bei=20Angeboten/Auftr=C3=A4?= =?utf8?q?gen=20wird=20st=C3=A4ndig=20wieder=20das=20Formular=20angezeigt,?= =?utf8?q?=20wenn=20die=20Drop-Down-Box=20zur=20Auswahl=20der=20Kunden/Lie?= =?utf8?q?feranten=20angezeigt=20wird=20(weil=20check=5Fname()=20in=20arap?= =?utf8?q?.pl=20auf=20jeden=20Fall=20oldcustomer/oldvendor=20=C3=BCberpr?= =?utf8?q?=C3=BCft,=20was=20aber=20seit=20einem=20der=20letzten=20Commits?= =?utf8?q?=20nicht=20mehr=20gesetzt=20ist;=20in=20ir.pl=20und=20is.pl=20wi?= =?utf8?q?rd=20es=20noch=20gesetzt).=202.=20Einkaufs-/Verkaufsmasken:=20Be?= =?utf8?q?im=20Speichern=20werden=20Leerzeichen=20am=20Anfang=20und=20Ende?= =?utf8?q?=20der=20Angebots-/Auftrags-/Rechnungsnummer=20gel=C3=B6scht,=20?= =?utf8?q?damit=20Lx-Office=20selber=20Nummern=20vergibt.=20Damit=20wird?= =?utf8?q?=20verhindert,=20das=20nur=20aus=20Leerzeichen=20bestehende=20Nu?= =?utf8?q?mmern=20erzeugt=20werden=20k=C3=B6nnen,=20die=20aus=20Berichten?= =?utf8?q?=20dann=20nicht=20mehr=20ausgew=C3=A4hlt=20werden=20k=C3=B6nnen.?= =?utf8?q?=20Fix=20f=C3=BCr=20Bug=20637.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/ir.pl | 3 +++ bin/mozilla/is.pl | 3 +++ bin/mozilla/oe.pl | 11 +++++++++++ 3 files changed, 17 insertions(+) diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 9dd0076c5..e5b698db8 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -1099,6 +1099,9 @@ sub post { $form->isblank("invdate", $locale->text('Invoice Date missing!')); $form->isblank("vendor", $locale->text('Vendor missing!')); + $form->{invnumber} =~ s/^\s*//g; + $form->{invnumber} =~ s/\s*$//g; + # if the vendor changed get new values if (&check_name(vendor)) { &update; diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 7eb339804..e22ab4c40 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -1412,6 +1412,9 @@ sub post { $form->isblank("invdate", $locale->text('Invoice Date missing!')); $form->isblank("customer", $locale->text('Customer missing!')); + $form->{invnumber} =~ s/^\s*//g; + $form->{invnumber} =~ s/\s*$//g; + # if oldcustomer ne customer redo form if (&check_name(customer)) { &update; diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 640fb37e5..2b3ee832c 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -436,6 +436,7 @@ sub form_header { } my $vc = qq| + {vc}"}) . qq|"> | . $locale->text(ucfirst($form->{vc})) . qq| | . (($myconfig{vclimit} == 1 ) @@ -1927,6 +1928,10 @@ sub save_and_close { $form->isblank("transdate", $locale->text('Quotation Date missing!')); } + my $idx = $form->{type} =~ /_quotation$/ ? "quonumber" : "ordnumber"; + $form->{$idx} =~ s/^\s*//g; + $form->{$idx} =~ s/\s*$//g; + $msg = ucfirst $form->{vc}; $form->isblank($form->{vc}, $locale->text($msg . " missing!")); @@ -2018,6 +2023,10 @@ sub save { $form->isblank("transdate", $locale->text('Quotation Date missing!')); } + my $idx = $form->{type} =~ /_quotation$/ ? "quonumber" : "ordnumber"; + $form->{$idx} =~ s/^\s*//g; + $form->{$idx} =~ s/\s*$//g; + $msg = ucfirst $form->{vc}; $form->isblank($form->{vc}, $locale->text($msg . " missing!")); @@ -2495,6 +2504,8 @@ sub save_as_new { # 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. my $idx = $form->{type} =~ /_quotation$/ ? "quonumber" : "ordnumber"; + $form->{$idx} =~ s/^\s*//g; + $form->{$idx} =~ s/\s*$//g; if ($form->{saved_xyznumber} && ($form->{saved_xyznumber} eq $form->{$idx})) { delete($form->{$idx}); -- 2.20.1