Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import warning on currency code. #1705

Closed
inc-ali opened this issue Sep 21, 2018 · 2 comments
Closed

Import warning on currency code. #1705

inc-ali opened this issue Sep 21, 2018 · 2 comments

Comments

@inc-ali
Copy link

inc-ali commented Sep 21, 2018

I am running Firefly III version 4.7.6.2

Description
I am importing many transactions from the command line. For every transaction firefly throws this warning:
local.WARNING: Cannot find anything on empty currency code and empty currency ID!

How can I prevent this warning?

Content of testimport.csv
date;amount;description;category;opposing_account_name;asset_account_name;currency
20.09.2018;-20.0;Fastfood;Restaurants;;Cash;EUR

Content of import_default.json
{
"file-type": "csv",
"date-format": "d.m.Y",
"has-headers": true,
"delimiter": ";",
"apply-rules": false,
"specifics": [],
"import-account": 3,
"column-count": 7,
"column-roles": [
"date-transaction",
"amount",
"description",
"category-name",
"opposing-name",
"account-name",
"currency-code"
],
"column-do-mapping": [
false,
false,
false,
false,
false,
false,
false
]
}

Extra info
[2018-09-21 19:17:14] local.INFO: Going to create a job to import file: shared/testimport.csv
Going to create a job to import file: shared/testimport.csv
[2018-09-21 19:17:14] local.INFO: Using configuration file: shared/import_default.json
Using configuration file: shared/import_default.json
[2018-09-21 19:17:14] local.INFO: Import into user: #1 (admin@example.com)
Import into user: #1 (admin@example.com)
[2018-09-21 19:17:14] local.INFO: Type of import: file
Type of import: file
[2018-09-21 19:17:14] local.INFO: Created job "123"
Created job "123"
[2018-09-21 19:17:14] local.INFO: File content saved.
File content saved.
[2018-09-21 19:17:14] local.INFO: Job configuration saved.
Job configuration saved.
[2018-09-21 19:17:14] local.DEBUG: Updating configuration...
[2018-09-21 19:17:14] local.DEBUG: Set status of job "123" to "ready_to_run"
[2018-09-21 19:17:14] local.INFO: The import routine has started. The process is not visible. Please wait.
The import routine has started. The process is not visible. Please wait.
[2018-09-21 19:17:14] local.DEBUG: Go for import!
[2018-09-21 19:17:14] local.DEBUG: Now in loop #1.
[2018-09-21 19:17:14] local.DEBUG: Now in run() for file routine with status: ready_to_run
[2018-09-21 19:17:14] local.DEBUG: Set status of job "123" to "running"
[2018-09-21 19:17:14] local.DEBUG: Now in setImportJob()
[2018-09-21 19:17:14] local.DEBUG: Now in CSVProcessor() run
[2018-09-21 19:17:14] local.DEBUG: Now in getReader()
[2018-09-21 19:17:14] local.DEBUG: now in getLines()
[2018-09-21 19:17:14] local.DEBUG: Start converging process.
[2018-09-21 19:17:14] local.DEBUG: Now converging line 1 out of 1.
[2018-09-21 19:17:14] local.DEBUG: Now at column #0 (date-transaction), value "20.09.2018"
[2018-09-21 19:17:14] local.DEBUG: Column #0 with role "date-transaction" is not mapped.
[2018-09-21 19:17:14] local.DEBUG: Now at column #1 (amount), value "-20.0"
[2018-09-21 19:17:14] local.DEBUG: Column #1 with role "amount" is not mapped.
[2018-09-21 19:17:14] local.DEBUG: Now at column #2 (description), value "Fastfood"
[2018-09-21 19:17:14] local.DEBUG: Column #2 with role "description" is not mapped.
[2018-09-21 19:17:14] local.DEBUG: Now at column #3 (category-name), value "Restaurants"
[2018-09-21 19:17:14] local.DEBUG: Column #3 with role "category-name" is not mapped.
[2018-09-21 19:17:14] local.DEBUG: Now at column #4 (opposing-name), value ""
[2018-09-21 19:17:14] local.DEBUG: Column skipped because value is empty.
[2018-09-21 19:17:14] local.DEBUG: Now at column #5 (account-name), value "Cash"
[2018-09-21 19:17:14] local.DEBUG: Column #5 with role "account-name" is not mapped.
[2018-09-21 19:17:14] local.DEBUG: Now at column #6 (currency-code), value "EUR"
[2018-09-21 19:17:14] local.DEBUG: Column #6 with role "currency-code" is not mapped.
[2018-09-21 19:17:14] local.DEBUG: Now in validateMappedValues()
[2018-09-21 19:17:14] local.DEBUG: Now going to check role "description".
[2018-09-21 19:17:14] local.DEBUG: Going to convert 1 import transactions
[2018-09-21 19:17:14] local.DEBUG: Now going to parse importable 1 of 1
[2018-09-21 19:17:14] local.DEBUG: Description is: "Fastfood"
[2018-09-21 19:17:14] local.DEBUG: ImportTransaction holds no foreign amount info.
[2018-09-21 19:17:14] local.DEBUG: Now in importTransaction->calculateAmount()
[2018-09-21 19:17:14] local.DEBUG: Amount value is not NULL, assume this is the correct value.
[2018-09-21 19:17:14] local.DEBUG: Converter class is FireflyIII\Import\Converter\Amount
[2018-09-21 19:17:14] local.DEBUG: Start with amount "-20.0"
[2018-09-21 19:17:14] local.DEBUG: Stripped "-20.0" away to "-20.0"
[2018-09-21 19:17:14] local.DEBUG: Decimal character in "-20.0" seems to be a dot.
[2018-09-21 19:17:14] local.DEBUG: Converted amount from "-20.0" to "-20.0".
[2018-09-21 19:17:14] local.DEBUG: Final NUMERIC value is: "-20.0"
[2018-09-21 19:17:14] local.DEBUG: First attempt to convert gives "-20.0"
[2018-09-21 19:17:14] local.DEBUG: After modifiers the result is: "-20.0"
[2018-09-21 19:17:14] local.DEBUG: All meta data:
[2018-09-21 19:17:14] local.DEBUG: Now in AssetAccountMapper::map()
[2018-09-21 19:17:14] local.DEBUG: Array does not contain a value for iban. Continue
[2018-09-21 19:17:14] local.DEBUG: Array does not contain a value for number. Continue
[2018-09-21 19:17:14] local.DEBUG: Searching for account named "Cash" (of user #1) of the following type(s) {"types":["Asset account"]}
[2018-09-21 19:17:14] local.DEBUG: Found #3 (Cash) with type id 3
[2018-09-21 19:17:14] local.DEBUG: Going to run findByName() with argument "Cash" (asset account)
[2018-09-21 19:17:14] local.DEBUG: Found asset account "Cash". Return it!
[2018-09-21 19:17:14] local.DEBUG: Now in OpposingAccountMapper::map()
[2018-09-21 19:17:14] local.DEBUG: Going to search for accounts of type Expense account
[2018-09-21 19:17:14] local.DEBUG: Array does not contain a value for iban. Continue
[2018-09-21 19:17:14] local.DEBUG: Array does not contain a value for number. Continue
[2018-09-21 19:17:14] local.DEBUG: Array does not contain a value for name. Continue
[2018-09-21 19:17:14] local.DEBUG: Array does not contain a value for iban. Continue
[2018-09-21 19:17:14] local.DEBUG: Array does not contain a value for number. Continue
[2018-09-21 19:17:14] local.DEBUG: Array does not contain a value for name. Continue
[2018-09-21 19:17:14] local.DEBUG: Will try to store a new account: {"name":"(no name)","iban":null,"accountNumber":null,"account_type_id":null,"accountType":"Expense account","active":true,"BIC":null}
[2018-09-21 19:17:14] local.DEBUG: No account type found by ID, continue search for "Expense account".
[2018-09-21 19:17:14] local.DEBUG: Now in CurrencyMapper::map()
[2018-09-21 19:17:14] local.DEBUG: Will search for currency using findByCodeNull() and argument "EUR".
[2018-09-21 19:17:14] local.DEBUG: Found result: Currency #1, code "EUR"
[2018-09-21 19:17:14] local.DEBUG: Now in CurrencyMapper::map()
[2018-09-21 19:17:14] local.DEBUG: Array does not contain a value for code. Continue
[2018-09-21 19:17:14] local.DEBUG: Array does not contain a value for symbol. Continue
[2018-09-21 19:17:14] local.DEBUG: Array does not contain a value for name. Continue
[2018-09-21 19:17:14] local.DEBUG: "Cash" (#3) is source and "(no name)" (#15) is destination.
[2018-09-21 19:17:14] local.DEBUG: Destination is an expense account. This is a withdrawal.
[2018-09-21 19:17:14] local.DEBUG: Set status of job "123" to "provider_finished"
[2018-09-21 19:17:14] local.INFO: Import has finished. Please wait for storage of data.
Import has finished. Please wait for storage of data.
[2018-09-21 19:17:14] local.DEBUG: Set status of job "123" to "storing_data"
[2018-09-21 19:17:14] local.DEBUG: Now in count transfers.
[2018-09-21 19:17:14] local.DEBUG: Count is zero, will not check for duplicate transfers.
[2018-09-21 19:17:14] local.DEBUG: Constructed ImportArrayStorage()
[2018-09-21 19:17:14] local.DEBUG: Set status of job "123" to "storing_data"
[2018-09-21 19:17:14] local.DEBUG: Now in store(). Count of items is 1
[2018-09-21 19:17:14] local.DEBUG: Now at item 1 out of 1
[2018-09-21 19:17:14] local.DEBUG: The hash is: xy
[2018-09-21 19:17:14] local.DEBUG: JSON encoded hash is: "xy"
[2018-09-21 19:17:14] local.DEBUG: Hash of hash is: xz
[2018-09-21 19:17:14] local.DEBUG: Result is null
[2018-09-21 19:17:14] local.DEBUG: Found no transactions with hash xy.
[2018-09-21 19:17:14] local.DEBUG: Going to store...
[2018-09-21 19:17:14] local.DEBUG: The hash is: xy
[2018-09-21 19:17:14] local.DEBUG: JSON encoded hash is: "xy"
[2018-09-21 19:17:14] local.DEBUG: Hash of hash is: xz
[2018-09-21 19:17:14] local.DEBUG: Result is null
[2018-09-21 19:17:14] local.DEBUG: Found no transactions with hash xy.
[2018-09-21 19:17:14] local.DEBUG: Going to store entry 1 of 1
[2018-09-21 19:17:15] local.DEBUG: Start of TransactionJournalFactory::create()
[2018-09-21 19:17:15] local.DEBUG: Going to store a Withdrawal
[2018-09-21 19:17:15] local.DEBUG: Found 1 transactions in array.
[2018-09-21 19:17:15] local.DEBUG: Now storing transaction 1 of 1
[2018-09-21 19:17:15] local.DEBUG: Start of TransactionFactory::createPair() {"currency_id":1,"currency_code":null,"description":null,"amount":"-20.0","budget_id":0,"budget_name":null,"category_id":0,"category_name":"Restaurants","source_id":3,"source_name":null,"destination_id":15,"destination_name":null,"foreign_currency_id":0,"foreign_currency_code":null,"foreign_amount":"","reconciled":false,"identifier":0}
[2018-09-21 19:17:15] local.DEBUG: Expect source account to be of type "Asset account"
[2018-09-21 19:17:15] local.DEBUG: Expect source destination to be of type "Expense account"
[2018-09-21 19:17:15] local.DEBUG: Going to find account #3 ("")
[2018-09-21 19:17:15] local.DEBUG: Going to find account #15 ("")
[2018-09-21 19:17:15] local.DEBUG: Source type is "Asset account", destination type is "Expense account"
[2018-09-21 19:17:15] local.DEBUG: Start of TransactionFactory::create()
[2018-09-21 19:17:15] local.DEBUG: Create transaction for account #3 ("Cash") with amount -20.0
[2018-09-21 19:17:15] local.DEBUG: Start of TransactionFactory::create()
[2018-09-21 19:17:15] local.DEBUG: Create transaction for account #15 ("(no name)") with amount 20.0
[2018-09-21 19:17:15] local.WARNING: Cannot find anything on empty currency code and empty currency ID!
[2018-09-21 19:17:15] local.DEBUG: Going to find or create category #0, with name "Restaurants"
[2018-09-21 19:17:15] local.DEBUG: Going to find category with ID 0 and name "Restaurants"
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "sepa-cc", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "sepa-ct-op", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "sepa-ct-id", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "sepa-db", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "sepa-country", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "sepa-ep", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "sepa-ci", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "interest_date", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "book_date", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "process_date", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "due_date", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "recurrence_id", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "payment_date", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "invoice_date", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "internal_reference", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "bunq_payment_id", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "importHash", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "importHashV2", with value "xy".
[2018-09-21 19:17:15] local.DEBUG: Going to create new meta-data entry to store "importHashV2".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "external_id", with value "".
[2018-09-21 19:17:15] local.DEBUG: Going to store meta-field "sepa-batch-id", with value "".
[2018-09-21 19:17:15] local.DEBUG: End of TransactionJournalFactory::create()
[2018-09-21 19:17:15] local.DEBUG: Stored as journal #3203
[2018-09-21 19:17:15] local.DEBUG: DONE storing!
[2018-09-21 19:17:15] local.DEBUG: Set status of job "123" to "stored_data"
[2018-09-21 19:17:15] local.DEBUG: Set status of job "123" to "linking_to_tag"
[2018-09-21 19:17:15] local.DEBUG: Created tag #10 ("Import with key '123'")
[2018-09-21 19:17:15] local.DEBUG: Looping journals...
[2018-09-21 19:17:15] local.DEBUG: Linking journal #3203 to tag #10...
[2018-09-21 19:17:15] local.INFO: Linked 1 journals to tag #10 ("Import with key '123'")
[2018-09-21 19:17:15] local.DEBUG: Set status of job "123" to "linked_to_tag"
[2018-09-21 19:17:15] local.DEBUG: In event RequestedReportOnJournals.
[2018-09-21 19:17:15] local.DEBUG: In reportJournals.
[2018-09-21 19:17:15] local.DEBUG: Trying to mail...
...

@JC5
Copy link
Member

JC5 commented Sep 22, 2018

Yes, that's confusing. What happens is that Firefly III also supports foreign currencies. You could create a transaction with a value of 20 EUR and 23.54 USD.

The warning is when Firefly III tries to find the foreign currency but can't find anything. This makes sense since you never submitted foreign currency info.

I can't remove the warning but I'll precede it with a notice on what it's searching for.

@JC5 JC5 added the question label Sep 22, 2018
@inc-ali
Copy link
Author

inc-ali commented Sep 22, 2018

Thank you!

@inc-ali inc-ali closed this as completed Sep 22, 2018
@lock lock bot locked as resolved and limited conversation to collaborators Jan 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants