invoice->client->locale()); /* Set customized translations _NOW_ */ $t->replace(Ninja::transformTranslations($this->invoice->client->getMergedSettings())); $e_invoice_type = $this->invoice->client->getSetting('e_invoice_type'); switch ($e_invoice_type) { case "EN16931": case "XInvoice_3_0": case "XInvoice_2_3": case "XInvoice_2_2": case "XInvoice_2_1": case "XInvoice_2_0": case "XInvoice_1_0": case "XInvoice-Extended": case "XInvoice-BasicWL": case "XInvoice-Basic": $zugferd = (new ZugferdEInvoice($this->invoice))->run(); return $this->returnObject ? $zugferd->xrechnung : $zugferd->getXml(); case "Facturae_3.2": case "Facturae_3.2.1": case "Facturae_3.2.2": return (new FacturaEInvoice($this->invoice, str_replace("Facturae_", "", $e_invoice_type)))->run(); default: $zugferd = (new ZugferdEInvoice($this->invoice))->run(); return $this->returnObject ? $zugferd : $zugferd->getXml(); } } }