ZUGFeRD: Gesamtsteuer nach PTC-Strukturänderung richtig ermitteln
authorMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 30 Jun 2020 13:54:20 +0000 (15:54 +0200)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 30 Jun 2020 14:28:28 +0000 (16:28 +0200)
SL/DB/Helper/ZUGFeRD.pm

index 7ab425d..211e885 100644 (file)
@@ -325,7 +325,7 @@ sub _totals {
 
   $params{xml}->dataElement("ram:LineTotalAmount",     _r2($self->netamount));
   $params{xml}->dataElement("ram:TaxBasisTotalAmount", _r2($self->netamount));
-  $params{xml}->dataElement("ram:TaxTotalAmount",      _r2(sum(values %{ $params{ptc_data}->{taxes} })), currencyID => "EUR");
+  $params{xml}->dataElement("ram:TaxTotalAmount",      _r2(sum(values %{ $params{ptc_data}->{taxes_by_tax_id} })), currencyID => "EUR");
   $params{xml}->dataElement("ram:GrandTotalAmount",    _r2($self->amount));
   $params{xml}->dataElement("ram:TotalPrepaidAmount",  _r2($self->paid));
   $params{xml}->dataElement("ram:DuePayableAmount",    _r2($self->amount - $self->paid));