@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) @endif {{-- ডোমেইন --}}
বিবরণ ধরণ টাকা
{{ $hostingPlan->name }}
Hosting Package (Yearly)
Hosting ৳ {{ number_format($hostingPlan->price_yearly, 2) }}
{{ $order->description }}
{{-- [LOGIC FIX] ডেসক্রিপশন চেক করে সাব-টাইটেল ঠিক করা --}}
@if(\Illuminate\Support\Str::contains($order->description, 'Hosting Order')) Linked / Existing Domain @else Domain Registration (1 Year) @endif
Domain @php // ডোমেইন প্রাইস বের করা (মোট টাকা থেকে হোস্টিং বাদ দিয়ে) $hostingPrice = $hostingPlan ? $hostingPlan->price_yearly : 0; $domainPrice = $order->total_amount - $hostingPrice; @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