onelocalorg / ONE-mobile

1 stars 0 forks source link

Producer Payouts for tix sold #239

Open cameronmurdock opened 2 months ago

cameronmurdock commented 2 months ago

when a user buys a ticket, funds should sit in the platform stripe account until the event completes. after the event completes, the producer can then set initiate payouts.

the payout module should be on the producer's view of their own event.

Screenshot 2024-08-07 at 8 48 51 PM

An expense and a payout are exactly the same technically just different types of transfers.

Screenshot 2024-08-07 at 6 02 31 PM

The available funds for each event should show up in “revenue” in the financials module on each event. that is sufficient for now.

When paying out someone else, or paying out yourself. it should actually send the funds to that person.

we also need to make sure existing stripe credentials and subscriptions are connected to their respective profiles.

shawnlauzon commented 2 months ago

A few questions:

I see that there is an option to choose percentage or dollar amount. Does the percentage get converted immediately to a dollar amount, and then it's the dollar amount which is stored? If that's not the case, then it seems challenging to know the order of how things are applied. For example, if a payout is stored as 50%, and then after that another expense is add of $10, does that mean that the 50% is changed? Or does it mean 50% of whatever the current total is?

Also, what happens when the Send payouts button is pressed? It looks like there is an ability to edit and delete expenses / payouts: is that capability removed?

It looks like in the existing code, both a description and image is required. Is that still desired?

shawnlauzon commented 2 months ago

@cameronmurdock On further inspection and getting the code running, expenses can only be fixed while payouts can be either. Which makes sense, so that's resolved.

I have another question in addition to the others resolved: how should it handle when expenses are more than revenues? Should it only allow expenses to be added when they are below revenue? Should it allow expenses to be added before revenues are received (like a normal event), in which case what happens if the revenues do not meet or exceed the expenses? Same things applies for the payouts.

cameronmurdock commented 2 months ago

Good question. Expenses should never exceed revenue.

shawnlauzon commented 2 months ago

@cameronmurdock Great. How about these questions:

What happens when the Send payouts button is pressed? It looks like there is an ability to edit and delete expenses / payouts: is that capability removed?

It looks like in the existing code, both a description and image is required. Is that still desired?