Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6e594d28

Von Moritz Bunkus vor fast 8 Jahren hinzugefügt

Kreditorenbuchungen: nur zur Kontenkategorie passende Steuerschlüsselauswahl anbieten

Unterschiede anzeigen:

bin/mozilla/ap.pl
324 324
    $charts{$item->{accno}} = $item;
325 325
  }
326 326

  
327
  my %taxcharts = ();
328
  foreach my $item (@{ $form->{ALL_TAXCHARTS} }) {
329
    $taxcharts{$item->{id}} = $item;
330
  }
331

  
332 327
  my $follow_up_vc         =  $form->{vendor};
333 328
  $follow_up_vc            =~ s/--.*?//;
334 329
  my $follow_up_trans_info =  "$form->{invnumber} ($follow_up_vc)";
......
348 343
    my ($default_taxchart, $taxchart_to_use);
349 344
    my $amount_chart_id   = $form->{"AP_amount_chart_id_$i"} || $default_ap_amount_chart_id;
350 345
    my $chart_has_changed = $::form->{"previous_AP_amount_chart_id_$i"} && ($amount_chart_id != $::form->{"previous_AP_amount_chart_id_$i"});
346
    my @taxcharts         = GL->get_active_taxes_for_chart($amount_chart_id, $transdate);
351 347

  
352
    foreach my $item ( GL->get_active_taxes_for_chart($amount_chart_id, $transdate) ) {
348
    foreach my $item (@taxcharts) {
353 349
      my $key             = $item->id . "--" . $item->rate;
354 350
      $first_taxchart   //= $item;
355 351
      $default_taxchart   = $item if $item->{is_default};
......
360 356
    my $selected_taxchart            = $taxchart_to_use->id . '--' . $taxchart_to_use->rate;
361 357
    $form->{"selected_taxchart_$i"}  = $selected_taxchart;
362 358
    $form->{"AP_amount_chart_id_$i"} = $amount_chart_id;
359
    $form->{"taxcharts_$i"}          = \@taxcharts;
363 360
  }
364 361

  
365 362
  $form->{taxchart_value_title_sub} = sub {
templates/webpages/ap/form_header.html
202 202
            </td>
203 203
            <td>
204 204
              [% temp = 'selected_taxchart_'_ i %]
205
              [% L.select_tag('taxchart_'_ i, ALL_TAXCHARTS, value_title_sub = \taxchart_value_title_sub, default = $temp) %]
205
              [% taxcharts = 'taxcharts_' _ i %]
206
              [% L.select_tag('taxchart_'_ i, $taxcharts, value_title_sub = \taxchart_value_title_sub, default = $temp, style="width: 250px") %]
206 207
            </td>
207 208
            <td>
208 209
              [% temp = "project_id_"_ i %]

Auch abrufbar als: Unified diff