mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix #3263
This commit is contained in:
@@ -183,30 +183,30 @@ class StageImportDataHandler
|
||||
// transaction data:
|
||||
'transactions' => [
|
||||
[
|
||||
'date' => $transaction->getMadeOn()->format('Y-m-d'),
|
||||
'tags' => $tags,
|
||||
'user' => $this->importJob->user_id,
|
||||
'notes' => $notes,
|
||||
'date' => $transaction->getMadeOn()->format('Y-m-d'),
|
||||
'tags' => $tags,
|
||||
'user' => $this->importJob->user_id,
|
||||
'notes' => trim($notes),
|
||||
|
||||
// all custom fields:
|
||||
'external_id' => (string)$transaction->getId(),
|
||||
'external_id' => (string)$transaction->getId(),
|
||||
|
||||
// journal data:
|
||||
'description' => $transaction->getDescription(),
|
||||
'piggy_bank_id' => null,
|
||||
'piggy_bank_name' => null,
|
||||
'bill_id' => null,
|
||||
'bill_name' => null,
|
||||
'original-source' => sprintf('spectre-v%s', config('firefly.version')),
|
||||
'type' => $type,
|
||||
'currency_id' => null,
|
||||
'currency_code' => $currencyCode,
|
||||
'amount' => $amount,
|
||||
'budget_id' => null,
|
||||
'budget_name' => null,
|
||||
'category_id' => null,
|
||||
'category_name' => $transaction->getCategory(),
|
||||
'source_id' => $source->id,
|
||||
'description' => $transaction->getDescription(),
|
||||
'piggy_bank_id' => null,
|
||||
'piggy_bank_name' => null,
|
||||
'bill_id' => null,
|
||||
'bill_name' => null,
|
||||
'original-source' => sprintf('spectre-v%s', config('firefly.version')),
|
||||
'type' => $type,
|
||||
'currency_id' => null,
|
||||
'currency_code' => $currencyCode,
|
||||
'amount' => $amount,
|
||||
'budget_id' => null,
|
||||
'budget_name' => null,
|
||||
'category_id' => null,
|
||||
'category_name' => $transaction->getCategory(),
|
||||
'source_id' => $source->id,
|
||||
'source_name' => null,
|
||||
'destination_id' => $destination->id,
|
||||
'destination_name' => null,
|
||||
|
@@ -70,11 +70,10 @@ class Steam
|
||||
->where('transactions.transaction_currency_id', $currency->id)
|
||||
->get(['transactions.amount'])->toArray();
|
||||
$nativeBalance = $this->sumTransactions($transactions, 'amount');
|
||||
|
||||
// get all balances in foreign currency:
|
||||
$transactions = $account->transactions()
|
||||
->leftJoin('transaction_journals', 'transaction_journals.id', '=', 'transactions.transaction_journal_id')
|
||||
->where('transaction_journals.date', '<=', $date->format('Y-m-d'))
|
||||
->where('transaction_journals.date', '<=', $date->format('Y-m-d 23:59:59'))
|
||||
->where('transactions.foreign_currency_id', $currency->id)
|
||||
->where('transactions.transaction_currency_id', '!=', $currency->id)
|
||||
->get(['transactions.foreign_amount'])->toArray();
|
||||
|
Reference in New Issue
Block a user