@php $establishment = $document->user->establishment; $customer = $document->customer; $tittle = str_pad($document->id, 8, '0', STR_PAD_LEFT); $logo = "storage/uploads/logos/{$company->logo}"; if(property_exists($establishment, 'logo')) { if($establishment->logo) { $logo = "{$establishment->logo}"; } } // dd($document->items); @endphp {{--{{ $tittle }}--}} {{----}} @if($company->logo)
{{$company->name}}
{{--@else--}} {{--
--}} {{----}} {{--
--}} @endif {{----}} @isset($establishment->trade_address) @endisset @isset($establishment->web_address) @endisset @isset($establishment->aditional_information) @endisset

{{ $company->name }}

{{ $company->trade_name }}
{{ 'RUC '.$company->number }}
{{ ($establishment->address !== '-')? $establishment->address : '' }} {{ ($establishment->district_id !== '-')? ', '.$establishment->district->description : '' }} {{ ($establishment->province_id !== '-')? ', '.$establishment->province->description : '' }} {{ ($establishment->department_id !== '-')? '- '.$establishment->department->description : '' }}
{{ ($establishment->trade_address !== '-')? 'D. Comercial: '.$establishment->trade_address : '' }}
{{ ($establishment->telephone !== '-')? 'Central telefónica: '.$establishment->telephone : '' }}
{{ ($establishment->email && $establishment->email !== '-')? 'Email: '.$establishment->email : '' }}
{{ ($establishment->web_address !== '-')? 'Web: '.$establishment->web_address : '' }}
{{ ($establishment->aditional_information !== '-')? $establishment->aditional_information : '' }}

SERVICIO TÉCNICO

{{ $tittle }}

@if ($customer->address !== '') @endif
Cliente: {{ $customer->name }}
{{ $customer->identity_document_type->description }}: {{ $customer->number }}
Dirección: {{ $customer->address }} {{ ($customer->district_id !== '-')? ', '.$customer->district->description : '' }} {{ ($customer->province_id !== '-')? ', '.$customer->province->description : '' }} {{ ($customer->department_id !== '-')? '- '.$customer->department->description : '' }}
Celular: {{ $document->cellphone }}
N° Serie: {{ $document->serial_number }}
Fecha de emisión: {{ $document->date_of_issue->format('Y-m-d') }}
@if($document->activities) @endif
Descripción:
{{ $document->description }}
Estado:
{{ $document->state }}
Motivo:
{{ $document->reason }}
Actividades realizadas:
{{ $document->activities }}
COSTO DEL SERVICIO: {{ number_format($document->cost, 2) }}
PAGO ADELANTADO: {{ number_format($document->prepayment, 2) }}
SALDO A PAGAR: {{ number_format($document->cost - $document->prepayment, 2) }}