julien-nc / cospend-nc

💰 💲hared budget manager Nextcloud app
GNU Affero General Public License v3.0
217 stars 29 forks source link

Add several payers for one single bill #1

Open agamez opened 3 years ago

agamez commented 3 years ago

Hi!

I'm currently using Settle Up! on Android and it has a feature I'm really missing on Cospend / Moneybuster. It is the ability to define that a bill has been payed by several people.

For example, let's say that three of us go to a restaurant, and even though we want to split everything equally because we've had a fixed price menu (i.e. 10€/person for a grand total of 30€), there may be one person paying 25€, another person paying 5€ and the third person does not pay anything.

This may happen in real life for a variety of reasons, and it's something that happens to me quite often, because maybe I have 25€ with me, but I'm not able to cover the whole 30€ in the moment, so some one chimes in with what they have right on them.

I can fake this by creating several bills with different totals and same text, date, etc, but it's quite cumbersome and I'm used to the way it works with settle up, so I'd really like to see this on cospend.

Thanks!

julien-nc commented 3 years ago

It would indeed be nice to make that possible. It would have to be done on the interface side because Cospend is built on the idea that a bill has one and only one payer :grin:. I mean in the end it would still create multiple bills.

So there could be a new "bill type" named "even split with multiple payers" which would show a checkbox and a number input field per member. The checkbox would mean "is an ower" (just like for the "classic, even split" type) and the amount field would be what the member has payed.

What do you think?

agamez commented 3 years ago

If the concept of one bill = one payer database background is not feasible to change, the interface option you propose seems good enough. It's basically the same as the other bill types that also generate a new entry to take into account the different split, so I think it can really work and would ease the entry of these kind of transactions.

The translation in spanish for "even split with multiple players" would be "División equitativa con múltiples pagadores".

Regarding the concept of one bill has one payer, I am just thinking that maybe this concept can be kept while also adding the ability to display transactions as originally entered by the user. It would require the additiong of a field to oc_cospend_bills called "multiple_bill_id", which could be NULL for bills that are really entered by the user as a single payer, but for transactions that have different payers, this could be an ID common for the several bills that are generated by the interface when the user has entered a special bill type that requires the generation of several bills. Using this information, the interface could regroup the bills on the database in order to show them as entered by the user.

agamez commented 3 years ago

I was thinking about this, and I've just realized that there is really no need to modify the database to add that multiple_bill_id, because searches could be done (albeit more slowly) by just selecting those entries that match in time/date and subject of the operation, as all bills generated by a more complex transaction share these fields exactly.

In any case, this would be a further improvement about my original request, which I believe can be done simply via your interface change suggestion, so taking things step by step, doing that would already be a nice improvement by itself.

Thanks!

CharlotteCross1998 commented 2 years ago

Hi, I've noticed this issue is still open and was wondering if there have been any updates since? This would be a really useful feature.

360path commented 1 year ago

Maybe you would like to check out Splitwise on how they do it. Looking forward to this feature.