@extends('admin.admin') @section('content')
#{{ $order->invoice_no }}

Billed To:
{{ $order->billingInfo->name }}
{{ $order->billingInfo->phone }}
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->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
{{ $item->price }} {{ $item->quantity }}{{ $productPrice }}
{{--
@csrf
--}}
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 @push('scripts') @endpush