@extends('layouts.user-layout') @section('title', 'All Orders ') @section('content')
  • Order TO:
  • {{ auth()->user()->first_name ?: '' }}

    + {{ auth()->user()->phone_number ?: '' }}
  • ORDER No:{{ $order_detail->order_number ?: '' }}
  • {{--
  • Account:0000 12345 678900
  • --}} @php use Carbon\Carbon; @endphp
  • Date:{{ $formattedDate = Carbon::parse($order_detail->created_at)->format('d/m/Y') }}
@php $sub_total = 0; @endphp @foreach ($order_detail->orderItems as $order) @php $sub_total += $order->price * $order->quantity; @endphp @endforeach
SL Product Name PRICE QTY TOTAL
{{ $order->id ?: '' }} {{ $order->product ? $order->product->product_name : '' }} $ {{ $order->price ?: '' }} {{ $order->quantity ?: '' }} $ {{ $order->price * $order->quantity }}
  • Payment Info:
  • Account: 1234567890
  • SUB TOTAL:$ {{ number_format($sub_total) }}
  • {{--
  • TAX:$5.00
  • --}}
  • TOTAL: $ {{ number_format($sub_total) }}
@endsection