mirror of
https://github.com/grocy/grocy.git
synced 2026-04-03 03:19:26 +02:00
Fix SQL query
This commit is contained in:
parent
83c1cf0160
commit
be513122fa
|
|
@ -14,12 +14,12 @@ class StockReportsController extends BaseController
|
||||||
{
|
{
|
||||||
$startDate = $request->getQueryParams()['start_date'];
|
$startDate = $request->getQueryParams()['start_date'];
|
||||||
$endDate = $request->getQueryParams()['end_date'];
|
$endDate = $request->getQueryParams()['end_date'];
|
||||||
$where = " AND pph.purchased_date BETWEEN '$startDate' AND '$endDate'";
|
$where .= " AND pph.purchased_date BETWEEN '$startDate' AND '$endDate'";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Default to this month
|
// Default to this month
|
||||||
$where = " AND pph.purchased_date >= DATE(DATE('now', 'localtime'), 'start of month')";
|
$where .= " AND pph.purchased_date >= DATE(DATE('now', 'localtime'), 'start of month')";
|
||||||
}
|
}
|
||||||
|
|
||||||
$groupBy = 'product';
|
$groupBy = 'product';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user