invoiceUtil = $invoiceUtil; } public function getFilename(): string { return $this->order->replacePlaceholders(translate_shop('invoice_filename', 'attachments')); } public function getContent() { if ($invoiceNumber = $this->order->getData('sapInvoiceNumber')) { return $this->invoiceUtil->getInvoicePDFContent($invoiceNumber, $this->order->getLanguage()); } throw new InvoiceException("Nelze vytisknout SAP fakturu - objednávka (ID {$this->order->id}) ještě nebyla fakturována (chybí idoc)."); } }