@extends('layouts.app') @section('content')
@foreach ($companies as $item) @php $printerCount = $item->printers->filter(function($printer) { return $printer->deleted_at === null && $printer->hasTrackingSections(); })->count(); $printerPrice = $printerCount * $prices['printer']; $userCount = $item->users->filter(function($user) { return $user->deleted_at === null; })->count(); $userPrice = $userCount >= 2 ? ($userCount - 2) * $prices['user'] : 0; @endphp @endforeach
No İşletme Mevcut Abonelik Olması Gereken Temel Ücret Yazıcı Kullanıcı Otel Ent. Adisyon Sayısı
{{ $loop->iteration}} {{ $item->name}} {{ collect($item->subscriptions)->whereNull('deleted_at')->sum('price') }} {{ $prices['base'] + $printerPrice + $userPrice + ($item->sabee_hotel_id ? $prices['hotel'] : 0) }}TRY {{ $prices['base'] }}TRY ({{ $printerCount }}x{{ $printerPrice }}) - {{ $printerPrice }}TRY ({{ $userCount }}x{{ $userPrice }}) - {{ $userPrice }}TRY {{ $item->sabee_hotel_id ? $prices['hotel'] : null }}TRY {{ number_format((new \App\Models\Sale())->getLast365DaysSalesCount($item->id), 0, ',', '.') }} KONTÖR
@endsection