X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=bin%2Fmozilla%2Fgl.pl;h=2668083bb3422b45a948640f0ad72be01747883a;hb=75edb8e6c9900ae7a8af8eb644cf064532acc9ea;hp=ed8aadca3cc676aa7c6b72019dea715d49c4462b;hpb=f3edd66d124fbbb15e062be399f2600f66fae478;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index ed8aadca3..2668083bb 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -82,11 +82,11 @@ sub add { map { $chart .= - "{accno}--$_->{taxkey_id}\">$_->{accno}--$_->{description}" + "{accno}--$_->{tax_id}\">$_->{accno}--$_->{description}" } @{ $form->{chart} }; map { $tax .= - qq|$_->{taxdescription} | + qq|$_->{taxdescription} | . ($_->{rate} * 100) . qq| %| } @{ $form->{TAX} }; @@ -124,12 +124,12 @@ sub edit { GL->transaction(\%myconfig, \%$form); map { $chart .= - "{accno}--$_->{taxkey_id}\">$_->{accno}--$_->{description}" + "{accno}--$_->{tax_id}\">$_->{accno}--$_->{description}" } @{ $form->{chart} }; map { $tax .= - qq|$_->{taxdescription} | + qq|$_->{taxdescription} | . ($_->{rate} * 100) . qq| %| } @{ $form->{TAX} }; @@ -159,7 +159,7 @@ sub edit { $j = $i - 1; if ($tax && ($ref->{accno} eq $taxaccno)) { $form->{"tax_$j"} = abs($ref->{amount}); - $form->{"taxchart_$j"} = $ref->{taxkey} . "--" . $ref->{taxrate}; + $form->{"taxchart_$j"} = $ref->{id} . "--" . $ref->{taxrate}; if ($form->{taxincluded}) { if ($ref->{amount} < 0) { $form->{"debit_$j"} += $form->{"tax_$j"}; @@ -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 @@ -620,15 +621,17 @@ sub generate_report { |; } - $form->{balance} *= $ml; + $form->{balance} *= $ml; foreach $ref (@{ $form->{GL} }) { $form->{balance} *= $ml; + # if item ne sort print subtotal if ($form->{l_subtotal} eq 'Y') { if ($sameitem ne $ref->{ $form->{sort} }) { &gl_subtotal; } } + #foreach $key (sort keys(%{ $ref->{amount} })) { # $form->{balance} += $ref->{amount}{$key}; #} @@ -656,7 +659,7 @@ sub generate_report { $credit .= "" . $form->format_amount(\%myconfig, $ref->{credit}{$key}, 2, 0); } - $form->{balance} = abs($form->{balance}) - abs( $ref->{credit}{$key}); + $form->{balance} = abs($form->{balance}) - abs($ref->{credit}{$key}); } $debittax = ""; @@ -698,9 +701,10 @@ sub generate_report { $debitaccno .= "{debit_accno}{$key}&callback=$callback>$ref->{debit_accno}{$key}"; } -# if ($ref->{debit_taxkey}{$key} eq $debittaxkey) { -# $ref->{debit_tax_accno}{$key} = $taxaccno; -# } + + # if ($ref->{debit_taxkey}{$key} eq $debittaxkey) { + # $ref->{debit_tax_accno}{$key} = $taxaccno; + # } $taxaccno = $ref->{debit_tax_accno}{$key}; $debittaxkey = $ref->{debit_taxkey}{$key}; } @@ -716,9 +720,10 @@ sub generate_report { $creditaccno .= "{credit_accno}{$key}&callback=$callback>$ref->{credit_accno}{$key}"; } -# if ($ref->{credit_taxkey}{$key} eq $credittaxkey) { -# $ref->{credit_tax_accno}{$key} = $taxaccno; -# } + + # if ($ref->{credit_taxkey}{$key} eq $credittaxkey) { + # $ref->{credit_tax_accno}{$key} = $taxaccno; + # } $taxaccno = $ref->{credit_tax_accno}{$key}; $credittaxkey = $ref->{credit_taxkey}{$key}; } @@ -776,9 +781,8 @@ sub generate_report { $column_data{gifi_accno} = "{gifi_accno}&callback=$callback>$ref->{gifi_accno} "; $column_data{balance} = - "" - . $form->format_amount(\%myconfig, $form->{balance}, 2, 0) - . ""; + "" + . $form->format_amount(\%myconfig, $form->{balance}, 2, 0) . ""; $i++; $i %= 2; @@ -965,7 +969,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"}) { @@ -1052,13 +1056,14 @@ sub display_rows { $form->{chartinit}|; $tax = - qq|$form->{taxchart}|; -# if ($form->{selectprojectnumber}) { -# $project = qq| -# $form->{selectprojectnumber}|; -# } + + # if ($form->{selectprojectnumber}) { + # $project = qq| + # $form->{selectprojectnumber}|; + # } $korrektur = qq|$accno|; $tax = $taxchart; $tax_selected = $form->{"taxchart_$i"}; + print(STDERR "TAX_SELCTED $tax_selected\n"); $tax =~ s/value=\"$tax_selected\"/value=\"$tax_selected\" selected/; $tax = qq|$tax|; -# if ($form->{selectprojectnumber}) { -# $form->{"projectnumber_$i"} = "" -# if $form->{selectprojectnumber} !~ /$form->{"projectnumber_$i"}/; -# -# $project = $form->{"projectnumber_$i"}; -# $project =~ s/--.*//; -# $project = qq|$project|; -# } + # if ($form->{selectprojectnumber}) { + # $form->{"projectnumber_$i"} = "" + # if $form->{selectprojectnumber} !~ /$form->{"projectnumber_$i"}/; + # + # $project = $form->{"projectnumber_$i"}; + # $project =~ s/--.*//; + # $project = qq|$project|; + # } if ($form->{transfer}) { $checked = ($form->{"fx_transaction_$i"}) ? "1" : ""; @@ -1138,10 +1144,11 @@ sub display_rows { $tax = qq| $taxchart|; -# if ($form->{selectprojectnumber}) { -# $project = qq| -# $form->{selectprojectnumber}|; -# } + + # if ($form->{selectprojectnumber}) { + # $project = qq| + # $form->{selectprojectnumber}|; + # } $korrektur = qq|hide_form(qw(rowcount selectaccno)); -# print qq| -# |; + + # print qq| + # |; $lxdebug->leave_sub(); } @@ -1205,7 +1213,7 @@ sub form_header {