Skip to content

Allow choosing date for conversions #1048

Open
@dvorak0

Description

A minimal example is

plugin "beancount.plugins.auto_accounts"
option "operating_currency" "CNY"

2016-01-01 price HKD                                 0.8 CNY
2019-01-01 price HKD                                 0.9 CNY

2016-01-02 * "Someone"
  Assets:Bank -10000 HKD
  Expenses:Buy +10000 HKD
  
2019-01-02 * "Someone"
  Assets:Bank -10000 HKD
  Expenses:Buy +10000 HKD

I choose 'Converted to CNY' and see
1
, which works very well as 18000 CNY = 20000 HKD * 0.9 HKD/CNY.

However, it's not the case in account view:
2
, where although the final balance(18000 CNY) is correct, the accumulation is confusing (1+2 != 3).

The reason I guess is that the first transition uses the price on 2016-01-01.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions