Possible fix for #2592

This commit is contained in:
James Cole
2019-09-13 05:39:56 +02:00
parent 4fd23694c7
commit 88f8dc469b

View File

@@ -182,16 +182,26 @@ class ImportDataHandler
// transaction data:
'transactions' => [
[
'type' => $type,
'date' => $transaction['date'] ?? date('Y-m-d'),
'tags' => $tags,
'user' => $this->importJob->user_id,
'notes' => null,
'currency_id' => null,
'currency_code' => $budget['currency_code'] ?? $this->defaultCurrency->code,
'description' => null,
'amount' => bcdiv((string)$transaction['amount'], '1000'),
'budget_id' => null,
'original-source' => sprintf('ynab-v%s', config('firefly.version')),
'budget_name' => null,
'category_id' => null,
'category_name' => $transaction['category_name'],
'source_id' => $source->id,
'source_name' => null,
// all custom fields:
'external_id' => $transaction['id'] ?? '',
// journal data:
'description' => $description,
'destination_id' => $destination->id,
'destination_name' => null,
'foreign_currency_id' => null,