From e2365ee0f93db3a63191d09cb15c141703c08428 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Thu, 29 Aug 2024 11:19:09 +1000 Subject: [PATCH] Stubs for sending edocs --- app/Services/EDocument/Jobs/SendEDocument.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/app/Services/EDocument/Jobs/SendEDocument.php b/app/Services/EDocument/Jobs/SendEDocument.php index 687b47beb5ef..55550c1aa282 100644 --- a/app/Services/EDocument/Jobs/SendEDocument.php +++ b/app/Services/EDocument/Jobs/SendEDocument.php @@ -12,6 +12,8 @@ namespace App\Services\EDocument\Jobes; use App\Libraries\MultiDB; +use App\Models\Invoice; +use App\Utils\Ninja; use Illuminate\Bus\Queueable; use Illuminate\Queue\SerializesModels; use Illuminate\Queue\InteractsWithQueue; @@ -48,7 +50,18 @@ class SendEDocument implements ShouldQueue if($e_invoice_standard != 'PEPPOL') return; - + + if(Ninja::isSelfHost() && ($model instanceof Invoice) && $model->company->legal_entity_id) + { + //self hosted sender + } + + if(Ninja::isHosted() && ($model instanceof Invoice) && $model->company->legal_entity_id) + { + //hosted sender + } + + return; } public function failed($exception = null)