Date range wise report Display month wise, day wise, year wise report buttons (Added in version 3.0)

You can directly add month wise, day wise, year wise (calendar as well day duration wise) report buttons to generate the table data based on the date range. Please note it work for the CRUD table not for SQL as sql statement can be of anytype.

  
                                $pdocrud = new PDOCrud();
                                /**
                                * Add date range report buttons (eg daily ,monthly ,yearly report button)
                                * @param   string   $text                          Name/Text of the button
                                * @param   string   $type                          Type of the report to be generated.
                                * return   object                                  Object of class
                                */
                                $pdocrud->addDateRangeReport("This Year", "calendar_year", "order_date");
                                $pdocrud->addDateRangeReport("This Month", "calendar_month", "order_date");
                                $pdocrud->addDateRangeReport("Last 365 days", "year", "order_date");
                                $pdocrud->addDateRangeReport("Last 30 days", "month", "order_date");
                                $pdocrud->addDateRangeReport("1 Day", "Last 1 day", "order_date");
                                $pdocrud->addDateRangeReport("Today", "today", "order_date");
                                echo $pdocrud->dbTable("orders")->render();
                                

Orders

Showing 1 to 10 of 85 entries

# ID Order no Order date Customer name Order amount Order status Actions
1 51 37429 2021-03-11 Xenos Clarke 78 Completed
2 52 1234567 2016-09-08 Xenos Clarke 26 Completed
3 55 83323 2016-09-08 Xenos Clarke 37 Completed
4 56 409 2016-09-08 Cooper Jensen 68 Completed
5 57 50683 2016-09-08 Deacon Tyson 28 Completed
6 59 48121 2016-09-08 1 Completed
7 61 37748 2016-09-08 Cooper Jensen 73 Completed
8 63 37920 2016-09-08 67 Completed
9 64 28431 2016-09-08 5 Completed
10 65 94701 2016-09-08 25 Completed
# ID Order no Order date Customer name Order amount Order status Actions