X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=bin%2Fmozilla%2Fgl.pl;h=aebcd82bb11188de0e9da62f0cc354870297c187;hb=bc6ceee13bf7a4b81efd6295ce56a4ccffb1d4db;hp=ea47e2a1ceeabeebe0f9c412ef24a6ca240b37a2;hpb=ac8a1c94847373ed0084849719d82ebce90a4d6b;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index ea47e2a1c..aebcd82bb 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"}; @@ -620,15 +620,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 +658,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 +700,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 +719,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 +780,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; @@ -1041,24 +1044,25 @@ sub display_rows { for $i (1 .. $form->{rowcount}) { $source = qq| - |; $memo = qq| - |; if ($init) { $accno = qq| - $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 +1143,11 @@ sub display_rows { $tax = qq| $taxchart|; -# if ($form->{selectprojectnumber}) { -# $project = qq| -# $form->{selectprojectnumber}|; -# } + + # if ($form->{selectprojectnumber}) { + # $project = qq| + # $form->{selectprojectnumber}|; + # } $korrektur = qq| $accno $fx_transaction - - - $korrektur $tax @@ -1182,9 +1188,10 @@ sub display_rows { } $form->hide_form(qw(rowcount selectaccno)); -# print qq| -# |; + + # print qq| + # |; $lxdebug->leave_sub(); } @@ -1205,7 +1212,7 @@ sub form_header {