@extends('layouts.reseller') @section('content')

Order #{{ $order->order_number }}

Placed on {{ $order->created_at->format('M d, Y') }}

{{ $order->status == 'quotation_sent' ? 'Quotation Received' : ucfirst(str_replace('_', ' ', $order->status)) }} {{ $order->status === 'quotation_sent' ? 'Download Quotation' : 'Invoice' }}

Items Ordered

{{ $order->items->count() }} Count
@foreach($order->items as $item) @endforeach
Product Price Qty Total
{{ $item->product->name }} @if(isset($item->options['discount_percentage']) && $item->options['discount_percentage'] > 0) {{ $item->options['discount_percentage'] }}% OFF @endif @if(isset($item->options['attributes']))
@foreach($item->options['attributes'] as $attr) {{ $attr['attribute'] }}: {{ $attr['value'] }} @endforeach
@endif
@if(isset($item->options['discount_percentage']) && $item->options['discount_percentage'] > 0) ₹{{ number_format($item->price / (1 - ($item->options['discount_percentage']/100)), 2) }} @endif ₹{{ number_format($item->price, 2) }} {{ $item->quantity }} ₹{{ number_format($item->total, 2) }}
Subtotal ₹{{ number_format($order->subtotal, 2) }}
Shipping ₹{{ number_format($order->shipping_cost, 2) }}
Total ₹{{ number_format($order->total, 2) }}
@if($order->status === 'quotation_sent')

Quotation Pending Acceptance

Please review the updated pricing above and accept the quotation to process your order.

@csrf
@elseif($order->status === 'quotation_accepted')

Quotation Accepted

Your order is now being processed.

@endif
@endsection