From ba40fc54ba24cd622b36f531779721d1bb9aa409 Mon Sep 17 00:00:00 2001 From: karneaud Date: Thu, 8 Aug 2024 12:54:23 -0400 Subject: [PATCH] adjust for multiple entities --- app/Jobs/Import/QuickbooksIngest.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Import/QuickbooksIngest.php b/app/Jobs/Import/QuickbooksIngest.php index 18889b0d8908..e240623bf9ac 100644 --- a/app/Jobs/Import/QuickbooksIngest.php +++ b/app/Jobs/Import/QuickbooksIngest.php @@ -15,6 +15,8 @@ class QuickbooksIngest implements ShouldQueue use Dispatchable, InteractsWithQueue, Queueable, SerializesModels; protected $engine; + protected $request; + protected $company; /** * Create a new job instance. @@ -32,8 +34,9 @@ class QuickbooksIngest implements ShouldQueue { MultiDB::setDb($this->company->db); set_time_limit(0); - $engine = new Quickbooks($this->request, $this->company); - foreach (['client', 'product', 'invoice', 'payment'] as $entity) { + + $engine = new Quickbooks(['import_type' => 'client', 'hash'=> $this->request['hash'] ], $this->company); + foreach ($this->request['import_types'] as $entity) { $engine->import($entity); }