foreach ($taxes as $tax) { $taxNet +=
$tax->
getNetPrice();
$this->_tax
[number_format($tax->
getTaxRate(), 2
)] +=
$tax->
getTax();
} $this->_amountNetto +=
$taxNet;
} else { $this->_amountNetto
+= ($this->_order
['invoice_shipping'
] /
(100 +
$taxShipping) * 100
);
if (!
empty($taxShipping) && !
empty($this->_order
['invoice_shipping'
])) { $shippingTax =
Shopware()->
Container()->
get(TaxAggregatorInterface::
class)->
shippingCostsTaxSum([ CheckoutKey::SHIPPING_COSTS_TAX =>
(float) $this->_order
['invoice_shipping_tax_rate'
],
CheckoutKey::SHIPPING_COSTS_NET =>
(float) $this->_order
['invoice_shipping_net'
],
CheckoutKey::SHIPPING_COSTS_WITH_TAX =>
(float) $this->_order
['invoice_shipping'
],
]);
if ($shippingTax !== null
) { foreach ($shippingTax as $key =>
$val) { if (isset($this->_tax
[$key])) { $this->_tax
[$key] +=
$val;
} else { $this->_tax
[$key] =
$val;
}