1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-12 22:22:32 +01:00

Bank Transactions updates for auto sync dates

This commit is contained in:
David Bomba 2024-04-16 07:43:08 +10:00
parent f1ab3845eb
commit c1075c174c

View File

@ -26,6 +26,7 @@ use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\Middleware\WithoutOverlapping;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Carbon;
class ProcessBankTransactionsYodlee implements ShouldQueue
{
@ -71,8 +72,8 @@ class ProcessBankTransactionsYodlee implements ShouldQueue
set_time_limit(0);
//Loop through everything until we are up to date
$this->from_date = $this->from_date ?: '2021-01-01';
//Loop through everything until we are up to date - improve handling of delayed accounts
$this->from_date = $this->from_date ? Carbon::parse($this->from_date)->subWeeks(2)->format('Y-m-d') : '2021-01-01';
nlog("Yodlee: Processing transactions for account: {$this->bank_integration->account->key}");