mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for bank transactions transformer
This commit is contained in:
parent
96115adeac
commit
73f5c599fb
@ -23,7 +23,7 @@ class BankIntegrationFactory
|
||||
$bank_integration->user_id = $user_id;
|
||||
$bank_integration->company_id = $company_id;
|
||||
|
||||
$bank_integration->provider_bank_name = '';
|
||||
$bank_integration->provider_name = '';
|
||||
$bank_integration->bank_account_id = '';
|
||||
$bank_integration->bank_account_name = '';
|
||||
$bank_integration->bank_account_number = '';
|
||||
|
@ -16,10 +16,9 @@ use Illuminate\Support\Str;
|
||||
|
||||
class BankTransactionFactory
|
||||
{
|
||||
public static function create(int $company_id, int $user_id, int $account_id) :BankTransaction
|
||||
public static function create(int $company_id, int $user_id) :BankTransaction
|
||||
{
|
||||
$bank_transaction = new BankTransaction;
|
||||
$bank_transaction->account_id = $account_id;
|
||||
$bank_transaction->user_id = $user_id;
|
||||
$bank_transaction->company_id = $company_id;
|
||||
|
||||
@ -30,7 +29,6 @@ class BankTransactionFactory
|
||||
$bank_transaction->date = now()->format('Y-m-d');
|
||||
$bank_transaction->description = '';
|
||||
$bank_transaction->is_matched = 0;
|
||||
$bank_transaction->base_type = 'CREDIT';
|
||||
|
||||
return $bank_transaction;
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class ProcessBankTransactions implements ShouldQueue
|
||||
|
||||
private BankIntegration $bank_integration;
|
||||
|
||||
private string $from_date;
|
||||
private ?string $from_date;
|
||||
|
||||
private bool $stop_loop = true;
|
||||
/**
|
||||
|
@ -62,16 +62,18 @@ class BankTransactionSync implements ShouldQueue
|
||||
|
||||
// $queue = Ninja::isHosted() ? 'bank' : 'default';
|
||||
|
||||
if($account->isPaid())
|
||||
{
|
||||
// if($account->isPaid())
|
||||
// {
|
||||
|
||||
$account->bank_integrations->each(function ($bank_integration) use ($account){
|
||||
|
||||
nlog("processing {$account->bank_integration_account_id} - {$bank_integration->id}");
|
||||
|
||||
ProcessBankTransactions::dispatch($account->bank_integration_account_id, $bank_integration);
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
});
|
||||
}
|
||||
|
@ -21,7 +21,7 @@ use App\Models\TaskStatus;
|
||||
class BankTransactionRepository extends BaseRepository
|
||||
{
|
||||
|
||||
public function store($data, BankTransaction $bank_transaction)
|
||||
public function save($data, BankTransaction $bank_transaction)
|
||||
{
|
||||
|
||||
//stub to store
|
||||
|
Loading…
x
Reference in New Issue
Block a user