Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3a368351

Von G. Richardson vor mehr als 4 Jahren hinzugefügt

  • ID 3a3683515f26794fa3bff9f670c437bbdab6bb86
  • Vorgänger 36666afc
  • Nachfolger 51cbfc64

Lieferdatum in Dialogbuchung - Steuer anhand von Datum

Unterschiede anzeigen:

bin/mozilla/gl.pl
802 802
  my %charts_by_id  = map { ($_->{id} => $_) } @{ $::form->{ALL_CHARTS} };
803 803
  my $default_chart = $::form->{ALL_CHARTS}[0];
804 804
  my $transdate     = $::form->{transdate} ? DateTime->from_kivitendo($::form->{transdate}) : DateTime->today_local;
805
  my $deliverydate  = $::form->{deliverydate} ? DateTime->from_kivitendo($::form->{deliverydate}) : undef;
805 806

  
806 807
  my ($source, $memo, $source_hidden, $memo_hidden);
807 808
  for my $i (1 .. $form->{rowcount}) {
......
825 826
    $accno_id    = $chart->{id};
826 827
    my ($first_taxchart, $default_taxchart, $taxchart_to_use);
827 828

  
828
    foreach my $item ( GL->get_active_taxes_for_chart($accno_id, $transdate) ) {
829

  
830
    my $taxdate = $deliverydate ? $deliverydate : $transdate;
831
    foreach my $item ( GL->get_active_taxes_for_chart($accno_id, $taxdate) ) {
829 832
      my $key             = $item->id . "--" . $item->rate;
830 833
      $first_taxchart   //= $item;
831 834
      $default_taxchart   = $item if $item->{is_default};
......
1482 1485
}
1483 1486

  
1484 1487
sub get_tax_dropdown {
1485
  my $transdate    = $::form->{transdate} ? DateTime->from_kivitendo($::form->{transdate}) : DateTime->today_local;
1486
  my @tax_accounts = GL->get_active_taxes_for_chart($::form->{accno_id}, $transdate);
1488
  my $transdate    = $::form->{transdate}    ? DateTime->from_kivitendo($::form->{transdate}) : DateTime->today_local;
1489
  my $deliverydate = $::form->{deliverydate} ? DateTime->from_kivitendo($::form->{deliverydate}) : undef;
1490
  my @tax_accounts = GL->get_active_taxes_for_chart($::form->{accno_id}, $deliverydate // $transdate);
1487 1491
  my $html         = $::form->parse_html_template("gl/update_tax_accounts", { TAX_ACCOUNTS => \@tax_accounts });
1488 1492

  
1489 1493
  print $::form->ajax_response_header, $html;

Auch abrufbar als: Unified diff