X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FDB%2FHelper%2FPriceTaxCalculator.pm;h=15850d558946b1bb748f4a6d14bb5af333f9cba8;hb=2851ec9a444d93086dc5356122b7143711d955c0;hp=f5bc61c4a78b06887ab9b4615837d0bb4e43d51f;hpb=d04f241a1cc93b3917f375731fdc0bef608beeb7;p=kivitendo-erp.git diff --git a/SL/DB/Helper/PriceTaxCalculator.pm b/SL/DB/Helper/PriceTaxCalculator.pm index f5bc61c4a..15850d558 100644 --- a/SL/DB/Helper/PriceTaxCalculator.pm +++ b/SL/DB/Helper/PriceTaxCalculator.pm @@ -54,7 +54,7 @@ sub calculate_prices_and_taxes { $self->netamount( 0); $self->marge_total(0); - SL::DB::Manager::Chart->cache_taxkeys(date => $self->deliverydate // $self->transdate); + SL::DB::Manager::Chart->cache_taxkeys(date => $self->effective_tax_point); my $idx = 0; foreach my $item (@{ $self->items_sorted }) { @@ -110,7 +110,7 @@ sub _calculate_item { $data->{invoicediff} += $sellprice * (1 - $item->discount) * $item->qty * $data->{exchangerate} / $item->price_factor - $linetotal if $self->taxincluded; - my $taxkey = $part->get_taxkey(date => $self->deliverydate // $self->transdate, is_sales => $data->{is_sales}, taxzone => $self->taxzone_id); + my $taxkey = $part->get_taxkey(date => $self->effective_tax_point, is_sales => $data->{is_sales}, taxzone => $self->taxzone_id); my $tax_rate = $taxkey->tax->rate; my $tax_amount = undef;