@extends('layouts.app') @section('content')

{{$site->name}}    (ID: {{$site->id}})

@if(session('search_route')) @endif @if($superAdminOnly) @endif

{{__("Name")}}:

{{$site->name}}

TIS ID:

{{$site->tis_id}}

{{__("Contact person")}}:

{{$site->contact_person}}

{{__("Phones")}}:

@if($site->tel1) {!! nl2br('Fiksni: '.$site->tel1." \n")!!} @endif @if($site->tel2) {!! 'Mob: '.nl2br($site->tel2." \n") !!} @endif

{{__("Address")}}:

{{$site->address}}

{{__("State")}}:

{{$site->state}}

{{__("City")}}:

{{$site->city}}

{{__("Area")}}:

{{$site->area}}

{{__("Status")}}:

{{$site->status}}

@if($superAdminOnly)

{{__("Currency")}}:

{{$site->currency}}

{{__("Discount")}}:

{{$site->discount_percent}}%

{{__("Discount")}} {{__("client")}}:

{{$site->discount_percent_customer}}%

{{__("Transport")}}:

{{$site->transport_costs}}%

{{__("Contractor")}}:

{{$site->contractor}}

@else

{{__("Worker")}}:

{{$site->builder_name.' '.$site->builder_surname}}

{{__("Currency")}}:

{{$site->currency}}

{{__("Worker")}}:

{{$site->builder_name.' '.$site->builder_surname}}

@endif

{{__("Appointment date")}}:

@if($site->appointment_date){{date('d.m.Y. H:i', strtotime($site->appointment_date))}} @endif

{{__("Delay date")}}:

@if($site->delay_date){{date('d.m.Y. H:i', strtotime($site->delay_date))}} @endif

{{__("Realization date")}}:

@if($site->realization_date){{date('d.m.Y.', strtotime($site->realization_date))}} @endif

{{__("Withdrawal date")}}:

@if($site->withdrawal_date){{date('d.m.Y.', strtotime($site->withdrawal_date))}} @endif

{{__("Project manager")}}:

{{$site->project_manager}}

{{__('Construction manager')}}:

{{$site->construction_manager_name.' '.$site->construction_manager_surname}}

{{__('Cluster')}}:

{{$site->cluster}}

Odo:

{{$site->odo}}

Izvod:

{{$site->izvod}}

{{__('Connector')}}:

{{$site->connector}}

{{__('Creation date')}}:

@if($site->created_at){{date('d.m.Y.', strtotime($site->created_at))}} @endif

@if(count($history) >= 1)
@endif
@if(!$comments->isEmpty())

{{__("Comments")}}

@foreach($comments as $br=>$comment) {{__("comment")}} {{$br+1}}

{{$comment->comment}}

{{$comment->ime.' '.$comment->prezime}} {{date('d.m.Y. H:i:s', strtotime($comment->created_at))}}
@endforeach
@endif @if(!$images->isEmpty())

{{__("Images")}}

@foreach($images as $img) @endforeach
@endif @if(!$files->isEmpty())

{{__("Files")}}

@foreach($files as $file) @endforeach
@endif @if(!$equipment->isEmpty())

{{__("Equipment")}}

@foreach($equipment as $equip) @if ($superAdminOnly) @else @endif @endforeach @if($superAdminOnly) @else @endif
{{__("Equipment")}} {{__("Quantity")}} {{__("Price")}} {{__("Total")}}
{{$equip->equipment}} {{$equip->quantity}}{{number_format($equip->price, 2, ',', '.')}} {{number_format($equip->sum, 2, ',', '.')}}/ /
{{__("Total")}}: {{number_format($equipmentSum, 2, ',', '.')}}/
@endif @if(!$works->isEmpty())

{{__("Works")}}

@foreach($works as $work) @if ($superAdminOnly) @else @endif @endforeach @if($superAdminOnly) @else @endif
{{__("Works")}} {{__("Quantity")}} {{__("Unit")}} {{__("Price")}} {{__("Total")}}
{{$work->work}} {{$work->quantity}} {{$work->unit_short}}{{number_format($work->price, 2, ',', '.')}} {{number_format($work->sum, 2, ',', '.')}}/ /
{{__("Total")}}: {{number_format($workSum, 2, ',', '.')}}/
@endif @if($superAdminOnly) @if(!$equipment->isEmpty() || !$works->isEmpty())

{{__("Total")}}

{{__("Type")}} {{__("Total")}} {{__("Discount")}} 1 {{__("Discount")}} 2 {{__("Transport")}} {{__("Profit")}}
{{__("Equipment")}} + {{__("Works")}} {{number_format($total, 2, ',', '.')}} @if($site->discount_percent){{$site->discount_percent.'%'}} @else 0% @endif @if($site->discount_percent_customer){{$site->discount_percent_customer.'%'}} @else 0% @endif @if($site->transport_costs){{$site->transport_costs.'%'}} @else 0% @endif {{number_format($profit, 2, ',', '.')}}
@endif @endif @endsection