Is Liabilities:OwnersAccount a credit card? I'm not sure if that's the case in Swiss, but in US when you do a foreign transaction with a credit card, the exact exchange rate should be the one that show up in your statement.
You can also do the other way around by using plugin "beancount.plugins.implicit_prices", so that you don't need to maintain the price database. On Wed, Apr 5, 2017 at 9:00 AM, <[email protected]> wrote: > 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 > > -- > You received this message because you are subscribed to the Google Groups > "Beancount" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit https://groups.google.com/d/ > msgid/beancount/082555f1-ed1a-4df2-8833-7274d79e10a3%40googlegroups.com > <https://groups.google.com/d/msgid/beancount/082555f1-ed1a-4df2-8833-7274d79e10a3%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- Yuchen Ying https://about.me/yegle -- You received this message because you are subscribed to the Google Groups "Beancount" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/CAFL5w3UGU8Q0GF9%2B5xPXHAn%3D6p%3D%2BHe7--VbgPdSG_hnQLv3vhA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
