X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fgl.pl;h=57c1b09ed94a257201298b87629a984afff34f46;hb=a1e47d425a58b8342992daab4907591506949f07;hp=aebcd82bb11188de0e9da62f0cc354870297c187;hpb=744cfc2096349710e763d5103eef3250c52a32db;p=kivitendo-erp.git
diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl
index aebcd82bb..57c1b09ed 100644
--- a/bin/mozilla/gl.pl
+++ b/bin/mozilla/gl.pl
@@ -168,7 +168,7 @@ sub edit {
}
}
} else {
- $form->{"accno_$i"} = "$ref->{accno}--$ref->{accnotaxkey}";
+ $form->{"accno_$i"} = "$ref->{accno}--$ref->{tax_id}";
for (qw(fx_transaction source memo)) { $form->{"${_}_$i"} = $ref->{$_} }
if ($ref->{amount} < 0) {
$form->{totaldebit} -= $ref->{amount};
@@ -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!');