瀏覽代碼

fix bug

3.x
Andrew Wallo 4 月之前
父節點
當前提交
5076fd4b1c
共有 1 個文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      app/Services/ReportService.php

+ 2
- 0
app/Services/ReportService.php 查看文件

@@ -968,6 +968,7 @@ class ReportService
968 968
                 ->whereNotIn('status', [InvoiceStatus::Draft, InvoiceStatus::Void])
969 969
                 ->whereNotNull('approved_at')
970 970
                 ->whereNotNull('paid_at')
971
+                ->whereHas('client')
971 972
                 ->with(['client:id,name'])
972 973
                 ->get()
973 974
                 ->groupBy('client_id'),
@@ -975,6 +976,7 @@ class ReportService
975 976
                 ->whereBetween('date', [$startDate, $endDate])
976 977
                 ->whereNotIn('status', [BillStatus::Void])
977 978
                 ->whereNotNull('paid_at')
979
+                ->whereHas('vendor')
978 980
                 ->with(['vendor:id,name'])
979 981
                 ->get()
980 982
                 ->groupBy('vendor_id'),

Loading…
取消
儲存