Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5c95eda7

Von Jan Büren vor mehr als 4 Jahren hinzugefügt

  • ID 5c95eda791afeb2a2d5a0ff675fe5c5d9b4c69a0
  • Vorgänger 52b04172
  • Nachfolger 72911d5e

Kreditoren- Debitorenbuchung: Lieferdatum für die Steuer berücksichtigen

Unterschiede anzeigen:

bin/mozilla/ap.pl
468 468
  setup_ap_display_form_action_bar();
469 469

  
470 470
  $form->header();
471

  
472
  my $transdate = $::form->{transdate} ? DateTime->from_kivitendo($::form->{transdate}) : DateTime->today_local;
471
  # get the correct date for tax
472
  my $transdate    = $::form->{transdate}    ? DateTime->from_kivitendo($::form->{transdate})    : DateTime->today_local;
473
  my $deliverydate = $::form->{deliverydate} ? DateTime->from_kivitendo($::form->{deliverydate}) : undef;
474
  my $taxdate      = $deliverydate ? $deliverydate : $transdate;
475
  # helper for loop
473 476
  my $first_taxchart;
474 477

  
475 478
  for my $i (1 .. $form->{rowcount}) {
......
485 488
    }
486 489
    my $amount_chart_id = $form->{"AP_amount_chart_id_$i"} || $default_ap_amount_chart_id;
487 490

  
488
    my @taxcharts       = GL->get_active_taxes_for_chart($amount_chart_id, $transdate, $used_tax_id);
491
    my @taxcharts       = GL->get_active_taxes_for_chart($amount_chart_id, $taxdate, $used_tax_id);
489 492
    foreach my $item (@taxcharts) {
490 493
      my $key             = $item->id . "--" . $item->rate;
491 494
      $first_taxchart   //= $item;
bin/mozilla/ar.pl
412 412
  my $follow_up_trans_info =  "$form->{invnumber} ($follow_up_vc)";
413 413

  
414 414
  $::request->layout->add_javascripts("autocomplete_chart.js", "show_vc_details.js", "show_history.js", "follow_up.js", "kivi.Draft.js", "kivi.GL.js", "kivi.File.js", "kivi.RecordTemplate.js", "kivi.AR.js", "kivi.CustomerVendor.js", "kivi.Validator.js");
415

  
416
  my $transdate = $::form->{transdate} ? DateTime->from_kivitendo($::form->{transdate}) : DateTime->today_local;
415
  # get the correct date for tax
416
  my $transdate    = $::form->{transdate}    ? DateTime->from_kivitendo($::form->{transdate})    : DateTime->today_local;
417
  my $deliverydate = $::form->{deliverydate} ? DateTime->from_kivitendo($::form->{deliverydate}) : undef;
418
  my $taxdate      = $deliverydate ? $deliverydate : $transdate;
419
  # helpers for loop
417 420
  my $first_taxchart;
418

  
419 421
  my @transactions;
422

  
420 423
  for my $i (1 .. $form->{rowcount}) {
421 424
    my $transaction = {
422 425
      amount     => $form->{"amount_$i"},
......
431 434
    if ( $form->{"taxchart_$i"} ) {
432 435
      ($used_tax_id) = split(/--/, $form->{"taxchart_$i"});
433 436
    }
434
    foreach my $item ( GL->get_active_taxes_for_chart($amount_chart_id, $transdate, $used_tax_id) ) {
437
    foreach my $item ( GL->get_active_taxes_for_chart($amount_chart_id, $taxdate, $used_tax_id) ) {
435 438
      my $key             = $item->id . "--" . $item->rate;
436 439
      $first_taxchart   //= $item;
437 440
      $default_taxchart   = $item if $item->{is_default};

Auch abrufbar als: Unified diff