From 207c3ec80a7023598032caca59db68d152574eaa Mon Sep 17 00:00:00 2001 From: karneaud Date: Fri, 19 Jul 2024 13:04:54 -0400 Subject: [PATCH] add inget job for quickbooks --- app/Jobs/Import/QuickbooksIngest.php | 42 ++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 app/Jobs/Import/QuickbooksIngest.php diff --git a/app/Jobs/Import/QuickbooksIngest.php b/app/Jobs/Import/QuickbooksIngest.php new file mode 100644 index 000000000000..18889b0d8908 --- /dev/null +++ b/app/Jobs/Import/QuickbooksIngest.php @@ -0,0 +1,42 @@ +company = $company; + $this->request = $request; + } + + /** + * Execute the job. + */ + public function handle(): void + { + MultiDB::setDb($this->company->db); + set_time_limit(0); + $engine = new Quickbooks($this->request, $this->company); + foreach (['client', 'product', 'invoice', 'payment'] as $entity) { + $engine->import($entity); + } + + $engine->finalizeImport(); + } +}