projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ab5a4f
)
Fehler abfangen, wenn keine Beträge gebucht werden (leere Buchung)
author
Udo Spallek
<info@wissensvermittlung.com>
Wed, 31 Jan 2007 02:41:50 +0000
(
02:41
+0000)
committer
Udo Spallek
<info@wissensvermittlung.com>
Wed, 31 Jan 2007 02:41:50 +0000
(
02:41
+0000)
bin/mozilla/gl.pl
patch
|
blob
|
history
diff --git
a/bin/mozilla/gl.pl
b/bin/mozilla/gl.pl
index
fb24e30
..
57c1b09
100644
(file)
--- 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!');