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…
Отказ
Запис