Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision f1c1921d

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID f1c1921d65bf08dc5e31bad92cb078e9e10d98fe
  • Vorgänger ee4b3441
  • Nachfolger 0fee52dd

Debitorenrechnungen: Beim Erstellen einer neuen Debitorenrechnung das richtige Steuerkonto für die erste Zeile auswählen, auch wenn das ausgewählte Konto nicht das erste Konto in der Liste ist.

Unterschiede anzeigen:

SL/IS.pm
1844 1844

  
1845 1845
  # setup last accounts used for this customer
1846 1846
  if (!$form->{id} && $form->{type} !~ /_(order|quotation)/) {
1847
    $query = qq|SELECT c.accno, c.description, c.link, c.category
1847
    $query = qq|SELECT c.id, c.accno, c.description, c.link, c.category
1848 1848
                FROM chart c
1849 1849
		JOIN acc_trans ac ON (ac.chart_id = c.id)
1850 1850
		JOIN ar a ON (a.id = ac.trans_id)
......
1860 1860
      if ($ref->{category} eq 'I') {
1861 1861
        $i++;
1862 1862
        $form->{"AR_amount_$i"} = "$ref->{accno}--$ref->{description}";
1863

  
1864
        if ($form->{initial_transdate}) {
1865
          my $tax_query =
1866
            qq|SELECT tk.tax_id, t.rate FROM taxkeys tk | .
1867
            qq|LEFT JOIN tax t ON tk.tax_id = t.id | .
1868
            qq|WHERE tk.chart_id = ? AND startdate <= ? | .
1869
            qq|ORDER BY tk.startdate DESC LIMIT 1|;
1870
          my ($tax_id, $rate) =
1871
            selectrow_query($form, $dbh, $tax_query, $ref->{id},
1872
                            $form->{initial_transdate});
1873
          $form->{"taxchart_$i"} = "${tax_id}--${rate}";
1874
        }
1863 1875
      }
1864 1876
      if ($ref->{category} eq 'A') {
1865 1877
        $form->{ARselected} = $form->{AR_1} = $ref->{accno};
bin/mozilla/ar.pl
89 89
    "$form->{script}?action=add&path=$form->{path}&login=$form->{login}&password=$form->{password}"
90 90
    unless $form->{callback};
91 91

  
92
  &create_links;
93 92
  AR->get_transdate(\%myconfig, $form);
93
  $form->{initial_transdate} = $form->{transdate};
94
  &create_links;
95
  $form->{transdate} = $form->{initial_transdate};
94 96
  &display_form;
95 97
  $lxdebug->leave_sub();
96 98
}
......
257 259
    }
258 260
  }
259 261

  
260
  $lxdebug->message(0, "1 ARselected $form->{ARselected}");
261

  
262 262
  $form->{taxincluded}  = $taxincluded if ($form->{id});
263 263
  $form->{paidaccounts} = 1            if not defined $form->{paidaccounts};
264 264

  
......
627 627
    if ($previous_accno &&
628 628
        ($previous_accno eq $selected_accno) &&
629 629
        ($previous_tax_id ne $selected_tax_id)) {
630
      $lxdebug->message(0, "yeah");
631 630
      my $item = $taxcharts{$selected_tax_id};
632 631
      $selected_taxchart = "$item->{id}--$item->{rate}";
633 632
    }
bin/mozilla/gl.pl
1127 1127
    if ($previous_accno &&
1128 1128
        ($previous_accno eq $selected_accno) &&
1129 1129
        ($previous_tax_id ne $selected_tax_id)) {
1130
      $lxdebug->message(0, "yeah");
1131 1130
      my $item = $taxcharts{$selected_tax_id};
1132 1131
      $selected_taxchart = "$item->{id}--$item->{rate}";
1133 1132
    }

Auch abrufbar als: Unified diff