mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2026-01-06 22:21:42 +00:00
Possible fix for #2592
This commit is contained in:
@@ -182,16 +182,26 @@ class ImportDataHandler
|
|||||||
// transaction data:
|
// transaction data:
|
||||||
'transactions' => [
|
'transactions' => [
|
||||||
[
|
[
|
||||||
|
'type' => $type,
|
||||||
|
'date' => $transaction['date'] ?? date('Y-m-d'),
|
||||||
|
'tags' => $tags,
|
||||||
|
'user' => $this->importJob->user_id,
|
||||||
|
'notes' => null,
|
||||||
'currency_id' => null,
|
'currency_id' => null,
|
||||||
'currency_code' => $budget['currency_code'] ?? $this->defaultCurrency->code,
|
'currency_code' => $budget['currency_code'] ?? $this->defaultCurrency->code,
|
||||||
'description' => null,
|
|
||||||
'amount' => bcdiv((string)$transaction['amount'], '1000'),
|
'amount' => bcdiv((string)$transaction['amount'], '1000'),
|
||||||
'budget_id' => null,
|
'budget_id' => null,
|
||||||
|
'original-source' => sprintf('ynab-v%s', config('firefly.version')),
|
||||||
'budget_name' => null,
|
'budget_name' => null,
|
||||||
'category_id' => null,
|
'category_id' => null,
|
||||||
'category_name' => $transaction['category_name'],
|
'category_name' => $transaction['category_name'],
|
||||||
'source_id' => $source->id,
|
'source_id' => $source->id,
|
||||||
'source_name' => null,
|
'source_name' => null,
|
||||||
|
// all custom fields:
|
||||||
|
'external_id' => $transaction['id'] ?? '',
|
||||||
|
|
||||||
|
// journal data:
|
||||||
|
'description' => $description,
|
||||||
'destination_id' => $destination->id,
|
'destination_id' => $destination->id,
|
||||||
'destination_name' => null,
|
'destination_name' => null,
|
||||||
'foreign_currency_id' => null,
|
'foreign_currency_id' => null,
|
||||||
|
|||||||
Reference in New Issue
Block a user