@extends('layouts.app') @section('title', 'Site Managers Report') @section('content')
@if(session('success'))
{{ session('success') }}
@endif @if ($errors->any())
{!! implode('
', $errors->all(':message')) !!}
@endif

Total Site Managers

has('from')) onfocus="this.type='date'" onblur="if(this.value===''){this.type='text'}" @else type="date" @endif class="form-control bg-white" placeholder="From" name="from" value="@if(request()->has('from')){{request()->from}}@endif" />
has('to')) onfocus="this.type='date'" onblur="if(this.value===''){this.type='text'}" @else type="date" @endif class="form-control bg-white" placeholder="To" name="to" value="@if(request()->has('to')){{request()->to}}@endif" />
@if(!request()->has('from'))

Showing results from past 90 days.

@endif @php $totalManagers = 0 @endphp
@foreach($users as $user) @if($user->projects->count()>0)
@foreach($user->projects as $project) @php $plant = 0; $labour = 0; $material = 0; $subcontract = 0; $other = 0; $sales_net = 0; $sub_contracts_total = 0; $sub_contracts_other_total = 0; $estimated_net = 0; $po_total_plant = 0; $po_total_material = 0; $po_total_labour = 0; $po_total = 0; $estimated_gross_profit = 0; $actual_gross_profit = 0; @endphp @if($project->tender==1) @else @endif @endforeach
{{ $user->firstname }} {{ $user->lastname }}
Project Total Sales Estimated Gross Profit Actual Gross Profit
WG-{{ str_pad($project->id, 4, '0', STR_PAD_LEFT) }} • {{ $project->title }} £{{ number_format($sales_net, 2) }} £{{ number_format($estimated_gross_profit, 2) }} £{{ number_format($actual_gross_profit, 2) }}
@php $totalManagers++; @endphp @endif @endforeach
@endsection @section('js') @endsection