global $::cgi in bin/mozilla/login.pl entfernt
[kivitendo-erp.git] / bin / mozilla / gl.pl
index 0838a36..8623153 100644 (file)
@@ -415,7 +415,7 @@ sub generate_report {
   my $ml = ($form->{ml} =~ /(A|E|Q)/) ? -1 : 1;
 
   my @columns = qw(
-    gldate         transdate        id             reference      description
+    transdate      gldate   id      reference      description
     notes          source   doccnt  debit          debit_accno
     credit         credit_accno     debit_tax      debit_tax_accno
     credit_tax     credit_tax_accno projectnumbers balance employee
@@ -434,7 +434,7 @@ sub generate_report {
   push @options,      $locale->text('Description') . " : $form->{description}"                        if ($form->{description});
   push @options,      $locale->text('Notes')       . " : $form->{notes}"                              if ($form->{notes});
   push @options,      $locale->text('Employee')    . " : $employee"                                   if $employee;
-  my $datesorttext = $form->{datesort} eq 'transdate' ? $locale->text('Invoice Date') :  $locale->text('Booking Date');
+  my $datesorttext = $form->{datesort} eq 'transdate' ? $locale->text('Transdate') :  $locale->text('Gldate');
   push @date_options,      "$datesorttext"                              if ($form->{datesort} and ($form->{datefrom} or $form->{dateto}));
   push @date_options, $locale->text('From'), $locale->date(\%myconfig, $form->{datefrom}, 1)          if ($form->{datefrom});
   push @date_options, $locale->text('Bis'),  $locale->date(\%myconfig, $form->{dateto},   1)          if ($form->{dateto});
@@ -460,8 +460,8 @@ sub generate_report {
 
   my %column_defs = (
     'id'               => { 'text' => $locale->text('ID'), },
-    'transdate'        => { 'text' => $locale->text('Invoice Date'), },
-    'gldate'           => { 'text' => $locale->text('Booking Date'), },
+    'transdate'        => { 'text' => $locale->text('Transdate'), },
+    'gldate'           => { 'text' => $locale->text('Gldate'), },
     'reference'        => { 'text' => $locale->text('Reference'), },
     'source'           => { 'text' => $locale->text('Source'), },
     'doccnt'           => { 'text' => $locale->text('Document Count'), },
@@ -816,10 +816,9 @@ sub display_rows {
     my %taxchart_labels = ();
     my @taxchart_values = ();
 
-    my $accno_id          = $::form->{"accno_id_$i"};
-    my $chart             = $charts_by_id{$accno_id} // $default_chart;
-    $accno_id             = $chart->{id};
-    my $chart_has_changed = $::form->{"previous_accno_id_$i"} && ($accno_id != $::form->{"previous_accno_id_$i"});
+    my $accno_id = $::form->{"accno_id_$i"};
+    my $chart    = $charts_by_id{$accno_id} // $default_chart;
+    $accno_id    = $chart->{id};
     my ($first_taxchart, $default_taxchart, $taxchart_to_use);
 
     foreach my $item ( GL->get_active_taxes_for_chart($accno_id, $transdate) ) {
@@ -832,7 +831,7 @@ sub display_rows {
       $taxchart_labels{$key} = $item->taxdescription . " " . $item->rate * 100 . ' %';
     }
 
-    $taxchart_to_use      = $default_taxchart // $first_taxchart if $chart_has_changed || !$taxchart_to_use;
+    $taxchart_to_use    //= $default_taxchart // $first_taxchart;
     my $selected_taxchart = $taxchart_to_use->id . '--' . $taxchart_to_use->rate;
 
     my $accno = qq|<td>| .