Visitar URL original
Balance in only USD · Issue #648 · hledgerorg/hledger · GitHub
Skip to content

Balance in only USD #648

Closed
Closed

Description

@artkpv

Hello! Thanks for the great tool!

Newbie question here. I have transactions in $ and in RUB. How can I make 'hledger balance --monthly Income -b 2017-06 --value' only in $? This displays report in RUB. In my journals default currency is set to RUB (р).

Activity

  1. simonmichael commented on Nov 20, 2017

    @simonmichael
    Member

    Welcome @artkpv. Have you seen http://hledger.org/manual.html#market-value ? See also http://hledger.org/hledger.html#cost.

    If this was too hard to discover, let's discuss how to improve the help/docs.

  2. added
    cliCommand line parsing, options, arguments and suchlike.
    docsDocumentation-related.
    journalThe journal file format, and its features.
    on Nov 20, 2017
  3. artkpv commented on Dec 26, 2017

    @artkpv
    Author

    @simonmichael Thanks for the hints! How to make this balance command to display it only in RUB? I guess if I put P directive with desired currency last it should be used. Now it outputs:

    hledger -f test.ledger bal -V
                  USD 10  Cash
               RUB -1000  OpenBalance
                  ABC 10  Stocks
    --------------------
                  ABC 10
               RUB -1000
                  USD 10
    

    test.ledger:

    2017/12/11 
      OpenBalance    
      Cash    RUB 1000
    
    2017/12/11
      Cash    RUB -1000
      Cash    USD 100
    
    2017/12/12 
      Cash      USD -90
      Stocks    ABC 10
    
    P 2017/12/20 USD RUB 15
    ; 9 * 15:
    P 2017/12/20 ABC RUB 135
    
    

    And here is a draft for Q&A item. Probably useful.

    How to show balance report in one or more desired currencies?
    You can show it either in a market price (-V/--market) or in a transaction price (-B/--cost). To show your balance report in some other currency you should have prices from your transaction currency to the desired currency. And these prices should come last. For a transaction price, make your desired currency to be last. For a market price, put your desired currency price last in your price list.

  4. simonmichael commented on Dec 29, 2017

    @simonmichael
    Member

    @artkpv I see now you are running into #683 - by default -V uses market prices as of the last transaction's date. You can see it working when a later date is specified:

    $ hledger -f examples/648.journal bal -V -e 2017/12/31
                 RUB 150  Cash
               RUB -1000  OpenBalance
                RUB 1350  Stocks
    --------------------
                 RUB 500
    

    I think we'll have this fixed shortly.

  5. added
    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.
    on Dec 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-BUGSomething wrong, confusing or sub-standard in the software, docs, or user experience.cliCommand line parsing, options, arguments and suchlike.docsDocumentation-related.journalThe journal file format, and its features.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions