X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=0f34f1b94ff387f1d891996915acaf4b37561182;hb=41b2e935fb1e406b4015ac3a83df6062d74f6131;hp=15b49d2e1968df40ac66fbeb1ea4eaae8a032dfa;hpb=70682e3d00c4962eb1cb851ca31514b354964bfe;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 15b49d2e1..0f34f1b94 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -507,7 +507,7 @@ sub generate_report { map { $column_defs{$_}->{visible} = 0 } qw(debit_accno credit_accno debit_tax_accno credit_tax_accno) if $form->{accno}; my %column_alignment; - map { $column_alignment{$_} = 'right' } qw(balance id debit credit debit_tax credit_tax); + map { $column_alignment{$_} = 'right' } qw(balance id debit credit debit_tax credit_tax balance); map { $column_alignment{$_} = 'center' } qw(transdate reference description source notes debit_accno credit_accno debit_tax_accno credit_tax_accno); map { $column_defs{$_}->{align} = $column_alignment{$_} } keys %column_alignment; @@ -566,10 +566,10 @@ sub generate_report { my $sh = ""; if ($form->{balance} < 0) { - $sh = "(S)"; + $sh = " S"; $ml = -1; } elsif ($form->{balance} > 0) { - $sh = "(H)"; + $sh = " H"; $ml = 1; } my $data = $form->format_amount(\%myconfig, ($form->{balance} * $ml), 2); @@ -612,10 +612,10 @@ sub generate_report { my $sh = ""; if ($form->{balance} < 0) { - $sh = "(S)"; + $sh = " S"; $ml = -1; } elsif ($form->{balance} > 0) { - $sh = "(H)"; + $sh = " H"; $ml = 1; } my $data = $form->format_amount(\%myconfig, ($form->{balance} * $ml), 2); @@ -780,17 +780,6 @@ sub display_rows { $form->{totaldebit} = 0; $form->{totalcredit} = 0; - my @old_project_ids = (); - map({ push(@old_project_ids, $form->{"project_id_$_"}) - if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"})); - - $form->get_lists("projects" => { "key" => "ALL_PROJECTS", - "all" => 0, - "old_id" => \@old_project_ids }, - "charts" => { "key" => "ALL_CHARTS", - "transdate" => $form->{transdate} }, - "taxcharts" => "ALL_TAXCHARTS"); - my %project_labels = (); my @project_values = (""); foreach my $item (@{ $form->{"ALL_PROJECTS"} }) { @@ -822,7 +811,6 @@ sub display_rows { } for $i (1 .. $form->{rowcount}) { - if ($form->{show_details}) { $source = qq| |; @@ -939,6 +927,7 @@ sub display_rows { print qq| $accno +   $fx_transaction @@ -971,6 +960,19 @@ sub form_header { $auth->assert('general_ledger'); + my @old_project_ids = (); + map({ push(@old_project_ids, $form->{"project_id_$_"}) + if ($form->{"project_id_$_"}); } (1..$form->{"rowcount"})); + + $form->get_lists("projects" => { "key" => "ALL_PROJECTS", + "all" => 0, + "old_id" => \@old_project_ids }, + "charts" => { "key" => "ALL_CHARTS", + "transdate" => $form->{transdate} }, + "taxcharts" => "ALL_TAXCHARTS"); + + GL->get_chart_balances('charts' => $form->{ALL_CHARTS}); + $title = $form->{title}; $form->{title} = $locale->text("$title General Ledger Transaction"); $readonly = ($form->{id}) ? "readonly" : ""; @@ -1008,10 +1010,11 @@ sub form_header { var txt = document.getElementsByName('debit_1')[0].value; document.getElementsByName('credit_2')[0].value = txt; }; - //--> - |; - $form->{javascript} .= qq||; + + + +|; $form->{selectdepartment} =~ s/ selected//; $form->{selectdepartment} =~ @@ -1069,6 +1072,8 @@ sub form_header { $form->{previous_id} ||= "--"; $form->{previous_gldate} ||= "--"; + $jsscript .= $form->parse_html_template('gl/form_header_chart_balances_js'); + $form->header; print qq| @@ -1194,6 +1199,7 @@ sub form_header { | . $locale->text('Account') . qq| + | . $locale->text('Chart balance') . qq| | . $locale->text('Debit') . qq| | @@ -1246,8 +1252,7 @@ sub form_footer { print qq| - - $form->{totaldebit} + $form->{totaldebit} $form->{totalcredit}