From 4957e2346a5ba9a1c0e76ba95870c37090f90098 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 7 Feb 2007 14:28:35 +0000 Subject: [PATCH] =?utf8?q?Wenn=20eine=20Kunden-/Lieferantennummer=20bereit?= =?utf8?q?s=20vergeben=20wurde,=20dann=20eine=20ordentliche=20Fehlermeldun?= =?utf8?q?g=20ausgeben=20und=20die=20Programmausf=C3=BChrung=20beenden.=20?= =?utf8?q?Fix=20f=C3=BCr=20Bug=20536.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/ct.pl | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index a1bfc255d..6573eeff8 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -1372,7 +1372,15 @@ sub save { $form->isblank("salesman_id", $locale->text("Salesman missing!")); } print(STDERR "SHIPTO in sub save $form->{shipto_id}\n"); - &{"CT::save_$form->{db}"}("", \%myconfig, \%$form); + my $res = &{"CT::save_$form->{db}"}("", \%myconfig, \%$form); + + if (3 == $res) { + if ($form->{"db"} eq "customer") { + $form->error($locale->text('This customer number is already in use.')); + } else { + $form->error($locale->text('This vendor number is already in use.')); + } + } &edit; exit; -- 2.20.1