SFTtech / abrechnung

Payment tracking and money splitting for groups 💸
https://abrechnung.readthedocs.io
GNU Affero General Public License v3.0
122 stars 15 forks source link

Incorrect math in Settlement Plan #194

Closed RicardoJeronimo closed 6 months ago

RicardoJeronimo commented 6 months ago

Consider the following transactions created in the Demo:

image

Balance table shows correct division:

image

However, on the Settle Up page, some users don't have debts they should (i.e. Bob should be paying Cat), and some users have debts they shouldn't have (i.e. Joe doesn't own Bob any money)

image

mikonse commented 6 months ago

I think there might be a small misunderstanding as to how the balance computation and proposed settlements work.

Contrary to how e.g. tricount does this Abrechnung does not track per-person debts but rather computes an aggregated balance per person over all transactions in a group. Therefore we just show a simply balance in the balance overview rather than a list of x ows y z amount.

The settelement plan computes proposed transactions to get all balances to 0 with the least amount of transactions between users.

RicardoJeronimo commented 6 months ago

After spending some time with a calculator I now understand what you mean.

I apologize for the misunderstanding, I think this is a great functionality!