From edf33ed19e9c1d6cf6ca90cccfd11502b7060a48 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 25 May 2023 13:48:17 +1000 Subject: [PATCH] Enable make directory for e-invoices --- app/Services/Invoice/EInvoice/FacturaEInvoice.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/Services/Invoice/EInvoice/FacturaEInvoice.php b/app/Services/Invoice/EInvoice/FacturaEInvoice.php index ffb9622b2670..d2eb6ebf8ee1 100644 --- a/app/Services/Invoice/EInvoice/FacturaEInvoice.php +++ b/app/Services/Invoice/EInvoice/FacturaEInvoice.php @@ -171,12 +171,11 @@ class FacturaEInvoice extends AbstractService ->setPoNumber() ->signDocument(); - $disk = config('filesystems.default'); - // if (!Storage::disk($disk)->exists($this->invoice->client->e_invoice_filepath($this->invoice->invitations->first()))) { - // Storage::makeDirectory($this->invoice->client->e_invoice_filepath($this->invoice->invitations->first())); - // } + if (!Storage::disk($disk)->exists($this->invoice->client->e_invoice_filepath($this->invoice->invitations->first()))) { + Storage::makeDirectory($this->invoice->client->e_invoice_filepath($this->invoice->invitations->first())); + } $this->fac->export(Storage::disk($disk)->path($this->invoice->client->e_invoice_filepath($this->invoice->invitations->first()) . $this->invoice->getFileName("xsig")));