autobean icon indicating copy to clipboard operation
autobean copied to clipboard

share: integration of multiple ledgers

Open SEIAROTg opened this issue 5 years ago • 0 comments

People may have more than one ledgers: personal, family, work, project, etc. It would be good if they can be seen in a merged view. However, this cannot be simply done via beancount's built-in include directive, because:

  • Ledgers may have plugins applied but the built-in include does not respect plugins. This is addressed by autobean.include.
  • Different ledgers may use different account classification. This will need human intelligence and is impossible to solve automatically. An account in one classification system may not always be possible to be mapped into an account in another system.
  • There may be duplicated postings across multiple ledgers. A common example is that family expenses are kept in family ledger but the "payment" side of transactions are also kept in personal ledger for balance assertion.

This will therefore focus on merging "same" transactions from different ledgers.

Sample personal ledger

2020-01-01 *
    Assets:BankOfBean:CurrentAccount          -50.00 USD
    Expenses:Family                            50.00 USD

Sample family ledger

2020-01-01 *
    Assets:Alice                              -50.00 USD
    Expenses:Meal                              25.00 USD
        share-Alice: 1
    Expenses:Meal                              25.00 USD
        share-Bob: 1

Sample merge result

2020-01-01 *
    Assets:BankOfBean:CurrentAccount          -50.00 USD
    Expenses:Meal                              25.00 USD
    Assets:Receivable:[Family]                 25.00 USD

SEIAROTg avatar Jan 13 '20 00:01 SEIAROTg