mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
adjust for multiple entities
This commit is contained in:
parent
d79dce6669
commit
ba40fc54ba
@ -15,6 +15,8 @@ class QuickbooksIngest implements ShouldQueue
|
|||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels;
|
||||||
|
|
||||||
protected $engine;
|
protected $engine;
|
||||||
|
protected $request;
|
||||||
|
protected $company;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create a new job instance.
|
* Create a new job instance.
|
||||||
@ -32,8 +34,9 @@ class QuickbooksIngest implements ShouldQueue
|
|||||||
{
|
{
|
||||||
MultiDB::setDb($this->company->db);
|
MultiDB::setDb($this->company->db);
|
||||||
set_time_limit(0);
|
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);
|
$engine->import($entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user