Minor fixes for e invoices

This commit is contained in:
David Bomba 2023-04-19 11:11:04 +10:00
parent bf0f47aa02
commit 35d84496ef

View File

@ -159,7 +159,7 @@ class CreateXInvoice implements ShouldQueue
$xrechnung->addDocumentTax($this->getTaxType("", $invoice), "VAT", $item["total"] / (explode("%", end($tax))[0] / 100), $item["total"], explode("%", end($tax))[0]); $xrechnung->addDocumentTax($this->getTaxType("", $invoice), "VAT", $item["total"] / (explode("%", end($tax))[0] / 100), $item["total"], explode("%", end($tax))[0]);
// TODO: Add correct tax type within getTaxType // TODO: Add correct tax type within getTaxType
} }
if (!empty($globaltax)){ if (!empty($globaltax && isset($invoicing_data->getTotalTaxMap()[$globaltax]["name"]))){
$tax = explode(" ", $invoicing_data->getTotalTaxMap()[$globaltax]["name"]); $tax = explode(" ", $invoicing_data->getTotalTaxMap()[$globaltax]["name"]);
$xrechnung->addDocumentTax($this->getTaxType("", $invoice), "VAT", $invoicing_data->getTotalTaxMap()[$globaltax]["total"] / (explode("%", end($tax))[0] / 100), $invoicing_data->getTotalTaxMap()[$globaltax]["total"], explode("%", end($tax))[0]); $xrechnung->addDocumentTax($this->getTaxType("", $invoice), "VAT", $invoicing_data->getTotalTaxMap()[$globaltax]["total"] / (explode("%", end($tax))[0] / 100), $invoicing_data->getTotalTaxMap()[$globaltax]["total"], explode("%", end($tax))[0]);
// TODO: Add correct tax type within getTaxType // TODO: Add correct tax type within getTaxType