@extends('front.practitioner.import.template.import') @section('content')
Loading…
@include('front.inner-layout.sidebar')
{{-- --}}

Payment details

{{ $clientName ?? '' }}'s plan summary - {{ $planDetails->plan_name ?? '' }}

@if($planDetails->course_name)

Course purchased - {{ $planDetails->course_name ?? '' }}

@endif @if($planDetails->package_name)

Package purchased - {{ $planDetails->package_name ?? '' }}

@endif
@php $output = ''; if ($planDetails->is_equal_instalment == 'on') { // Equal installments case $remaining_no_of_payment = $planDetails->breakdown_no_of_payments ?? 0; $remaining_amount = (float)($planDetails->breakdown_amount ?? 0); if ($remaining_no_of_payment > 0 && $remaining_amount > 0) { $output = "{$remaining_no_of_payment} x $" . number_format($remaining_amount, 2, '.', '') . ""; } } else { // First + Remaining case $first_emi_amount = (float)($planDetails->first_amount ?? 0); $remaining_no_of_payment = $planDetails->remaining_no_of_payment ?? 0; $remaining_amount = (float)($planDetails->remaining_amount ?? 0); if ($first_emi_amount > 0 && $remaining_no_of_payment > 0 && $remaining_amount > 0) { // Compare safely by rounding both to 2 decimals if (round($first_emi_amount, 2) == round($remaining_amount, 2)) { // Merge into one total $total_count = $remaining_no_of_payment + 1; $output = "{$total_count} x $" . number_format($remaining_amount, 2, '.', '') . ""; } else { // Show first separately + remaining $output = "1 x $" . number_format($first_emi_amount, 2, '.', '') . ", " . "{$remaining_no_of_payment} x $" . number_format($remaining_amount, 2, '.', '') . ""; } } } @endphp {{--

Payment frequency: 1 x $100, 5 x $25. 5 x $25

--}}

Payment frequency: {!! $output !!}

Total outstanding: ${{ $planDetails->account_balance ?? '0.00'}}

Start date: {{ $startDate ?? ''}}

End date: {{ $get_emi_details && $get_emi_details->end_emi_date ? \Carbon\Carbon::parse($get_emi_details->end_emi_date)->format('d/m/Y') : '' }}

@if(!empty($planDetails) && $planDetails->purchase_plan_mode === 'manual')

This plan has been paused after three failed payments. Access to any linked services has been restricted, and all future payments now need to be processed manually. Read more here.

@endif
@if(count($emiDetails ) > 0) @foreach($emiDetails as $key => $emi) @endforeach @else @endif {{-- --}}
# Due date Payment date Amount Status Actions
{{ $key+1 }} {{ $emi->next_emi_date ? \Carbon\Carbon::parse($emi->next_emi_date)->format('d/m/Y') : '-'}} {{ $emi->payment_date ? \Carbon\Carbon::parse($emi->payment_date)->format('d/m/Y') : '-'}} @if($planDetails->is_equal_instalment == 'off') {{-- If first EMI and remaining amount are different --}} @if($key == 0 && round($planDetails->first_amount, 2) != round($planDetails->remaining_amount, 2)) ${{ number_format($planDetails->first_amount, 2, '.', '') }} @else ${{ number_format($planDetails->remaining_amount, 2, '.', '') }} @endif @else {{-- Equal instalments --}} ${{ number_format($emi->next_emi_amount ?? 0, 2, '.', '') }} @endif {{ ucfirst($emi->pay_status ?? '') }}
No active payment plans
1 00/00/00 $100.00 Paid
1 00/00/00 $100.00 Paid
1 00/00/00 $100.00 Failed
1 00/00/00 $100.00 Failed

Billing details

{{--
--}} @if($get_client_card_details != '' && $get_client_card_details != null) @php if ($get_client_card_details->card_type == 'MASTERCARD') { $src = "assets/images/credit-img/master-card.png"; } else if ($get_client_card_details->card_type == 'VISA') { $src = "assets/images/credit-img/visa-card.png"; }else{ $src = ''; } @endphp
@else
No card on file
@endif
{{-- Add new --}} Add new card
@endsection @section('css') @endsection @section('css') @endsection @section('import-scripts') @endsection