From b3089c09460c250bfab75cf84c34f4ea958dc2e1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Wed, 24 Jun 2020 16:52:20 +0200 Subject: [PATCH] ZUGFeRD: Steuerwerte pro Steuer, nicht pro Steuerkonto ausweisen --- SL/DB/Helper/ZUGFeRD.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SL/DB/Helper/ZUGFeRD.pm b/SL/DB/Helper/ZUGFeRD.pm index 99e08256e..7ab425d48 100644 --- a/SL/DB/Helper/ZUGFeRD.pm +++ b/SL/DB/Helper/ZUGFeRD.pm @@ -214,7 +214,6 @@ sub _taxes { $info->{taxkey} //= SL::DB::TaxKey->load_cached($item->{taxkey_id}); $info->{tax} //= SL::DB::Tax->load_cached($info->{taxkey}->tax_id); $info->{linetotal} += $item->{linetotal}; - $info->{tax_amount} += $item->{tax_amount}; } foreach my $taxkey_id (sort keys %taxkey_info) { @@ -223,7 +222,7 @@ sub _taxes { # $params{xml}->startTag("ram:ApplicableTradeTax"); - $params{xml}->dataElement("ram:CalculatedAmount", _r2($params{ptc_data}->{taxes}->{$info->{tax}->{chart_id}})); + $params{xml}->dataElement("ram:CalculatedAmount", _r2($params{ptc_data}->{taxes_by_tax_id}->{$info->{taxkey}->tax_id})); $params{xml}->dataElement("ram:TypeCode", "VAT"); $params{xml}->dataElement("ram:BasisAmount", _r2($info->{linetotal})); $params{xml}->dataElement("ram:CategoryCode", $tax_info{code}); -- 2.20.1