Closed RiskingTime closed 6 years ago
For this update I will need to add a new field to the investments
table (most likely a JSON object), in order to store these statistics with the investment for the current period, and then add a new API function to retrieve the desired data. This will be added to the investment plugin. Then we will need to update the dividend payment process to store these aggregate values during the dividend payment process:
Finally, new functionality to generate the table will be added to the admin page code in order to build and display the table.
I would estimate this to take approximately 3 hours to complete.
To recap:
the second table should show a list of bankroll distribution transactions with associated details. the table should have the following columns (date, description, gross dividend, rake amount, net dividend, balance). The "description" column should show which investment the transaction is from (i.e. "bankroll" dividend), the "gross dividend" is the total amount that the investment made during the period (i.e. the amount before rake is removed), the "rake amount" should show the amount that was raked from the gross dividend, and the net dividend should show the net amount attributable to bankroll investors (gross - rake = net). The "balance" column should show the balance of the investment at the time the transaction occurred.
it should also be noted, that for each period, the rake amount listed in the "rake transactions" table should equal the number for rake listed in the "bankroll distributions" table. it should also be noted that if no games were played since the bankroll distribution was made, the amount in the "balance" column of the "bankroll distributions" table should equal the number displayed as the current value of the bankroll on the stats page.
things to add
As mentioned in a previous comment, this work involve mainly updates to the investment plugin and the addition of a new table to the admin page and source code.
I would break this into two pieces consisting of 3 hours each (6 hours total):
Prior to embarking on this task I would extract the dividend payment process into its own file and include it in the investment plugin as an external module. This will allow us to begin the process of breaking up some of the larger sections of code such as the one being affected here.
yes, please proceed,
Minor revision and notes:
Move Dividend Transactions table before balance sheet on Admin page. When crediting dividend affiliates, immediately update affiliate account available balance (not investment since affiliate may no have one)
The updates have been committed (https://github.com/CoinRoster/slotmachine/commit/2bdbde06dcbe58c392398ed163b1a6b57b255d84) and pushed to the development server where they may be reviewed now. Please note that the database hasn't been cleared for testing yet so there will be some incorrect or missing items in the transaction histories (simply missing data in previous versions of this update).
ok thanks, I'm closing this issue for now, but I will continue to test and monitor. I will post/update issues for related bugs/functions that came up while working on this issue
see explanation #41
@Patrick-Bay if necessary, can you provide a summary of what needs to be done, with a estimate of time required?