Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
    Alan Hawrylyshen
    @muonzoo
    I'm pretty sure there's and example query in the docs and if not check the pta wiki?
    If not I can dig up an example of you ping the thread again and I'm on my laptop
    sm
    @simonmic:matrix.org
    [m]
    muonzoo (Alan Hawrylyshen) or anyone - a sample command line would be most welcome. There are a ton of docs
    saharshtapi
    @saharshtapi
    Hey Admin,
    Can you please look into the GitHub issue beancount/fava#1427
    Alan Hawrylyshen
    @muonzoo
    @sm if you have a sample file that works with hledger I can whip up the corresponding beancount example(s)
    putzwasser
    @putzwasser
    Is there an ETA for beancount3 ?
    sm
    @simonmic:matrix.org
    [m]
    @muonzoo: here's an example, I'm wondering how to show cost and market value like this:
    P 2022-01-01 A 3C
    
    2022-01-01
        (a)        1A @ 2B
    
    comment
    
    $ hledger bal -N
                      1A  a
    $ hledger bal -N -B
                      2B  a
    $ hledger bal -N -V
                      3C  a
    no, @putzwasser
    Alan Hawrylyshen
    @muonzoo
    Sorry - not familiar with ledger syntax sufficiently to work that one out. I can see that you price A at 3C, but I just don’t have enough time / context to process the transaction. I’m a bean count user and rather like the more rigorous syntax. :-)
    I suggest you read the bean count docs on inventories
    sm
    @simonmic:matrix.org
    [m]
    Thanks. If anyone can answer directly that will be ideal and appreciated
    That doc is nice muonzoo (Alan Hawrylyshen) but assumes more beancount expertise than I have
    those entries are incomplete, right ? "..."
    and the commands are not shown
    to recap: I'm looking for the beancount syntax and commands to report balances at cost and at market value
    sm
    @simonmic:matrix.org
    [m]
    I don't know if that involves @ or {}, or if it has to involve lots/inventories as in that doc - I'm interested in simple non-investment transactions like a currency exchange
    sm
    @simonmic:matrix.org
    [m]
    cost and value are very familiar reports in h/ledger but maybe beancount is more different than I think. Or I just haven't found the right docs.
    Alan Hawrylyshen
    @muonzoo
    I think you might want the holdings report
    This shows you all assets by account and broken out into lots with cost and market value.
    example: https://gist.github.com/muonzoo/7170a6c1e39b01a2bdf77ec7f86e7349
    bean-report beanfile.beancount holdings if not there are other bean-reports that might work for you.
    Alan Hawrylyshen
    @muonzoo
    I’ll also point out that this is the fave chat - and that the fava UI has support for showing everything at cost, market value or specific currencies in use.
    sm
    @simonmic:matrix.org
    [m]
    thanks
    this is combined fava & beancount, am I right ?
    or really more for fava ?
    sm
    @simonmic:matrix.org
    [m]
    2022-01-01 price AAA  3 CCC
    
    2022-01-01 open Assets:Aaa
    2022-01-01 open Equity:Eee
    
    2022-01-01 * ""
        Assets:Aaa        1 AAA {2 BBB}
        Equity:Eee
    
    ; Report cost:
    ;
    ; $ bean-report a.beancount bal -c
    ; Assets:Aaa    2 BBB
    ; Equity:Eee   -2 BBB
    ; Expenses    
    ; Income      
    ; Liabilities 
    ;
    ; Report value:
    ;
    ; $ bean-report a.beancount holdings
    ; Account     Units  Currency  Cost Currency  Average Cost  Price  Book Value  Market Value
    ; ----------  -----  --------  -------------  ------------  -----  ----------  ------------
    ; Assets:Aaa   1.00       AAA            BBB          2.00               2.00              
    ; ----------  -----  --------  -------------  ------------  -----  ----------  ------------
    thanks for the command hints, that helped. bal -c shows cost and holdings shows value. Though, why is it not showing value above ?
    Alan Hawrylyshen
    @muonzoo
    Likely because your price data is from the same day ? Double checking
    There is also a useful plugin called ‘auto’ that will skip you needing to declare and open all accounts / commodities - I don’t recommend it for your real ledger but it is useful for testing / examples.
    The examples we are working on now are just beancount - no fava.
    sm
    @simonmic:matrix.org
    [m]
    right, I meant is this channel for beancount and fava both ? I have assumed that from the name
    Alan Hawrylyshen
    @muonzoo
    It might be :-) but I assumed that it was named after the respository (beancount/fava vs beancount/beancount) I think you are more likely to be correct. :-)

    Looking more closely I see that you are doing something ‘unusual’ perhaps this is your point but you are purchasing ‘AAA’ using currency BBB but you’ve priced it in ‘CCC’.

    If you use implicit prices (which is another plugin) bean count will auto generate a price from the purchase transaction that makes things work as you might expect.

    plugin "beancount.plugins.auto"
    
    2022-01-01 price AAA  3 CCC
    ;2022-01-01 open Assets:Aaa AAA
    ;2022-01-01 open Equity:Eee ; no comoddity - can hold anything
    2022-01-01 * ""
        Assets:Aaa        1 AAA {2 BBB}
        Equity:Eee
    bean-report /tmp/t2.bean holdings
    Account     Units  Currency  Cost Currency  Average Cost  Price  Book Value  Market Value
    ----------  -----  --------  -------------  ------------  -----  ----------  ------------
    Assets:Aaa   1.00       AAA            BBB          2.00   2.00        2.00          2.00
    ----------  -----  --------  -------------  ------------  -----  ----------  ------------
    Alan Hawrylyshen
    @muonzoo
    Why? Because the auto plugin added a price from the purchase. (Here what bean-report /tmp/t2.bean print has to say about it.)
    This is the directive stream that bean count ‘saw’
    2022-01-01 open Assets:Aaa
    2022-01-01 open Equity:Eee
    
    2022-01-01 price AAA                                     3 CCC
    
    2022-01-01 * 
      Assets:Aaa   1 AAA {2 BBB, 2022-01-01}
      Equity:Eee  -2 BBB
    
    2022-01-01 price AAA                                     2 BBB
      __implicit_prices__: "from_cost"
    Now there is pricing data so it can report on the market value in the commodity pair used to buy the inventory lot.
    sm
    @simonmic:matrix.org
    [m]
    yes, I'm not doing anything realistic here - was just trying to write a doc showing cost/valuation in all 3 apps, IIRC
    using vanilla beancount
    I did try staggering the dates, it didn't seem to make a difference. Just curious, I saw that it worked for you
    that's a good point about the room name possibly coming from owner/repo, I never thought of that
    who would be the room admin / fava maintainer ? can't quite tell from the matrix side..
    ah @yagebu I think. Hi Jakob, could you clarify - is this room intended for both beancount and fava, or mainly fava ?
    Alan Hawrylyshen
    @muonzoo
    You can use the examples above and the holdings report to likely get what you need / want from bean count. Honestly I rarely use the bean-report function other than print and frequently write my own BeanSQL queries (and keep them in my ledger) for reporting / taxes/ etc.
    And 99% of the time; I just use Fava with time-filtering and one of the cost/value/currency choices for the reporting
    sm
    @simonmic:matrix.org
    [m]
    so... basically all bean counters mainly use fava ? plus a bit of beansql for custom reports ?
    gary
    @garyp:matrix.org
    [m]
    I can't speak for all beancount users. But whenever someone has a reporting-related question on the beancount mailing list, the recommended solution is usually a BQL query.
    sm
    @simonmic:matrix.org
    [m]
    what's the ux for that then ?
    gary
    @garyp:matrix.org
    [m]
    A bean-query CLI command, like the example that tario posted above.
    sm
    @simonmic:matrix.org
    [m]
    i'm in no way attached to bean-report. I literally can't figure out the beancount cli story
    I see, thanks
    gary
    @garyp:matrix.org
    [m]
    Fava also allows running arbitrary BQL queries and prints the results in a table within the fava UI.