From: Udo Spallek Date: Wed, 31 Jan 2007 02:41:50 +0000 (+0000) Subject: Fehler abfangen, wenn keine Beträge gebucht werden (leere Buchung) X-Git-Tag: release-2.4.2~207 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=a88b876c3d2941bdcd9429e887efcab2968c9285;p=kivitendo-erp.git Fehler abfangen, wenn keine Beträge gebucht werden (leere Buchung) --- 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!');