@php $allSettings = \App\Models\Setting::getAllAsArray(); $currencySymbol = $allSettings['currency_symbol'] ?? '₹'; $currencyPosition = $allSettings['currency_position'] ?? 'before'; @endphp @include('Partials.sidebar')
@include('Partials.header')

Payment Plans

  1. Payment Plans
{{-- Flash alerts --}} @foreach(['success','error'] as $type) @if(session($type))
{{ session($type) }}
@endif @endforeach
All Plans {{ $plans->count() }}
New Plan
@if($plans->isEmpty())
No payment plans yet. Create one
@else
@foreach($plans as $plan)
{{-- Header --}}
{{ $plan->name }}
@if($plan->description)
{{ $plan->description }}
@endif
{{-- Summary pills --}}
{{ $plan->milestones->count() }} milestones @php $total = $plan->milestones->sum('percentage'); @endphp @if($total > 0) {{ number_format($total, 0) }}% mapped @endif {{ $plan->is_active ? 'Active' : 'Inactive' }}
{{-- Milestone timeline --}}
@foreach($plan->milestones as $i => $m)
{{ $m->label }}
{{ \App\Models\PaymentPlanMilestone::typeLabel($m->type) }} @if($m->percentage) {{ $m->percentage }}% @endif @if($m->installment_count && $m->installment_interval) × {{ $m->installment_count }} {{ $m->installment_interval }} @endif @if($m->due_date) {{ $m->due_date->format('M Y') }} @endif
@if($m->note)
{{ $m->note }}
@endif
@if(!$loop->last)
@endif @endforeach
{{-- Footer actions --}}
@endforeach
@endif
@include('Partials.footer')