diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index 6e0e59b50597..c8c913feff9a 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -331,12 +331,19 @@ class InvoiceService $this->invoice->invitations->each(function ($invitation){ + try{ + Storage::disk(config('filesystems.default'))->delete($this->invoice->client->invoice_filepath($invitation) . $this->invoice->numberFormatter().'.pdf'); if(Ninja::isHosted()) { Storage::disk('public')->delete($this->invoice->client->invoice_filepath($invitation) . $this->invoice->numberFormatter().'.pdf'); } + }catch(\Exception $e){ + nlog($e->getMessage()); + } + + }); return $this;