Akuukis / beancount_share

A beancount plugin to share expenses with external partners within one ledger.
GNU Affero General Public License v3.0
21 stars 4 forks source link

handle sharing and reconciliation #6

Open pfrancois opened 3 years ago

pfrancois commented 3 years ago

thanks a lot for the plugin but i have a problem. some explanations: we have two account and we want to share some expenses on each side but we mark it on the same file:

2021-01-01 * "Payee" "dadpaid" #share-mum
   Assets:Cash:dad -100 USD
   Expenses:Drinks
2021-01-01 * "Payee" "mumpaid" #share-dad
   Assets:Cash:mum -50 USD
   Expenses:Drinks

transformed in

2021-01-01 * "Payee" "dadpaid"
   Assets:Cash:dad    -100 EUR
   Expenses:Drinks 50.00 EUR
   Assets:Share:Mum       50.00 EUR 
2021-01-01 * "Payee" "mumpaid"
   Assets:Cash:mum    -50 EUR
   Expenses:Drinks 25.00 EUR
   Assets:Share:Dad       25.00 EUR 

but now, the "problem" is mum want to reimburse her share. so on one side, she give 25 EUR to dad.

2021-01-02 * "mum" "to dad(the real payment)" 
   Assets:Cash:mum -25 USD
   Assets:Cash:dad

but how to clean the two share accounts ?? of course, in real life, there are more than two expenses in common. and how to deal with three persons ...

Akuukis commented 3 years ago

Hi!

Share plugin is useful for external parties as if mom and dad would have their own ledger each. By looking at your example I think that you are talking about internal parties where mom and dad has one joint ledger. For internal parties use allocate plugin* instead. Your use-case is Multiple partners in one ledger.

Please read allocate plugin readme for more details. Such approach can handle infinite expense positions and persons. In short:

So to build on your example, I'd rewrite it like this:

2021-01-01 * "Payee" "Opening Balance"
   Income:Opening-Balance   200 USD
   Assets:Cash:dad          100 USD
   Assets:Cash:mum          100 USD
   Equity:Earnings:Current   40 USD ; 200-40=160 USD as "family wealth"
   Equity:dad               -20 USD ; 20 USD personal wealth, a.k.a. pocket money
   Equity:mum               -20 USD ; 20 USD personal wealth, a.k.a. pocket money

2021-01-01 * "Payee" "dadpaid for a joint expense"
   Assets:Cash:dad -100 USD
   Expenses:Drinks

2021-01-01 * "Payee" "mumpaid for a joint expense"
   Assets:Cash:mum -50 USD
   Expenses:Drinks

2021-01-02 * "mum" "to dad(the real payment)"
   Assets:Cash:mum -25 USD
   Assets:Cash:dad

2021-01-03 * "Payee" "mumpaid for a mum's personal expense" #allocate-mum
   Assets:Cash:mum  -5 USD
   Expenses:Drinks

In the end:

Does this help you?


*allocate is my newest plugin that is not even advertised at plugin list within the beancount docs yet. Nevertheless, I use it already for a while, and it's readme is mostly done but will be polished more. I'd like to hear your feedback about it!

pfrancois commented 3 years ago

ok seem but nonetheless it could be better to explain in your doc of the share plugin what's happen when bob pay his debt. example taken from your doc:

2020-01-01 * "Bar" "Lunch with friend Bob" #share-Bob
    Assets:Cash               -10.00 USD
    Expenses:Food:Drinks

when bob will reimburse alice

2020-01-02 * "bob" "reimbursement" #share-Bob-100p
    Assets:Cash               5.00 USD
    Income:divers