beancount/fava

Fava not matching bean-query values

Closed this issue · 1 comments

I can run a bean-query of

bean-query -f csv -m  bc.org 'SELECT
	   date, convert(position,"USD"), convert(balance , "USD")
	   FROM date >= 2024-01-01
	   WHERE account ~ "Assets:AccountsReceivable:Foo"'

That returns

date convertpositionc_ (USD) convertbalancec_ (USD)
2024-01-14 817.44 817.44
2024-01-16 145.79 963.23
2024-01-16 160.46 1123.69
2024-03-13 596.88 1720.57
2024-04-14 6.87 1727.44
2024-04-14 23.61 1751.05
2024-04-17 64.06 1815.11
2024-05-05 -1815.0 0.11

When I view the Account Journal for this account in Fava I see different values:

image

I assume the differences are due to Euro and USD and exchange rates and that one of Fava vs bean-query uses price updates differently. That's fine. What confuses me is why Fava has a total at the 2nd-to-top transaction of 1816.11 USD. However it got there, that's the Fava estimate of this account. Units are mixed and Fava is told to display in Converted to USD. But if I then transfer 1815 USD to the account, why is the remainder 0.11 USD and not 1.11 USD?

Nevermind. I address this by explicitly converting EUR to USD prior to the USD reimbursement. E.g.,

2024-05-04 * "Convert EUR to USD for reimbursement"
    Assets:AccountsReceivable:Foo                         -88.06 EUR @@ 94.43 USD
    Assets:AccountsReceivable:Foo                          94.43 USD