{{ __('Companies') }}

  • {{ __('Total') }} {{ \App\Models\Companies\Company::count() }}
  • {{ __('Clients') }} {{ \App\Models\Companies\Company::whereHas('clientContracts')->distinct()->count() }}
  • {{ __('Suppliers') }} {{ \App\Models\Companies\Company::whereHas('supplierContracts')->distinct()->count() }}

{{ __('Applications') }}

  • {{ __('Total/Confirmed') }} {{ \App\Models\Applications\Application::count() }}/{{ \App\Models\Applications\Application::whereHas('approvals', function ($query) { $query->whereNotNull('approved_at'); })->count() }}
  • {{ __('This Month/Confirmed') }} {{ \App\Models\Applications\Application::whereMonth('created_at', now()->month)->count() }}/{{ \App\Models\Applications\Application::whereMonth('created_at', now()->month)->whereHas('approvals', function ($query) { $query->whereNotNull('approved_at'); })->count() }}

{{ __('Supplier Contracts') }}

  • {{ __('Total') }} {{ App\Models\Contracts\SupplierContract::count() }}
  • {{ __('For the current month') }} {{ App\Models\Contracts\SupplierContract::whereMonth('created_at', now()->month)->count() }}

{{ __('Client Contracts') }}

  • {{ __('Total') }} {{ App\Models\Contracts\ClientContract::count() }}
  • {{ __('For the current month') }} {{ App\Models\Contracts\ClientContract::whereMonth('created_at', now()->month)->count() }}