Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
blais opened this issue Apr 16, 2020 · 4 comments
Closed

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

blais opened this issue Apr 16, 2020 · 4 comments
Labels
enhancement
Milestone

Comments

@blais
Copy link
Member

blais commented Apr 16, 2020

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.

@blais
Copy link
Member Author

blais commented May 18, 2020

Original comment by Martin Michlmayr (Bitbucket: tbm13, GitHub: tbm).


I have some pending fixes for ledger output that I have to clean up and submit.

I can probably fix this one as well.

@blais
Copy link
Member Author

blais commented May 23, 2020

@tbm That's one for you if you want.
I will likely remove the converters in the next version or fork them to a separate repo for other people to work on.

@tbm
Copy link
Collaborator

tbm commented Jul 17, 2020

Can you move this ticket to https://github.com/beancount/beancount2ledger

There should be a link "Transfer issue" in the lower right corner (there's an arrow to the right).

@blais blais transferred this issue from beancount/beancount Jul 17, 2020
@tbm tbm closed this as completed in 186b924 Jul 23, 2020
@tbm
Copy link
Collaborator

tbm commented Jul 23, 2020

@MarinBernard I split out the ledger conversion from beancount into a standalone tool called beancount2ledger. Please give this a go.

@tbm tbm added this to the 1.1 milestone Jul 24, 2020
@tbm tbm added the enhancement label Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement
Projects
None yet
Development

No branches or pull requests

2 participants