@extends('layouts.app') @section('title', $plan->title) @section('content') @php($pr = $plan->progress())

๐Ÿ“‹ {{ $plan->title }}

{{ $plan->patient->full_name }} ยท {{ $plan->dentist->name }}
{{ $plan->status->label() }} ๐Ÿ“„ PDF @if($plan->items->isNotEmpty() && $plan->patient->whatsapp_opt_in) @can('treatment-plans.manage')
@csrf
@endcan @endif
@can('update', $plan)
@foreach($statuses as $s) @if($plan->status->canTransitionTo($s))
@csrf @method('PATCH')
@endif @endforeach
@endcan
@forelse($plan->items as $item) @empty @endforelse
{{ __('Procedure') }}{{ __('Tooth') }} {{ __('Price') }}{{ __('Status') }}
{{ $item->procedure->name() }} @if($item->note)
{{ $item->note }}
@endif
@if($item->tooth) {{ $item->tooth }} @if($item->surfaces){{ implode(',', $item->surfaces) }}@endif @else โ€” @endif {{ number_format($item->price) }} {{ $item->status->label() }} @can('update', $plan) @if($item->status !== \App\Enums\PlanItemStatus::Completed && $item->status !== \App\Enums\PlanItemStatus::Cancelled)
@csrf
@csrf
@endif @endcan
{{ __('No items yet โ€” add the first procedure below.') }}
@can('update', $plan) @if(! in_array($plan->status, [\App\Enums\TreatmentPlanStatus::Completed, \App\Enums\TreatmentPlanStatus::Cancelled]))

+ {{ __('Add item') }}

@csrf
{{ __('Surfaces') }}: @foreach(config('dental.surfaces') as $s)
@endforeach
@endif @endcan

{{ __('Summary') }}

{{ __('Progress') }}
{{ $pr['done'] }}/{{ $pr['total'] }} {{ __('items') }}
{{ __('Subtotal') }}
{{ number_format($plan->totalGross()) }} IQD
{{ __('Discount') }}
โˆ’ {{ number_format($plan->discount_amount) }} IQD
{{ __('Total') }}
{{ number_format($plan->totalNet()) }} IQD
@can('update', $plan)
@csrf @method('PATCH')
@endcan @if($plan->notes)

{{ $plan->notes }}

@endif
๐Ÿฆท {{ __('Open dental chart') }} @can('invoices.manage') @if($plan->items->isNotEmpty())
@csrf
@endif @endcan
@push('page-scripts') @endpush @endsection