X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fgl.pl;h=57c1b09ed94a257201298b87629a984afff34f46;hb=a1e47d425a58b8342992daab4907591506949f07;hp=be71a67db3088aa83dc61f1e8206734b112c61cf;hpb=8a3ba14876691dea5ebc6e92d37a2fd3b469dc07;p=kivitendo-erp.git
diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl
index be71a67db..57c1b09ed 100644
--- a/bin/mozilla/gl.pl
+++ b/bin/mozilla/gl.pl
@@ -177,7 +177,7 @@ sub edit {
$form->{totalcredit} += $ref->{amount};
$form->{"credit_$i"} = $ref->{amount};
}
- $form->{"taxchart_$i"} = "0--";
+ $form->{"taxchart_$i"} = "0--0.00";
$i++;
}
if ($ref->{taxaccno} && !$tax) {
@@ -293,6 +293,7 @@ sub search {
| . $locale->text('From') . qq| |
$button1
+ | . $locale->text('To (time)') . qq| |
$button2
@@ -848,14 +849,7 @@ sub generate_report {
|;
-
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
-
- print qq|
+ . $locale->text('Vendor Invoice') . qq|">
@@ -968,7 +962,7 @@ sub update {
: $form->{"debit_$i"};
$j = $#a;
if (($debitcredit && $credittax) || (!$debitcredit && $debittax)) {
- $form->{"taxchart_$i"} = "0--";
+ $form->{"taxchart_$i"} = "0--0.00";
$form->{"tax_$i"} = 0;
}
if (!$form->{"korrektur_$i"}) {
@@ -1464,11 +1458,6 @@ sub form_footer {
}
}
- if ($form->{menubar}) {
- require "$form->{path}/menu.pl";
- &menubar;
- }
-
print "
@@ -1609,7 +1598,7 @@ sub post {
: $form->{"debit_$i"};
$j = $#a;
if (($debitcredit && $credittax) || (!$debitcredit && $debittax)) {
- $form->{"taxchart_$i"} = "0--";
+ $form->{"taxchart_$i"} = "0--0.00";
$form->{"tax_$i"} = 0;
}
if (!$form->{"korrektur_$i"}) {
@@ -1692,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!');