|
@@ -2252,7 +2252,8 @@ WHERE
|
|
|
|
|
|
$countQuery = "
|
|
|
SELECT COUNT(*)
|
|
|
-FROM care_month join client on care_month.client_id = client.id
|
|
|
+FROM care_month
|
|
|
+ join client on care_month.client_id = client.id
|
|
|
left join note mrnote on client.most_recent_completed_mcp_note_id = mrnote.id
|
|
|
left join pro mcpPro on care_month.mcp_pro_id = mcpPro.id
|
|
|
left join pro rmmPro on care_month.rmm_pro_id = rmmPro.id
|
|
@@ -2263,6 +2264,7 @@ WHERE
|
|
|
" . (count($conditions) > 0 ? implode(" AND ", $conditions) : '') . "
|
|
|
";
|
|
|
|
|
|
+ dd($countQuery);
|
|
|
$countResult = DB::select($countQuery);
|
|
|
$total = $countResult[0]->count;
|
|
|
|