浏览代码

MCP dashboard stats - unsigned rpm bills - show unsigned bills from last 60 days

Vijayakrishnan 2 年之前
父节点
当前提交
535abe6611
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      app/Models/Pro.php

+ 1 - 2
app/Models/Pro.php

@@ -702,8 +702,7 @@ FROM care_month join client on care_month.client_id = client.id join note mrnote
      )
 WHERE
       care_month.mcp_pro_id = {$this->id}
-      AND EXTRACT(MONTH from care_month.start_date) = EXTRACT(MONTH from now())
-      AND EXTRACT(YEAR from care_month.start_date) = EXTRACT(YEAR from now())
+      AND bill.created_at::date >= NOW()::date - interval '60 days'
       AND care_month.mcp_rm_generic_bill_id IS NOT NULL
       AND bill.is_signed_by_generic_pro IS NOT TRUE
 ";