kalenjordan / custom-reports

Custom Magento reports using SQL
http://magemail.co/free-custom-reports-module-for-magento/
Other
143 stars 65 forks source link

Date range filter #73

Open antoniosemeraroF opened 7 years ago

antoniosemeraroF commented 7 years ago

Is it possible to set a specific date range filter? For example, the SQL query is: `select count(mg_sales_flat_shipment.order_id) as 'NumeroOrdiniSpediti', sum(mg_sales_flat_order.base_grand_total) as 'TotaleSpedito', concat(DAY(mg_sales_flat_shipment.created_at), '-',MONTH(mg_sales_flat_shipment.created_at)) as 'Data'

FROM mg_sales_flat_shipment left join mg_sales_flat_order on mg_sales_flat_order.entity_id = mg_sales_flat_shipment.order_id

group by day(mg_sales_flat_shipment.created_at)`

I want filter the result in a date range. In the grid configuration, i put this: { "filterable": {"Data": "adminhtml/widget_grid_column_filter_date"} } But the filter doesn't work.

Thanks

dtamajon commented 7 years ago

widget_grid_column_filter_date does not "understand" dates in format d-m. In that case, you should write your own grid column filter.