take data from the table "history" (group by user, order by sum).
add a field (balance) to the "user" table - the default value 0.00 (double)
to store balance in this field, and then admin just insert it manually (for now), when the money is paid by user. Calculation for user.balance = balance (user table) - sum (history table).
(it would depends on future payment history of transactions).
Data can be modified, and viewed by admin only.
Users balance page includes:
take data from the table "history" (group by user, order by sum).
add a field (balance) to the "user" table - the default value 0.00 (double) to store balance in this field, and then admin just insert it manually (for now), when the money is paid by user. Calculation for user.balance = balance (user table) - sum (history table). (it would depends on future payment history of transactions). Data can be modified, and viewed by admin only.