@php
    $adminUrl = rtrim(config('app.url'), '/').'/admin/orders/'.$order->id;
@endphp
<x-mail::message>
# New Order Received

A new order has been placed on **{{ config('app.name') }}**.

**Order number:** {{ $order->order_number }}
**Placed at:** {{ $order->created_at->format('d M Y, h:i A') }}
**Status:** {{ ucfirst($order->status) }}
**Payment:** Cash on Delivery

## Customer

{{ $order->full_name }} &middot; {{ $order->phone }}
@if($order->email)
{{ $order->email }}
@endif
{{ $order->address_line1 }}@if($order->address_line2), {{ $order->address_line2 }}@endif
{{ $order->city }}@if($order->state), {{ $order->state }}@endif @if($order->postal_code) {{ $order->postal_code }}@endif
@if($order->notes)

**Notes:** {{ $order->notes }}
@endif

## Items

<x-mail::table>
| Product | Qty | Line total |
|:--------|:---:|-----------:|
@foreach($order->items as $item)
| {{ $item->product_name }}{{ $item->variant_label ? ' ('.$item->variant_label.')' : '' }} | {{ $item->quantity }} | Rs. {{ number_format($item->line_total) }} |
@endforeach
</x-mail::table>

**Subtotal:** Rs. {{ number_format($order->subtotal) }}
**Shipping:** {{ $order->shipping_fee > 0 ? 'Rs. '.number_format($order->shipping_fee) : 'FREE' }}
**Total:** Rs. {{ number_format($order->total) }}

<x-mail::button :url="$adminUrl">
View order in admin
</x-mail::button>

Thanks,<br>
{{ config('app.name') }}
</x-mail::message>
