02-05-2018, 11:14 AM
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
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