X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fgl.pl;h=185e2a5878dae3bb1ac58ed8ba54c552a0b41f64;hb=bfa7bf60b133969eb754d4506485c7132711f43f;hp=0f34f1b94ff387f1d891996915acaf4b37561182;hpb=34366eda748e1198b8b2ead0c3fffd8edba9f23d;p=kivitendo-erp.git diff --git a/bin/mozilla/gl.pl b/bin/mozilla/gl.pl index 0f34f1b94..185e2a587 100644 --- a/bin/mozilla/gl.pl +++ b/bin/mozilla/gl.pl @@ -793,7 +793,7 @@ sub display_rows { my $taxchart_init; foreach my $item (@{ $form->{ALL_CHARTS} }) { my $key = $item->{accno} . "--" . $item->{tax_id}; - $taxchart_init = $item->{taxkey_id} unless (@chart_values); + $taxchart_init = $item->{tax_id} unless (@chart_values); push(@chart_values, $key); $chart_labels{$key} = $item->{accno} . "--" . $item->{description}; $charts{$item->{accno}} = $item; @@ -804,7 +804,7 @@ sub display_rows { my %taxcharts = (); foreach my $item (@{ $form->{ALL_TAXCHARTS} }) { my $key = $item->{id} . "--" . $item->{rate}; - $taxchart_init = $key if ($taxchart_init eq $item->{taxkey}); + $taxchart_init = $key if ($taxchart_init == $item->{id}); push(@taxchart_values, $key); $taxchart_labels{$key} = $item->{taxdescription} . " " . $item->{rate} * 100 . ' %'; $taxcharts{$item->{id}} = $item; @@ -839,13 +839,13 @@ sub display_rows { $selected_taxchart = "$item->{id}--$item->{rate}"; } - $selected_accno = '' if ($init); - $selected_taxchart = $taxchart_init unless ($selected_taxchart ne ""); + $selected_accno = '' if ($init); + $selected_taxchart ||= $taxchart_init; $accno = qq|| . NTI($cgi->popup_menu('-name' => "accno_$i", '-id' => "accno_$i", - '-onChange' => "setTaxkey(this, $i)", + '-onChange' => "setTaxkey($i)", '-style' => 'width:200px', '-values' => \@chart_values, '-labels' => \%chart_labels, @@ -990,7 +990,8 @@ sub form_header { $form->{javascript} = qq|