@php($statusLabels=['draft'=>'Rascunho','in_production'=>'Em produção','ready'=>'Pronta','delivered'=>'Entregue','cancelled'=>'Cancelada'])
Voltar

{{ $order->company->trade_name ?: $order->company->name }}

{{ $order->company->cnpj ? 'CNPJ '.$order->company->cnpj : '' }}
{{ collect([$order->company->street,$order->company->number,$order->company->district,$order->company->city,$order->company->state])->filter()->implode(', ') }}
{{ collect([$order->company->phone,$order->company->email])->filter()->implode(' · ') }}

ORDEM DE SERVIÇO

{{ $order->code }}
Pedido: {{ $order->ordered_at?->format('d/m/Y') }}
Previsão: {{ $order->promised_at?->format('d/m/Y') ?: 'não definida' }}
Status: {{ $statusLabels[$order->status] ?? $order->status }}

Cliente

{{ $order->customer->name }}
CPF: {{ $order->customer->cpf ?: 'não informado' }}
Telefone: {{ $order->customer->phone ?: $order->customer->whatsapp ?: 'não informado' }}
{{ $order->customer->email ?: '' }}
{{ collect([$order->customer->street,$order->customer->number,$order->customer->district,$order->customer->city,$order->customer->state])->filter()->implode(', ') }}
@if($order->prescription || $order->pupilMeasurement)

Receita e medidas para confecção

@if($order->prescription)
OlhoEsféricoCilíndricoEixoAdiçãoDNP
OD{{ $order->prescription->od_sphere ?? '—' }}{{ $order->prescription->od_cylinder ?? '—' }}{{ $order->prescription->od_axis ?? '—' }}{{ $order->prescription->od_addition ?? '—' }}{{ $order->prescription->od_dnp ?? '—' }}
OE{{ $order->prescription->oe_sphere ?? '—' }}{{ $order->prescription->oe_cylinder ?? '—' }}{{ $order->prescription->oe_axis ?? '—' }}{{ $order->prescription->oe_addition ?? '—' }}{{ $order->prescription->oe_dnp ?? '—' }}
@endif @if($order->pupilMeasurement)

Medidas: DNP OD {{ $order->pupilMeasurement->od_dnp ?? '—' }} mm · DNP OE {{ $order->pupilMeasurement->oe_dnp ?? '—' }} mm · DP {{ $order->pupilMeasurement->binocular_pd ?? '—' }} mm · Altura OD {{ $order->pupilMeasurement->od_height ?? '—' }} mm · Altura OE {{ $order->pupilMeasurement->oe_height ?? '—' }} mm.

@endif
@endif

Itens

@foreach($order->items as $item)@endforeach
DescriçãoQtd.UnitárioTotal
{{ $item->description }}@if($item->notes)
{{ $item->notes }}
@endif
{{ number_format((float)$item->quantity,3,',','.') }}R$ {{ number_format((float)$item->unit_price,2,',','.') }}R$ {{ number_format((float)$item->total_amount,2,',','.') }}
SubtotalR$ {{ number_format((float)$order->subtotal,2,',','.') }}
DescontoR$ {{ number_format((float)$order->discount,2,',','.') }}
TotalR$ {{ number_format((float)$order->total_amount,2,',','.') }}
@if($order->notes)

Observações

{!! nl2br(e($order->notes)) !!}
@endif
Cliente / responsável
Responsável pela ótica