The monthly report generation method is fixed and single. now, you need to calculate the monthly sales, browsing, commission, settlement, and other parameters for each product.
When I got the requirement, I thought of generating a data every month for each product, which is convenient no matter where it is queried, and there is no need to calculate each query.
Solution 1: Write a scheduled task, which is generated at the end of each month. However, you need to manage the scheduled task,
Solution 2: provide a button in the background to "generate a Bill". click it to calculate the monthly bill for the current month,
Could you have a better solution for this kind of monthly report? thank you.
Reply to discussion (solution)
You can also create a view
PHP calls the database view or stored procedure for implementation. the monthly report data is collected and the display format is generated using PHP.