mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-07 18:34:30 -04:00
Minor fixes for bank services, executing matching after imports
This commit is contained in:
parent
4c72663940
commit
d046989e84
@ -46,6 +46,7 @@ use App\Repositories\PaymentRepository;
|
|||||||
use App\Repositories\ProductRepository;
|
use App\Repositories\ProductRepository;
|
||||||
use App\Repositories\QuoteRepository;
|
use App\Repositories\QuoteRepository;
|
||||||
use App\Repositories\VendorRepository;
|
use App\Repositories\VendorRepository;
|
||||||
|
use App\Services\Bank\BankMatchingService;
|
||||||
use App\Utils\Traits\MakesHash;
|
use App\Utils\Traits\MakesHash;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||||
@ -107,6 +108,8 @@ class Csv extends BaseImport implements ImportInterface
|
|||||||
$bank_transaction_count = $this->ingest($data, $entity_type);
|
$bank_transaction_count = $this->ingest($data, $entity_type);
|
||||||
$this->entity_count['bank_transactions'] = $bank_transaction_count;
|
$this->entity_count['bank_transactions'] = $bank_transaction_count;
|
||||||
|
|
||||||
|
BankMatchingService::dispatchSync($this->company->id, $this->company->db);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function client()
|
public function client()
|
||||||
|
@ -33,21 +33,13 @@ class BankMatchingService implements ShouldQueue
|
|||||||
{
|
{
|
||||||
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, GeneratesCounter;
|
use Dispatchable, InteractsWithQueue, Queueable, SerializesModels, GeneratesCounter;
|
||||||
|
|
||||||
private $company_id;
|
|
||||||
|
|
||||||
private Company $company;
|
private Company $company;
|
||||||
|
|
||||||
private $db;
|
|
||||||
|
|
||||||
private $invoices;
|
private $invoices;
|
||||||
|
|
||||||
public $deleteWhenMissingModels = true;
|
public $deleteWhenMissingModels = true;
|
||||||
|
|
||||||
public function __construct($company_id, $db)
|
public function __construct(private int $company_id, private string $db){}
|
||||||
{
|
|
||||||
$this->company_id = $company_id;
|
|
||||||
$this->db = $db;
|
|
||||||
}
|
|
||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
@ -77,6 +69,6 @@ class BankMatchingService implements ShouldQueue
|
|||||||
|
|
||||||
public function middleware()
|
public function middleware()
|
||||||
{
|
{
|
||||||
return [new WithoutOverlapping($this->company->company_key)];
|
return [new WithoutOverlapping($this->company_id)];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ namespace App\Services\Bank;
|
|||||||
|
|
||||||
use App\Models\BankTransaction;
|
use App\Models\BankTransaction;
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
use App\Services\Bank\ProcessBankRule;
|
use App\Services\Bank\ProcessBankRules;
|
||||||
|
|
||||||
class BankService
|
class BankService
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user