Skip to content

Conversation

@pmarciniak
Copy link
Contributor

This is useful when passing a concatenation of multiple Beancount files as an input to bean-add (as suggested in #3 (comment)). However, in order for the statements to be sorted by date (a prerequisite for bean-add to work correctly), it's better to use "bean-report print main.bnct > merged.bnct" rather than "cat *.bnct > merged.bnct".

The output of bean-report has some features that bean-add couldn't handle:

  1. bean-report uses comma separators when printing large numbers (e.g., 12,344.50 CHF). bean-add would fail to parse such numbers.
  2. For every pad statement, bean-report inserts a padding transaction flagged with 'P', e.g.:
    2019-03-09 P "(Padding inserted for Balance of 124.10 CHF for difference 15.20 CHF)"
    bean-add would crash on encountering such transactions.

This PR resolves the above 2 problems.

@pmarciniak pmarciniak force-pushed the bug-fixes branch 2 times, most recently from 015a425 to 6e75993 Compare May 6, 2023 05:50
@pmarciniak pmarciniak force-pushed the bug-fixes branch 2 times, most recently from 2fbe7f1 to 0664581 Compare May 11, 2023 19:32
This is useful when passing a concatenation of multiple Beancount files as an input to bean-add (as suggested in simon-v#3 (comment)). However, in order for the statements to be sorted by date (a prerequisite for bean-add to work correctly), it's better to use "bean-report print main.bnct > merged.bnct" rather than "cat *.bnct > merged.bnct".

bean-report uses comma separator when printing large numbers (e.g., 12,344.50 CHF). This commit makes bean-add able to parse such numbers.
This is useful when passing a concatenation of multiple Beancount files as an input to bean-add (as suggested in simon-v#3 (comment)). However, in order for the statements to be sorted by date (a prerequisite for bean-add to work correctly), it's better to use "bean-report print main.bnct > merged.bnct" rather than "cat *.bnct > merged.bnct".

For every pad statement, bean-report inserts a padding transaction flagged with 'P', e.g.:
2019-03-09 P "(Padding inserted for Balance of 124.10 CHF for difference 15.20 CHF)"

This commit makes bean-add able to parse such transactions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant