Skip to content

Per-unit costs and prices inferred from total should be rounded appropriately #125

Description

@tesujimath

With this transaction among others

2025-04-01 * "cost total"
  Assets:Shares:IBM         3 IBM { # 910.00 NZD }
  Assets:NZ:Cash
kiri> limabean --beanfile test-cases/costs-and-prices.beancount

user=> (show (inventory))
Assets:NZ:Cash     -2165.14 NZD
Assets:Shares:IBM      5    IBM  2025-03-01 NZD 300.00
                       3    IBM  2025-04-01 NZD 303.33333333333333333333333333
                       3    IBM  2025-04-05 NZD 302.00
Assets:UK:Cash     -1394.00 GBP

Rounding should be such that tolerance is respected when converting the other way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions