Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2cbbdcc8

Von Moritz Bunkus vor mehr als 13 Jahren hinzugefügt

Nur dann steuern aufsummieren, wenn ein Steuerbetrag da ist und ein Steuerkonto (z.B. nicht bei "EU mit UStID")

Unterschiede anzeigen:

SL/DB/Helper/PriceTaxCalculator.pm
109 109
    $tax_amount = $linetotal * $tax_rate;
110 110
  }
111 111

  
112
  $data->{taxes}->{ $taxkey->tax->chart_id } ||= 0;
113
  $data->{taxes}->{ $taxkey->tax->chart_id }  += $tax_amount;
112
  if ($taxkey->tax->chart_id) {
113
    $data->{taxes}->{ $taxkey->tax->chart_id } ||= 0;
114
    $data->{taxes}->{ $taxkey->tax->chart_id }  += $tax_amount;
115
  } elsif ($tax_amount) {
116
    die "tax_amount != 0 but no chart_id for taxkey " . $taxkey->id . " tax " . $taxkey->tax->id;
117
  }
114 118

  
115 119
  $self->netamount($self->netamount + $sellprice * $item->qty / $item->price_factor);
116 120

  

Auch abrufbar als: Unified diff