@extends('admin.admin') @section('content')

Invoice

#{{ $order->invoice_id }}

Billed To:
{{ $order->billingInfo->name }}
{{ $order->billingInfo->phone }}
{{ $order->billingInfo->email }}
{{ $order->billingInfo?->division?->name_en }}, {{ $order->billingInfo?->district?->name_en }}, {{ $order->billingInfo?->upazila?->name_en }}
Shipped To:
{{ Auth::guard('admin')->user()->name }}
{{ Auth::guard('admin')->user()->email }}

Payment Method: {{ $order->payment_method }}


Order Date:
{{ date('d-M-Y', strtotime($order->created_at)) }}

Order Summary
@php $subtotal = 0; @endphp @foreach ($order->orderItem as $sl => $item) @php $price = $item->product->offer_price == '' ? $item->product->price : $item->product->offer_price; $quantity = $item->quantity; $productPrice = $price * $quantity; $subtotal += $productPrice; @endphp @endforeach
# Item Price Quantity Totals
{{ $sl + 1 }} {{ $item->product->name }}
@if ($item->size_id != '') Size: {{ $item->size->name }} @else Size: NA @endif @if ($item->color_id != '') Color: {{ $item->color->name }} @else Color: NA @endif
@if ($item->product->offer_price != '') {{ $item->product->offer_price }} @else {{ $item->product->price }} @endif {{ $item->quantity }}{{ $productPrice }}
Subtotal
{{ $subtotal }}
@php $discount = $order->discount ?? 0; $deliveryCharge = $order->delivery_charge; $totalAmount = $subtotal + $deliveryCharge - $discount; @endphp
Delivery Charge
{{ $deliveryCharge }}
Discount
{{ $discount ?? 0 }}

Total
{{ $totalAmount }}

@endsection