瀏覽代碼

Merge branch 'master' into dev-vj

Vijayakrishnan 3 年之前
父節點
當前提交
76813424a2

+ 4 - 2
app/Http/Controllers/PracticeManagementController.php

@@ -821,13 +821,15 @@ class PracticeManagementController extends Controller
 
         $now = Carbon::now();
         $startOfCurrentMonth = $now->startOfMonth('Y-m-d');
-        $endOfCurrentMonth = $now->endOfMonth()->format('Y-m-d');
+        $startOfCurrentMonth = $startOfCurrentMonth->toDateString();
+
+        $endOfCurrentMonth  = $now->endOfMonth()->format('Y-m-d');
 
         $rows = DB::table('pro')
         ->selectRaw(" *,
             (SELECT id FROM note WHERE note.hcp_pro_id = pro.id AND is_cancelled = false ORDER BY created_at DESC LIMIT 1) as last_note_id, 
             (SELECT note.created_at FROM note WHERE note.hcp_pro_id = pro.id AND note.is_cancelled = false ORDER BY note.created_at DESC LIMIT 1) as last_note_created_at,
-            (SELECT COUNT(*) FROM note WHERE note.hcp_pro_id = pro.id AND note.is_cancelled = false AND created_at >= '${startOfCurrentMonth}'::DATE AND created_at <= '${endOfCurrentMonth}'::DATE ) AS notes_this_month,
+            (SELECT COUNT(*) FROM note WHERE note.hcp_pro_id = pro.id AND note.is_cancelled = false AND created_at::DATE >= '${startOfCurrentMonth}'::DATE AND created_at::DATE <= '${endOfCurrentMonth}'::DATE ) AS notes_this_month,
             (SELECT COUNT(*) FROM note WHERE note.hcp_pro_id = pro.id AND note.is_cancelled = false AND created_at >= '${from_date}'::DATE AND created_at <= '${to_date}'::DATE  ) AS notes_this_period");
 
         $prosIDs = $request->get('pros_ids');

+ 1 - 1
resources/views/app/practice-management/hcp-note-activity.blade.php

@@ -27,7 +27,7 @@
     }
 
     .sm-section {
-        width: 125px !important;
+        width: 200px !important;
     }
 </style>