Browse Source

fix bug

3.x
Andrew Wallo 4 months ago
parent
commit
5076fd4b1c
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      app/Services/ReportService.php

+ 2
- 0
app/Services/ReportService.php View File

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

Loading…
Cancel
Save