X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=44360f43d2efc5b9857ac94945b3c5fe8ef4627d;hb=24b6b41bbc19de53e40315124350df14314c6fd6;hp=1baed9102d9ae5d19005ec02617d77de475dc93d;hpb=2d3f862b7af94f31860dd264eef7c1bc7de7eae2;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 1baed9102..44360f43d 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -74,10 +74,6 @@ use strict; # $locale->text('Nov') # $locale->text('Dec') -my $tax; -my $debitlock = 0; -my $creditlock = 0; - sub add { $main::lxdebug->enter_sub(); @@ -96,12 +92,6 @@ sub add { # yep. aber er holt hier auch schon ALL_CHARTS. Aufwand / Nutzen? jb GL->transaction(\%myconfig, \%$form); - map { - $tax .= - qq|$_->{taxdescription} | - . ($_->{rate} * 100) . qq| %| - } @{ $form->{TAX} }; - $form->{rowcount} = 2; $form->{debit} = 0; @@ -136,12 +126,6 @@ sub prepare_transaction { GL->transaction(\%myconfig, \%$form); - map { - $tax .= - qq|$_->{taxdescription} | - . ($_->{rate} * 100) . qq| %| - } @{ $form->{TAX} }; - $form->{amount} = $form->format_amount(\%myconfig, $form->{amount}, 2); # departments @@ -715,19 +699,19 @@ sub update { $form->{"credit_$i"} = 0; $form->{"tax_$i"} = 0; $creditcount--; - $creditlock = 1; + $form->{creditlock} = 1; } if (($creditcount >= 2) && ($debitcount == 2)) { $form->{"debit_$i"} = 0; $form->{"tax_$i"} = 0; $debitcount--; - $debitlock = 1; + $form->{debitlock} = 1; } if (($creditcount == 1) && ($debitcount == 2)) { - $creditlock = 1; + $form->{creditlock} = 1; } if (($creditcount == 2) && ($debitcount == 1)) { - $debitlock = 1; + $form->{debitlock} = 1; } if ($debitcredit && $credittax) { $form->{"taxchart_$i"} = "0--0.00"; @@ -895,7 +879,7 @@ sub display_rows { . $cgi->hidden('-name' => "previous_accno_$i", '-default' => $selected_accno_full) . qq||; - $tax = qq|| . + my $tax_ddbox = qq|| . NTI($cgi->popup_menu('-name' => "taxchart_$i", '-id' => "taxchart_$i", '-style' => 'width:200px', @@ -953,9 +937,9 @@ sub display_rows { my $debitreadonly = ""; my $creditreadonly = ""; if ($i == $form->{rowcount}) { - if ($debitlock) { + if ($form->{debitlock}) { $debitreadonly = "readonly"; - } elsif ($creditlock) { + } elsif ($form->{creditlock}) { $creditreadonly = "readonly"; } } @@ -977,7 +961,7 @@ sub display_rows { $form->{"tax_$i"} - $tax|; + $tax_ddbox|; if ($form->{show_details}) { print qq| @@ -1491,19 +1475,19 @@ sub post_transaction { $form->{"credit_$i"} = 0; $form->{"tax_$i"} = 0; $creditcount--; - $creditlock = 1; + $form->{creditlock} = 1; } if (($creditcount >= 2) && ($debitcount == 2)) { $form->{"debit_$i"} = 0; $form->{"tax_$i"} = 0; $debitcount--; - $debitlock = 1; + $form->{debitlock} = 1; } if (($creditcount == 1) && ($debitcount == 2)) { - $creditlock = 1; + $form->{creditlock} = 1; } if (($creditcount == 2) && ($debitcount == 1)) { - $debitlock = 1; + $form->{debitlock} = 1; } if ($debitcredit && $credittax) { $form->{"taxchart_$i"} = "0--0.00"; @@ -1557,7 +1541,7 @@ sub post_transaction { for my $i (1 .. $form->{rowcount}) { my $dr = $form->{"debit_$i"}; my $cr = $form->{"credit_$i"}; - $tax = $form->{"tax_$i"}; + my $tax = $form->{"tax_$i"}; if ($dr && $cr) { $form->error($locale->text('Cannot post transaction with a debit and credit entry for the same account!')); }