mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
fixes
This commit is contained in:
parent
0593a57e5c
commit
3a8bb30425
@ -221,7 +221,7 @@ class NordigenController extends BaseController
|
||||
}
|
||||
|
||||
// perform update in background
|
||||
$company->account->bank_integrations->where("integration_type", BankIntegration::INTEGRATION_TYPE_NORDIGEN)->andWhere('auto_sync', true)->each(function ($bank_integration) use ($company) {
|
||||
$company->account->bank_integrations->where("integration_type", BankIntegration::INTEGRATION_TYPE_NORDIGEN)->where('auto_sync', true)->each(function ($bank_integration) use ($company) {
|
||||
|
||||
ProcessBankTransactionsNordigen::dispatch($company->account, $bank_integration);
|
||||
|
||||
|
@ -207,14 +207,14 @@ class BankIntegrationController extends BaseController
|
||||
|
||||
// Processing transactions for each bank account
|
||||
if ($user->account->bank_integration_yodlee_account_id)
|
||||
$user_account->bank_integrations->where("integration_type", BankIntegration::INTEGRATION_TYPE_YODLEE)->andWhere('auto_sync', true)->each(function ($bank_integration) use ($user_account) {
|
||||
$user_account->bank_integrations->where("integration_type", BankIntegration::INTEGRATION_TYPE_YODLEE)->where('auto_sync', true)->each(function ($bank_integration) use ($user_account) {
|
||||
|
||||
ProcessBankTransactionsYodlee::dispatch($user_account, $bank_integration);
|
||||
|
||||
});
|
||||
|
||||
if (($user->account->bank_integration_nordigen_secret_id && $user->account->bank_integration_nordigen_secret_key) || (config('ninja.nordigen.secret_id') && config('ninja.nordigen.secret_key')))
|
||||
$user_account->bank_integrations->where("integration_type", BankIntegration::INTEGRATION_TYPE_NORDIGEN)->andWhere('auto_sync', true)->each(function ($bank_integration) use ($user_account) {
|
||||
$user_account->bank_integrations->where("integration_type", BankIntegration::INTEGRATION_TYPE_NORDIGEN)->where('auto_sync', true)->each(function ($bank_integration) use ($user_account) {
|
||||
|
||||
ProcessBankTransactionsNordigen::dispatch($user_account, $bank_integration);
|
||||
|
||||
|
@ -56,7 +56,7 @@ class BankTransactionSync implements ShouldQueue
|
||||
// $queue = Ninja::isHosted() ? 'bank' : 'default';
|
||||
|
||||
if ($account->isPaid() && $account->plan == 'enterprise') {
|
||||
$account->bank_integrations()->where('integration_type', BankIntegration::INTEGRATION_TYPE_YODLEE)->andWhere('auto_sync', true)->cursor()->each(function ($bank_integration) use ($account) {
|
||||
$account->bank_integrations()->where('integration_type', BankIntegration::INTEGRATION_TYPE_YODLEE)->where('auto_sync', true)->cursor()->each(function ($bank_integration) use ($account) {
|
||||
(new ProcessBankTransactionsYodlee($account, $bank_integration))->handle();
|
||||
});
|
||||
}
|
||||
@ -67,13 +67,13 @@ class BankTransactionSync implements ShouldQueue
|
||||
|
||||
if (config("ninja.nortigen.secret_id") && config("ninja.nortigen.secret_key"))
|
||||
Account::with('bank_integrations')->cursor()->each(function ($account) {
|
||||
$account->bank_integrations()->where('integration_type', BankIntegration::INTEGRATION_TYPE_NORDIGEN)->andWhere('auto_sync', true)->cursor()->each(function ($bank_integration) use ($account) {
|
||||
$account->bank_integrations()->where('integration_type', BankIntegration::INTEGRATION_TYPE_NORDIGEN)->where('auto_sync', true)->cursor()->each(function ($bank_integration) use ($account) {
|
||||
(new ProcessBankTransactionsNordigen($account, $bank_integration))->handle();
|
||||
});
|
||||
});
|
||||
else
|
||||
Account::with('bank_integrations')->whereNotNull('bank_integration_nordigen_secret_id')->andWhereNotNull('bank_integration_nordigen_secret_key')->cursor()->each(function ($account) {
|
||||
$account->bank_integrations()->where('integration_type', BankIntegration::INTEGRATION_TYPE_NORDIGEN)->andWhere('auto_sync', true)->cursor()->each(function ($bank_integration) use ($account) {
|
||||
Account::with('bank_integrations')->whereNotNull('bank_integration_nordigen_secret_id')->whereNotNull('bank_integration_nordigen_secret_key')->cursor()->each(function ($account) {
|
||||
$account->bank_integrations()->where('integration_type', BankIntegration::INTEGRATION_TYPE_NORDIGEN)->where('auto_sync', true)->cursor()->each(function ($bank_integration) use ($account) {
|
||||
(new ProcessBankTransactionsNordigen($account, $bank_integration))->handle();
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user