beancount / fava

Fava - web interface for Beancount
https://beancount.github.io/fava/
MIT License
1.95k stars 286 forks source link

Balance metadata not imported correctly #980

Open alexiri opened 5 years ago

alexiri commented 5 years ago

I'm trying to import some transactions with a balance directive, as follows

2018-11-05 * "..." "..."
  __source__: "..."
  balance: XXXX.YY EUR
  date: 2018-11-04
  Assets:...  XX.YY EUR

This is apparently not parsed correctly by Fava:

Screenshot_2019-10-06_13-54-45

If I change my importer to only add the number and not the currency to the balance, Fava reads it correctly but then I get a 500 error while trying to save the new entries. I then have to go back and manually add the currency to each entry, but then it's written as a quoted string (balance: "XXXX.YY EUR").

Perhaps some better formatting is needed in EntryMetadata.svelte?

I'm using the very latest version (56d7b94) from master.

yagebu commented 5 years ago

Currently, the amount is serialized as an object to Javascript, which can't really be edited in a text field. To support these metadata types, a Amount->JSON object (with editable amount string)>Amount roundtrip would have to be implemented.