tax_id in acc_trans
[kivitendo-erp.git] / SL / DB / Helper / PriceTaxCalculator.pm
index 8bd0359..0801299 100644 (file)
@@ -119,7 +119,7 @@ sub _calculate_item {
   $self->netamount($self->netamount + $sellprice * $item->qty / $item->price_factor);
 
   my $chart = $item->part->get_chart(type => $data->{is_sales} ? 'income' : 'expense', taxzone => $self->taxzone_id);
-  $data->{amounts}->{ $chart->id }           ||= { taxkey => $taxkey->taxkey_id, amount => 0 };
+  $data->{amounts}->{ $chart->id }           ||= { taxkey => $taxkey->taxkey_id, tax_id => $taxkey->tax_id, amount => 0 };
   $data->{amounts}->{ $chart->id }->{amount}  += $linetotal;
 
   push @{ $data->{assembly_items} }, [];