From a88b876c3d2941bdcd9429e887efcab2968c9285 Mon Sep 17 00:00:00 2001 From: Udo Spallek Date: Wed, 31 Jan 2007 02:41:50 +0000 Subject: [PATCH] =?utf8?q?Fehler=20abfangen,=20wenn=20keine=20Betr=C3=A4ge?= =?utf8?q?=20gebucht=20werden=20(leere=20Buchung)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/gl.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index fb24e3012..57c1b09ed 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -1681,6 +1681,11 @@ sub post { if ($form->round_amount($debit, 2) != $form->round_amount($credit, 2)) { $form->error($locale->text('Out of balance transaction!')); } + + if ($form->round_amount($debit, 2) + $form->round_amount($credit, 2) == 0) { + $form->error($locale->text('Empty transaction!')); + } + if (($errno = GL->post_transaction(\%myconfig, \%$form)) <= -1) { $errno *= -1; $err[1] = $locale->text('Cannot have a value in both Debit and Credit!'); -- 2.20.1