autobean icon indicating copy to clipboard operation
autobean copied to clipboard

share: `we`: the fourth viewpoint to separate internal and external parties

Open SEIAROTg opened this issue 5 years ago • 3 comments

Currently there are three type of viewpoints.

  • raw: when the plugin is not enabled. This shows the original ledger in a global perspective.
  • all: when the plugin is applied with no argument. This shows all postings grouped into subaccounts based on the shares of each involved parties.
  • me: when the plugin is applied with the name of an involved party. This only shows postings that involves that individual, with subaccounts omitted.

raw doesn't split the postings, all treats every involved parties as internal parties, while me treats everyone except "me" as external parties but the real scenarios may be more complex. Consider this example:

You (Alice) maintain a personal ledger and a family ledger together with Bob and Charlie. One day, the whole family had dinner with Charlie's math teacher David. You paid the $51 bill with a $1 coin from Charlie. On the following day, when Bob picked up Charlie from school, David paid cash to him.

The meal was booked in the family ledger like this:

2020-01-01 *
    Assets:Alice                              -50.00 USD
    Assets:Charlie                             -1.00 USD
    Expenses:Meal                              13.00 USD
        share-Alice: 1
    Expenses:Meal                              15.00 USD
        share-Bob: 1
    Expenses:Meal                               8.00 USD
        share-Charlie: 1
    Expenses:Meal                              15.00 USD
        share-David: 1

In this example:

  • It's okay for David to pay to Bob.
  • In raw view, nobody can see David's involvement.
  • In all view, everyone can see David's involvement, but it shows every subaccounts which is difficult to read.
  • In me view, only Alice and Charlie can see David's involvement, but both in an incomplete way.

We therefore need another type of viewpoint that can show the complete involvement of David clearly, namely we. In this view, we should be able to:

  • Specify who is internal and who is external.
  • See the complete involvement of external parties in an overall view, but subaccounts shouldn't be shown for internal parties.

SEIAROTg avatar Jan 12 '20 23:01 SEIAROTg

I think this is exactly the feature I've been looking for (have also recently discussed this on the mailing list).

To confirm / flesh this out: This would let users declare an array of owners to present as "we/us" (where mutual receivables are cancelled out, as in nobody and everyone), but "others" would still be listed as receivables, correct?

Does this kind of interface make sense?

plugin "autobean.share" "Alice,Bob" ; this would be "we"
; and remaining Eve (etc.) would be treated as in the "me" view for Alice

So I'm guessing this would be how this could be used (adapting your docs):

  1. Describe things from the overall viewpoint
; From the overall viewpoint
2000-01-01 *
   ; Alice paid 20 USD
   Assets:Bank                  -20.00 USD
   ; For Bob and Eve to watch a movie
   Expenses:Movie                20.00 USD
       share-Bob: 1
       share-Eve: 1

For the we (of Alice,Bob) viewpoint, this would be transformed as:

; we
2000-01-01 *
    Assets:Bank:[Alice]          -20.00 USD
    Expenses:Movie:[Bob]          10.00 USD
    Assets:Receivables:Alice     -10.00 USD
    Assets:Receivables:Bob        10.00 USD
    Assets:Receivables:Eve        10.00 USD

Am I getting this right?

maxheld83 avatar Oct 23 '23 21:10 maxheld83

Olá boa noite tudo bem com vocês meus queridos amigos e amigas sejam bem vindos com muito amor e carinho nesse site tão maravilhoso

LaionOliver avatar Nov 04 '23 01:11 LaionOliver

Currently there are three type of viewpoints.

  • raw: when the plugin is not enabled. This shows the original ledger in a global perspective.
  • all: when the plugin is applied with no argument. This shows all postings grouped into subaccounts based on the shares of each involved parties.
  • me: when the plugin is applied with the name of an involved party. This only shows postings that involves that individual, with subaccounts omitted.

raw doesn't split the postings, all treats every involved parties as internal parties, while me treats everyone except "me" as external parties but the real scenarios may be more complex. Consider this example:

You (Alice) maintain a personal ledger and a family ledger together with Bob and Charlie. One day, the whole family had dinner with Charlie's math teacher David. You paid the $51 bill with a $1 coin from Charlie. On the following day, when Bob picked up Charlie from school, David paid cash to him.

The meal was booked in the family ledger like this:

2020-01-01 *
    Assets:Alice                              -50.00 USD
    Assets:Charlie                             -1.00 USD
    Expenses:Meal                              13.00 USD
        share-Alice: 1
    Expenses:Meal                              15.00 USD
        share-Bob: 1
    Expenses:Meal                               8.00 USD
        share-Charlie: 1
    Expenses:Meal                              15.00 USD
        share-David: 1

In this example:

  • It's okay for David to pay to Bob.
  • In raw view, nobody can see David's involvement.
  • In all view, everyone can see David's involvement, but it shows every subaccounts which is difficult to read.
  • In me view, only Alice and Charlie can see David's involvement, but both in an incomplete way.

We therefore need another type of viewpoint that can show the complete involvement of David clearly, namely we. In this view, we should be able to:

  • Specify who is internal and who is external.
  • See the complete involvement of external parties in an overall view, but subaccounts shouldn't be shown for internal parties.

Olá boa noite tudo bem com vocês meus queridos amigos e amigas sejam bem vindos com muito amor e carinho nesse site tão maravilhoso

LaionOliver avatar Nov 04 '23 01:11 LaionOliver