@php($statuses = Modules\Contracts\Models\ContractStatus::class)
@foreach ($contracts as $contract) reward = GetAgentPaymentForContract($contract); //$contract->reward = $contract->reward ? $contract->reward : 0; $reward = Number::forHumans($contract->reward, precision: 2); $reward = str_replace('million', 'млн', $reward); $reward = str_replace('thousand', 'тыс', $reward); $reward = $reward . ' ₽'; $reward = str_replace(' ', ' ', $reward); ?> @if ($contract->status == 'TREATY') @else @endif @endforeach
Клиент ЖК Площадь Сумма Статус
@php($clients = $contract->deal->clients) @foreach ($clients as $client)
{{ $client->name }}
@endforeach
Жилой комплекс {{ $contract->deal->complex->name }}
Площадь
{{ $contract->square }} м2
{{ $contract->deal->complex->name }} {{ $contract->square }} price, precision: 2); $price = str_replace('million', 'млн', $price); $price = str_replace('thousand', 'тыс', $price); $price = $price . ' ₽'; $price = str_replace(' ', ' ', $price); ?> {!! $price !!}
Стоимость {!! $price !!}
{{ $statuses::getName($contract->status) }}