@ -99,7 +99,9 @@ class StatisticsController extends CommonController
})->count();
$counts["orders_ongoing_in_today"] = (new Orders())->ofProject($project_id)->whereHas("audits", function($query) {
$query->whereRaw();
$query->whereRaw("DATEDIFF(`created_at`,now()) = 0")
->where("field_name","status")
->where("new_value", Orders::STATUS_ONGOING);
return response()->json(compact("counts"));