{{-- resources/views/admin/orders/invoice.blade.php --}} Order Invoice
@foreach($items as $item) @php $subTotal = 0; @endphp
{{-- Header / Logo --}}
logo
{{ $info->site_name }}
{{ $info->address }}
Invoice
ID: #{{ $item->invoice_no }}
Order Summary
{{-- Bill To / Meta --}}
Invoice To
{{ $item->first_name }} {{ $item->last_name }}
{{ $item->shipping_address }}
Phone: {{ $item->mobile }}
Invoice#{{ $item->invoice_no }}
Date{{ dateFormate($item->date) }}
Created{{ $item->created_at->diffForHumans() }}
{{-- Items --}}
@foreach($item->details as $idx => $detail) @php $var = optional($detail->variation); // Unit price: order_details.unit_price > variation.after_discount_price > variation.price $unitPrice = $detail->unit_price ?? ($var->after_discount_price ?? ($var->price ?? 0)); $qty = (int)($detail->quantity ?? 0); $rowTotal = $unitPrice * $qty; $subTotal += $rowTotal; $colorLabel = optional($var->color)->name; $sizeLabel = optional($var->size)->title; if($colorLabel === 'Default'){ $colorLabel = ''; } if($sizeLabel === 'free'){ $sizeLabel = ''; } $desc = trim( ($detail->product->name ?? '').' '.($detail->productsize->title ?? '') ); @endphp @endforeach
SL. Item Description Color Size Price Qty Total
{{ $idx+1 }} {{ $desc }} {{ $colorLabel }} {{ $sizeLabel }} {{ priceFormate($unitPrice) }} {{ $qty }} {{ priceFormate($rowTotal) }}
{{-- Note + Totals (NO DISCOUNT LINE) --}}
@php $orderNote = trim($item->note ?? ''); @endphp @if($orderNote !== '')
Note
{{ $orderNote }}
@endif
@php $deliveryAmount = optional($item->delivery_charge)->amount ?? 0; // Final total: Subtotal + Delivery (কোন Discount লাইন নেই) $grand = $subTotal + $deliveryAmount; @endphp
Sub Total
{{ priceFormate($subTotal) }}
Delivery Charge
{{ priceFormate($deliveryAmount) }}

Total
{{ priceFormate($grand) }}
{{-- Signature & Footer --}}
Phone:
{{ $info->owner_phone }}
Company: {{ $info->site_name }} | Address: {{ $info->address }}
{{-- পেজ ব্রেক চাইলে আনকমেন্ট করুন --}} {{--
--}} @endforeach