mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
Logging
This commit is contained in:
parent
c15c1572e9
commit
9b74cb4615
@ -79,8 +79,6 @@ class ProcessBankTransactions implements ShouldQueue
|
||||
'accountId' => $this->bank_integration->bank_account_id,
|
||||
];
|
||||
|
||||
nlog($data);
|
||||
|
||||
$transaction_count = $yodlee->getTransactionCount($data);
|
||||
|
||||
$count = $transaction_count->transaction->TOTAL->count;
|
||||
@ -99,16 +97,12 @@ nlog($data);
|
||||
|
||||
BankTransaction::unguard();
|
||||
|
||||
nlog("transactions = " . count($transactions));
|
||||
|
||||
foreach($transactions as $transaction)
|
||||
{
|
||||
|
||||
if(BankTransaction::where('transaction_id', $transaction['transaction_id'])->where('company_id', $company->id)->withTrashed()->exists())
|
||||
continue;
|
||||
|
||||
nlog("inserting");
|
||||
|
||||
//this should be much faster to insert than using ::create()
|
||||
$bt = \DB::table('bank_transactions')->insert(
|
||||
array_merge($transaction,[
|
||||
@ -124,8 +118,6 @@ nlog("transactions = " . count($transactions));
|
||||
|
||||
$last_transaction = reset($transactions);
|
||||
|
||||
nlog("last tranny = " . $last_transaction['id']);
|
||||
|
||||
$this->bank_integration->from_date = isset($last_transaction['date']) ? \Carbon\Carbon::parse($last_transaction['date']) : now();
|
||||
|
||||
$this->from_date = \Carbon\Carbon::parse($this->bank_integration->from_date)->format('Y-m-d');
|
||||
|
@ -231,7 +231,7 @@ class CompanyTransformer extends EntityTransformer
|
||||
}
|
||||
|
||||
public function includeBankTransactions(Company $company)
|
||||
{
|
||||
{nlog("GEEETTTTTTTT");
|
||||
$transformer = new BankTransactionTransformer($this->serializer);
|
||||
|
||||
return $this->includeCollection($company->bank_transactions, $transformer, BankTransaction::class);
|
||||
|
Loading…
Reference in New Issue
Block a user