diff --git a/app/Jobs/Invoice/PrintEntityBatch.php b/app/Jobs/Invoice/PrintEntityBatch.php index 0329997409..8258717985 100644 --- a/app/Jobs/Invoice/PrintEntityBatch.php +++ b/app/Jobs/Invoice/PrintEntityBatch.php @@ -70,7 +70,7 @@ class PrintEntityBatch implements ShouldQueue })->catch(function (Batch $batch, Throwable $e) { // First batch job failure detected... - // nlog("PrintEntityBatch failed: {$e->getMessage()}"); + nlog("PrintEntityBatch failed: {$e->getMessage()}"); })->finally(function (Batch $batch) { // The batch has finished executing... // nlog("I have finished"); diff --git a/app/Services/EDocument/Standards/ZugferdEDocument.php b/app/Services/EDocument/Standards/ZugferdEDocument.php index 3d904f3ec6..f3743f457e 100644 --- a/app/Services/EDocument/Standards/ZugferdEDocument.php +++ b/app/Services/EDocument/Standards/ZugferdEDocument.php @@ -257,7 +257,11 @@ class ZugferdEDocument extends AbstractService $br = new \App\DataMapper\Tax\BaseRule(); $eu_states = $br->eu_country_codes; - $item = $this->document->line_items[0]; + $item = $this->document->line_items[0] ?? null; + + if(is_null($item)){ + return $this; + } if (!in_array($this->document->client->country->iso_3166_2, $eu_states)) { $this->tax_code = ZugferdDutyTaxFeeCategories::FREE_EXPORT_ITEM_TAX_NOT_CHARGED;