Explorar o código

DB Stat fix: Notes Pending Signature

Vijayakrishnan %!s(int64=3) %!d(string=hai) anos
pai
achega
5a9198b2a0
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      app/Models/Pro.php

+ 3 - 3
app/Models/Pro.php

@@ -344,9 +344,9 @@ class Pro extends Model
     }
 
     function get_notes_pending_signature_count_as_mcp() {
-        $query = Client::whereNull('shadow_pro_id');
-        return $query->where('mcp_pro_id', $this->id)
-            ->where('has_mcp_done_onboarding_visit', '!=', 'YES')
+        return Note::where('hcp_pro_id', $this->id)
+            ->where('is_cancelled', '<>', true)
+            ->where('is_signed_by_hcp', '<>', true)
             ->count();
     }