The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can I achieve this with userspice?
#1
For a client that owns a Club (120 members) that has also a restaurant, I need to create a member website with these features:

Admin side:

1. The admin should be able to create custom filed for the members (Adress 1, Adress 2, Company, etc. etc.)

"Budget" will be one of this custom field: every member has an amount of money when they join the club. Money they can use for restaurant etc.

2. The admin will have a "Add Bill" function where he can add Bills from the restaurant for every member. The amount of the Bill will be then detracted to the Members budget.

Example: The member Kevin White has a budget of 1000 Euros, he goes to the restaurant and spends 20. Actualized budget: 980 Euros.

The Admin can check the "History" of the bills/invoice for each user. Filter by date.

3. The admin will have a section called "Members" where he can see an overview of the members and the open bills they have to pay

4. The admin can creates events for members. The events can have maximum numbers of applications and every member can decide to come with someone.

5. The admin can send via email a report to the members with the Negativ "Balance".


Member side:

1. Every member will have an overview of the Bills from the restaurant

2. Every member can join events.

That's it. So my main question is:

Can I do this with userspice?

When yes can please you suggest me from where to start?


Many many many thanks Smile
  Reply
#2
Hi Antonio! You can definitely achieve this with UserSpice and the best thing about it is, you can do anything you want with it! We actually use UserSpice in the Customer Service Department of the company I work for, very heavily. We have it integrated with complex APIs and simple tasks for our agents, and it works excellent!

Might I suggest instead of having a static budget field, you use a ledger table instead, where you use positive and negative entries to balance a users budget.

My proposal:
-Negative is good, if a member deposits 1000 Euros to their budget, their displayed budget is -1000.00. So the entry on the add form would be -1000.
-Entries that are positive are contra-assets so they decrease the amount.
-Table structure:
CREATE TABLE IF NOT EXISTS ledger (
id int(11) NOT NULL,
users_id int(11) NOT NULL,
amount decimal(15,2) NOT NULL,
note varchar(500) NULL);

Any other columns you want to add just plug in there. You should also make a primary key and AI on the table.

Your overview page can use this query:
SELECT users_id, SUM(amount) amount FROM ledger GROUP BY users_id

Your drilldown page would just use SELECT id,amount,note FROM ledger WHERE users_id = ?,[USER ID HERE]

Your user drilldown page would just pre-fill the User ID.

The report I would recommend using the build in messaging system that has email notifications enabled.

Your event system you will need to do a bit more planning on how you want your structure to work.

Heres some documentation on the DB class:
https://userspice.com/documentation-db-class/

I also suggest taking the time to watch through these two playlists Dan created, as they provide a lot of information:
https://www.youtube.com/channel/UCxSAht_..._polymer=1
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)