{{ __('Order Details') }}

{{ __('Invoice Number') }} : {{ sprintf("%'.08d", $order->id) }}
{{ __('Order Date') }} : {{ date('d-M-Y', strtotime($order->created_at)) }}
{{ __('Order ID') }} : {{ $order->order_number }}
@if ($order->dp == 0) {{ __('Shipping Method') }} : @if ($order->shipping == 'pickup') {{ __('Pick Up') }} @else {{ __('Ship To Address') }} @endif
@endif {{ __('Payment Method') }} : {{ $order->method }}
@if ($order->dp == 0)

{{ __('Shipping Address') }}

{{ __('Customer Name') }}: {{ $order->shipping_name == null ? $order->customer_name : $order->shipping_name }}
{{ __('Address') }}: {{ $order->shipping_address == null ? $order->customer_address : $order->shipping_address }}
{{ __('City') }}: {{ $order->shipping_city == null ? $order->customer_city : $order->shipping_city }}
{{ __('Country') }}: {{ $order->shipping_country == null ? $order->customer_country : $order->shipping_country }}
@endif

{{ __('Billing Address') }}

{{ __('Customer Name') }}: {{ $order->customer_name }}
{{ __('Address') }}: {{ $order->customer_address }}
{{ __('City') }}: {{ $order->customer_city }}
{{ __('Country') }}: {{ $order->customer_country }}
@php $subtotal = 0; $tax = 0; $data = 0; @endphp @foreach ($cart->items as $product) @if ($product['item']['user_id'] != 0) @if ($product['item']['user_id'] == $user->id) @php $subtotal += round($product['price'] * $order->currency_value, 2); @endphp @endif @endif @endforeach @if (Auth::user()->id == $order->vendor_shipping_id) @if ($order->shipping_cost != 0) @php $price = round($order->shipping_cost / $order->currency_value, 2); @endphp @if (Shipping::where('price', '=', $price)->count() > 0) @endif @endif @endif @if (Auth::user()->id == $order->vendor_packing_id) @if ($order->packing_cost != 0) @php $pprice = round($order->packing_cost / $order->currency_value, 2); @endphp @if (Package::where('price', '=', $pprice)->count() > 0) @endif @endif @endif @if ($order->tax != 0) @php $tax = ($subtotal / 100) * $order->tax; $subtotal = $subtotal + $tax; @endphp @endif
{{ __('Product') }} {{ __('Details') }} {{ __('Total') }}
@if ($product['item']['user_id'] != 0) @php $user = App\Models\User::find($product['item']['user_id']); @endphp @if (isset($user)) {{ $product['item']['name'] }} @else {{ $product['item']['name'] }} @endif @else {{ $product['item']['name'] }} @endif @if ($product['size'])

{{ __('Size') }} : {{ str_replace( '-', ' ', $product['size'], ) }}

@endif @if ($product['color'])

{{ __('color') }} :

@endif

{{ __('Price') }} : {{ $order->currency_sign }}{{ round($product['item']['price'] * $order->currency_value, 2) }}

{{ __('Qty') }} : {{ $product['qty'] }} {{ $product['item']['measure'] }}

@if (!empty($product['keys'])) @foreach (array_combine(explode(',', $product['keys']), explode('~', $product['values'])) as $key => $value)

{{ ucwords(str_replace('_', ' ', $key)) }} : {{ $value }}

@endforeach @endif
{{ $order->currency_sign }}{{ round($product['price'] * $order->currency_value, 2) }}
{{ __('Subtotal') }} {{ $order->currency_sign }}{{ round($subtotal, 2) }}
{{ Shipping::where('price', '=', $price)->first()->title }}({{ $order->currency_sign }}) {{ round($order->shipping_cost, 2) }}
{{ Package::where('price', '=', $pprice)->first()->title }}({{ $order->currency_sign }}) {{ round($order->packing_cost, 2) }}
{{ __('TAX') }}({{ $order->currency_sign }}){{ round($tax, 2) }}
{{ __('Total') }} {{ $order->currency_sign }}{{ round($subtotal + $data, 2) }}