julien-nc / cospend-nc

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

Function (Wish) #25

Open Fanmion opened 3 years ago

Fanmion commented 3 years ago

Is there a possibility to add a project budget at the beginning? Because we want to use this app for planning our next shopping (like a budget planner for outputs and incomes).

wertos97 commented 3 years ago

This would be a great feature. I want to use Cospend to track my family expenses so setting an initial budget for every participant would work just right.

julien-nc commented 3 years ago

Hey, the balance is actually not an amount of money, it represents how much advance or lateness one has in the project. The goal is not to see how much money one has left but how much more/less money members spent for the group relatively to each others.

When someone spends money for the group, it is not simply added/taken from the balance. If there are 3 members (A, B and C) and one member (A for example) spends 30 for everybody, then A's balance goes up 30 and everybody's balance goes down 10. Result balances: A 20, B -10, C -10. Now B and C owe 10 to the group. If C gives 10 to B (bill payed by B which involves C only), balances are A 20, B -20, C 0. which means C does not owe the group anymore.

If you're suggesting to set balances initial values, I don't see how this can work. If you set a negative initial value to someone, it means he/she owes the group...without having even participated in any group expense. If you set it to a positive value, same problem, the group owes him/her for no reason.

Maybe I misunderstood your suggestion. If you found a simple way to make Cospend act like a budget manager, I'm interested :grin:.

burnoutberni commented 3 years ago

I'm not sure how easy it'd be to implement this, but here's my thoughts on this:

I think it would be necessary to define some kind of "budget mode". If set to this, a project would have a "virtual user" called budget or something that takes all of the weight of all payments – essentially this user would act as if it's weight is set to 1, while all other users' weight is set to 0 (side note: one issue here is that currently AFAIR you can't set the weight of users to 0). You could then set that virtual user's balance to a certain budget. Optimally, that would happen via "negative payments", so that these budgets could be set with the ease of all payment features (regular payments and so on). There's probably still some issues left then regarding how to display everything and also how to settle the balance.

I'd be keen on using Cospend that way, especially if it were well integrated with Nextcloud groups. I already have user groups defined for sub-groups of my organisation that have a given budget and the authority to decide on their own how to spend it. Best case, I could use Cospend to create a project for each group and set it up in budget mode, so that it's only visible to group members and only editable to group admins and certain other groups (global admins kinda). They could then use it to keep track of their expenses and we could get regular reports.

Fanmion commented 3 years ago

@eneiluj I understand what you mean. Sorry I'm not a programmer and I don't know the easier way to make cospend like a budget manager. For me personally I use the App Moneywallet (https://github.com/AndreAle94/moneywallet) for budgeting my Money. I thought you can make cospend acting like Moneywallet.

@burnoutberni yes. That's also a possibility. I created a user named "budget" and a user "anti-budget". So I can hide "anti-budget" at the end...

That's my thoughts Greeting Fanmion

TomD629 commented 2 years ago

I'm also looking for this budget feature, but using "virtual user" seems complicated. Would it be possible to add: