Skip to content

Add support for ledger lot dates and notes to bean-report #5

@blais

Description

@blais

Original report by Marin Bernard (Bitbucket: marinbernard, GitHub: marinbernard).


While bean-report supports the conversion of beancount lot expressions to ledger syntax, it currently discards lot dates and notes. The following transaction:

2020-01-01 open Assets:Bank
2020-01-01 open Expenses:Computers
2020-01-01 commodity COMPUTER
    format: "1, COMPUTER"

2020-01-01 commodity USD

option "operating_currency" "USD"

2020-02-01 * "Super Shop"  "New computer"
    Expenses:Computers       1 COMPUTER {900.00 USD, 2019-12-25, "DiscountedComputer"} @ 1100.00 USD
    Assets:Bank

Is currently rendered as:

account Assets:Bank                                    

account Expenses:Computers                             

commodity COMPUTER

commodity USD

2020-02-01 * Super Shop | New computer
  Expenses:Computers                    1 COMPUTER {900.00 USD} @ 1100.00 USD
  Assets:Bank                                      -900.00 USD

Since ledger also supports lot dates/notes, bean-report should ideally include them in the output, like:

account Assets:Bank                                    

account Expenses:Computers                             

commodity COMPUTER

commodity USD

2020-01-01 * Super Shop | New computer
    Expenses:Computers  1 COMPUTER [2019-12-25] {900.00 USD} (ChristmasDiscountedComputer) @ 1100.00 USD
    Assets:Bank

This would actually make bean-report usable as a converter for complex journals full of lot annotations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions