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(); + } +}