@extends('layouts.front') @section('contents')
{{-- মেইন ইনভয়েস কার্ড --}}
{{-- ১. হেডার সেকশন (স্ট্যাটাস অনুযায়ী কালার চেঞ্জ হবে) --}}
{{-- ব্যাকগ্রাউন্ড ডেকোরেশন --}}
@if($orderStatus == 'Active')

পেমেন্ট সফল হয়েছে!

আপনার অর্ডারটি কনফার্ম করা হয়েছে

@elseif($orderStatus == 'Pending')

পেমেন্ট পেন্ডিং

অ্যাডমিন কনফার্মেশনের অপেক্ষায়

@else

পেমেন্ট ব্যর্থ

দুঃখিত, লেনদেনটি সম্পন্ন হয়নি

@endif
{{-- ২. কাস্টমার ও ইনভয়েস তথ্য --}}
গ্রাহক তথ্য
{{ $order->customer->name ?? 'Guest' }}

{{ $order->customer->phone ?? 'N/A' }}

{{ $order->customer->address ?? 'N/A' }}

অর্ডার তথ্য

ইনভয়েস: #{{ $order->order_number }}

তারিখ: {{ $order->created_at->format('d M, Y') }}

মেথড: {{ $order->payment_method }}

{{-- ৩. আইটেম টেবিল --}}
{{-- হোস্টিং প্যাকেজ --}} @if($hostingPlan) @php $userHosting = $userHosting ?? \App\Models\UserHosting::where('order_id', $order->id)->first(); $hostingCycle = optional($userHosting)->billing_cycle ?? 'Yearly'; $hostingAmount = (float) (optional($userHosting)->amount ?? ( \App\Services\DomainHostingPricingService::isMonthlyCycle($hostingCycle) ? $hostingPlan->price_monthly : $hostingPlan->price_yearly )); $hostingCycleBn = \App\Services\DomainHostingPricingService::isMonthlyCycle($hostingCycle) ? 'মাসিক' : 'বাৎসরিক'; @endphp @endif {{-- ডোমেইন --}}
বিবরণ ধরণ টাকা
{{ $hostingPlan->name }}
Hosting Package ({{ $hostingCycleBn }})
Hosting ৳ {{ number_format($hostingAmount, 2) }}
{{ $order->description }}
{{-- [LOGIC FIX] ডেসক্রিপশন চেক করে সাব-টাইটেল ঠিক করা --}}
@if(\Illuminate\Support\Str::contains($order->description, 'Hosting Order')) Linked / Existing Domain @else Domain Registration @endif
Domain @php $domainPrice = $order->total_amount - ($hostingAmount ?? 0); @endphp @if($domainPrice <= 0) ফ্রি / অন্তর্ভুক্ত @else ৳ {{ number_format($domainPrice, 2) }} @endif
{{-- ৪. পেমেন্ট সামারি (টোটাল, পেইড, ডিউ) --}}
সাব-টোটাল ৳ {{ number_format($order->total_amount, 2) }}
ডিসকাউন্ট ৳ 0.00
সর্বমোট ৳ {{ number_format($order->total_amount, 2) }}
{{-- পেইড এবং ডিউ হাইলাইট --}}
জমা (Paid) ৳ {{ number_format($order->paid_amount, 2) }}
@if($order->due_amount > 0)
বকেয়া (Due) ৳ {{ number_format($order->due_amount, 2) }}
@else
বকেয়া (Due) ৳ 0.00
@endif
{{-- ৫. ফুটার বাটনস --}} @if($orderStatus == 'Cancelled') @endif
@endsection