mirror of
https://github.com/grocy/grocy.git
synced 2026-03-28 07:39:25 +01: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'];
|
||||
$endDate = $request->getQueryParams()['end_date'];
|
||||
$where = " AND pph.purchased_date BETWEEN '$startDate' AND '$endDate'";
|
||||
$where .= " AND pph.purchased_date BETWEEN '$startDate' AND '$endDate'";
|
||||
}
|
||||
else
|
||||
{
|
||||
// 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';
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user