@extends('layouts.app') @section('title', $customer->name) @section('content')
{{ $customer->name }} {{ $customer->code }}
{{ __('app.edit') }}
@csrf
@if($customer->photo) @else
@endif
{{ $customer->name }}
{{ $customer->phone }}
{{ money($customer->total_purchases) }}
{{ __('customers.total_purchases') }}
{{ money($customer->balance) }}
{{ __('customers.balance') }}
QR
{{ __('customers.attachments') }}
@foreach($customer->attachments as $file) {{ $file->name }} @endforeach
@csrf
@csrf
{{ __('prescriptions.od') }}
{{ __('prescriptions.os') }}
@forelse($customer->prescriptions->sortByDesc('date') as $rx)
{{ $rx->date->format('Y-m-d') }} @if($rx->doctor)— {{ $rx->doctor }}@endif
SPHCYLAXISPRISMADD
OD{{ $rx->od_sphere }}{{ $rx->od_cylinder }}{{ $rx->od_axis }}{{ $rx->od_prism }}{{ $rx->od_add }}
OS{{ $rx->os_sphere }}{{ $rx->os_cylinder }}{{ $rx->os_axis }}{{ $rx->os_prism }}{{ $rx->os_add }}
PD: {{ $rx->pd_distance }} / {{ $rx->pd_near }} @if($rx->lens_type) — {{ $rx->lens_type }}@endif @if($rx->notes) — {{ $rx->notes }}@endif
@empty

{{ __('app.no_data') }}

@endforelse
@forelse($customer->sales->sortByDesc('date') as $sale) {{ $sale->number }} — {{ $sale->date->format('Y-m-d') }} {{ money($sale->total) }} @empty

{{ __('app.no_data') }}

@endforelse
@forelse($customer->orders->sortByDesc('created_at') as $order) {{ $order->number }} {{ order_status_label($order->status) }} @empty

{{ __('app.no_data') }}

@endforelse
@csrf
@forelse($customer->visits->sortByDesc('created_at') as $visit)
{{ $visit->created_at->format('Y-m-d H:i') }} — {{ $visit->user->name ?? '' }}
{{ $visit->notes }}
@empty

{{ __('app.no_data') }}

@endforelse
@endsection