You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is definitely related to #159 and might be so to #182
I exported a SplitWise CSV and needed to edit column names to English (following #159). As said in that issue, there is a tiny difference in balances due to the rounding up thing, but it's a matter of cents.
However, the person who paid is excluded from "For whom?" section, when it should not be in every cases.
See this example:
SplitWise
Cospend imported
Porru paid 2,84, divided equally between the four people (25 %, so it should be 0,71 per person, including Porru)
As I already said, the balances are the same, but showing the info that way (the cost and the people to pay being different) is rather confusing. Besides, it may affect the statistics, right?
The text was updated successfully, but these errors were encountered:
Let's figure out the algorithm to compute the bill to create in Cospend
Relevant info/columns in a Splitwise export line:
Cost (let's use C)
effect on person 1's balance (e1)
effect on person 2's balance (e2)
effect on person 3's balance (e3)
etc...
I think we can safely assume there can be only one payer in SplitWise, anyway if it's not the case, I don't care if we support importing this 😁.
There should be only one person with a positive effect. This is the payer. Let's call the effect on the payer eP, it's the only positive value in the effect list.
I think it's reasonable to only support those 2 cases:
If the cost is is equal to the effect on the payer (C == eP), then the payer is not in the "for whom" list (not an ower).
For example:
C = 30
e1 = 30
e2 = -15
e3 = -15
This would lead to a Cospend bill payed by 1, amount would be 30, it would include 2, and 3
If the effects on the owers are all equal (e1 == e2 == e3) and if the cost equals the effect on the payer minus the effect on one ower (C == eP - e2) this is an evenly split bill.
For example:
C = 30
e1 = 20
e2 = -10
e3 = -10
This would lead to a Cospend bill payed by 1, amount would be 30, it would include 1, 2, and 3
Any other case would be treated like it's implemented now.
Do you think there's a flaw in this?
I see a first obstacle making this hard to implement, this kind of line:
This is definitely related to #159 and might be so to #182
I exported a SplitWise CSV and needed to edit column names to English (following #159). As said in that issue, there is a tiny difference in balances due to the rounding up thing, but it's a matter of cents.
However, the person who paid is excluded from "For whom?" section, when it should not be in every cases.
See this example:
As I already said, the balances are the same, but showing the info that way (the cost and the people to pay being different) is rather confusing. Besides, it may affect the statistics, right?
The text was updated successfully, but these errors were encountered: