Hi all,
I'd like to resolve a little peeve with regards to pricing, if at all possible.
Let me now show you an example beancount file:
2017-01-01 open Expenses:Widgets CHF
2017-01-01 open Expenses:Tools CHF
2017-01-01 open Liabilities:OwnersAccount
; official monthly exchange rate averages published by VAT office
2017-01-01 price USD 1.0274 CHF
2017-02-01 price USD 1.0247 CHF
2017-03-01 price USD 1.0101 CHF
2017-04-05 * "supplier" "widgets purchased"
Expenses:Widgets
Liabilities:OwnersAccount -100.00 USD @ 1.0101 CHF
2017-04-05 * "shop" "tools bought"
Expenses:Tools
Liabilities:OwnersAccount -20.00 USD @ 1.0101 CHF
I'm working with Swiss VAT where the valid exchange
rate into foreign currencies is fixed by the government VAT office.
They publish both daily and monthly averages, I choose to use monthly for simplicity.
First off, I keep having to input the value "@ 1.0101 CHF" for each transaction - because the expense accounts must be reported in CHF.
But the amount is already marked with an explicit price directive. Is there no way I can force a lookup?
Second, the monthly average price is not available the 1st of the month ... which means I need to mark entries with a wrong exchange rate and then come back and fix them when it is available.
So the lookup would need to happen when the beancount file is parsed, not when it is written.
I mention this because otherwise it would be quite straightforward to just write an UltiSnip to go look up the price and insert it when I'm inputting the transaction in the first place ... but it's not always available at that time!
Thirdly, I suppose I could just keep the transactions in USD and not convert to CHF ... but then when I need to do my balance sheet I need to show everything in CHF - and I have not been able to figure out how to get bean-query to force a price conversion based on the price database.
So, to recap:
a.) Isn't there any way to force a price database lookup? Maybe with a "@@@" syntax meaning "figure this out yourself from the price database"
or
b.) How do I force implicit price conversion when generating reports with bean-query?
or
c.) Am I looking at the problem completely wrong and should I approach it some other way?
Thanks so much for your help.
Sirio