@extends('layouts.master') @section('page_title', 'View Order') @section('title', 'Order Details') @section('main_item', 'Orders') @section('sub_item', 'Order Details') @section('content')

Order Details : (Invoice Number : #{{ $sale->invoice_no }})

Customer: {{ $sale->customer->name }}
Mobile: {{ $sale->customer->mobile }} / @if (!empty($sale->customer->mobile_2)) {{ $sale->customer->mobile_2 }} @else N/A @endif
Address: {{ $sale->customer->landmark }}
@if ($sale->customer->city_id) @if ($sale->customer->city_id->name_en != 'Other')

{{ $sale->customer->city_id->name_en }}

@else

{{ $sale->customer->other_city }}

@endif @else

{{ $sale->customer->other_city }}

@endif {{ !empty($sale->customer->district) ? $sale->customer->district->name_en : 'N/A' }}
{{ $sale->customer->state }} @if ($sale->customer->country) {{ $sale->customer->country->nicename }} @endif
Order Date: {{ Carbon\Carbon::parse($sale->sale_date)->format('Y-m-d') }} | {{ Carbon\Carbon::parse($sale->created_at)->format('H:i:s') }}
Dispatch Date: {{ !empty($sale->dispacth_date) ? Carbon\Carbon::parse($sale->dispacth_date)->format('Y-m-d') . ' ' . Carbon\Carbon::parse($sale->dispacth_date)->format('H:i:s') : '_' }}
Delivery Date: {{ !empty($sale->delivery_date) ? Carbon\Carbon::parse($sale->delivery_date)->format('Y-m-d') . ' ' . Carbon\Carbon::parse($sale->delivery_date)->format('H:i:s') : '_' }}
Invoice No: @if (!empty($sale->invoice_no)) {{ $sale->invoice_no }} @elseif(!empty($sale->ref_no)) {{ $sale->ref_no }} @else N/A @endif
Waybill No: @if (!empty($sale->waybill_no)) {{ $sale->waybill_no }} @else N/A @endif
order_batch_enable != '1') style="display: none" @endif>Batch ID: @foreach ($order_batch_ids as $order_batch) @if ($sale->order_batch == $order_batch->id) order_batch_enable != '1') style="display: none" @endif>{{ $order_batch->batch_name . '-' . Carbon\Carbon::parse($sale->created_at)->format('Y-m-d') }} @else @endif @endforeach
@if (!empty($sale->user->full_name)) Created By: {{ $created_by->full_name }}
@endif Delivery Status: @if ($sale->status == 'pending') Pending @elseif ($sale->status == 'dispatched') Dispatched @elseif ($sale->status == 'package_dispatched') Package Dispatched @elseif ($sale->status == 'pickup') Pickup @elseif ($sale->status == 'returned') Returned @elseif ($sale->status == 'delivered') Delivered @elseif ($sale->status == 'canceled') Canceled @elseif ($sale->status == 'reshedule') Reshedule @elseif ($sale->status == 'reshedule_diliverd') Reshedule & Diliverd @endif
Payment Status: @if ($sale->payment_status == 'due') Due @elseif ($sale->payment_status == 'online') Online @elseif ($sale->payment_status == 'paid') Paid @elseif ($sale->payment_status == 'partial') Partial @elseif ($sale->payment_status == 'canceled') Canceled @endif {{-- {{ Str::title($sale->payment_status) }}
--}}
user_profile_enable != '1') style="display: none" @endif>
@if (!empty($sale->user->full_name)) @endif
Updated User
Updated Call Status
@foreach ($call_status as $status) @php $user_name = App\User::where('id', $status->user_id)->first(); @endphp
@if ($user_name) @if ($user_name->full_name) {{ $user_name->full_name }} @else {{ $user_name->username }} @endif @endif @if ($status->call_status == 'pending') Pending @elseif ($status->call_status == 'confirm') Confirm @elseif ($status->call_status == 'not_confirm') Not Confirm @elseif($status->call_status == 'cancel') Cancel Order @elseif($status->call_status == 'hold_oders') Hold Order @else Not Available @endif
@endforeach
@foreach ($sale_items as $item) @if (!empty($item->product->product_name)) @else @endif @endforeach
Image Product Name SKU Attribute Quantity Unit Price Line Total
@php $product = App\Product::find($item->product_id); if (!empty($product->parent_product_id)) { $product = App\Product::find($product->parent_product_id); } @endphp @if (!empty($product->image)) @else @endif {{ $item->product->product_name }} {{ $item->product->sku }} @if (!empty($item->product->attribute->attribute_name)) {{ $item->product->attribute->attribute_name }} {{ $item->attribute_value }} @else Single @endif {{ $item->qty }} {{ $item->product->unit->short_name }} {{ number_format($item->sale_unit_price, 2) }} {{ number_format($item->sale_line_total, 2) }}

Sale Note:

{{ $sale->sale_note }}
Order Sub Total: {{ !empty($sale->currency_type) ? App\PaymentAccount::CURRENCIES[$sale->currency_type] : 'Rs.' }} {{ number_format($sale->invoice_total, 2) }}
Discount: (-) {{ !empty($sale->currency_type) ? App\PaymentAccount::CURRENCIES[$sale->currency_type] : 'Rs.' }} {{ number_format($sale->invoice_discount, 2) }}
Delivery Fee: (+) @if ($sale->delivery_fee == 0) Free of Charge @else {{ !empty($sale->currency_type) ? App\PaymentAccount::CURRENCIES[$sale->currency_type] : 'Rs.' }} {{ number_format($sale->delivery_fee, 2) }} @endif
Order Net Total: {{ !empty($sale->currency_type) ? App\PaymentAccount::CURRENCIES[$sale->currency_type] : 'Rs.' }} {{ number_format($sale->invoice_nettotal, 2) }}
@if($setting->add_return_exchange_new_modification == '1')

Exchange Order Details : (Invoice Number : #{{ $new_exchange->invoice_no }})

Customer: {{ $new_exchange->customer->name }}
Mobile: {{ $new_exchange->customer->mobile }} / @if (!empty($new_exchange->customer->mobile_2)) {{ $new_exchange->customer->mobile_2 }} @else N/A @endif
Address: {{ $new_exchange->customer->landmark }}
@if ($new_exchange->customer->city_id) @if ($new_exchange->customer->city_id->name_en != 'Other')

{{ $new_exchange->customer->city_id->name_en }}

@else

{{ $new_exchange->customer->other_city }}

@endif @else

{{ $new_exchange->customer->other_city }}

@endif {{ !empty($new_exchange->customer->district) ? $new_exchange->customer->district->name_en : 'N/A' }}
{{ $new_exchange->customer->state }} @if ($new_exchange->customer->country) {{ $new_exchange->customer->country->nicename }} @endif
Order Date: {{ Carbon\Carbon::parse($new_exchange->new_exchange_date)->format('Y-m-d') }} | {{ Carbon\Carbon::parse($new_exchange->created_at)->format('H:i:s') }}
Dispatch Date: {{ !empty($new_exchange->dispacth_date) ? Carbon\Carbon::parse($new_exchange->dispacth_date)->format('Y-m-d') . ' ' . Carbon\Carbon::parse($new_exchange->dispacth_date)->format('H:i:s') : '_' }}
Delivery Date: {{ !empty($new_exchange->delivery_date) ? Carbon\Carbon::parse($new_exchange->delivery_date)->format('Y-m-d') . ' ' . Carbon\Carbon::parse($new_exchange->delivery_date)->format('H:i:s') : '_' }}
Invoice No: @if (!empty($new_exchange->invoice_no)) {{ $new_exchange->invoice_no }} @elseif(!empty($new_exchange->ref_no)) {{ $new_exchange->ref_no }} @else N/A @endif
Waybill No: @if (!empty($new_exchange->waybill_no)) {{ $new_exchange->waybill_no }} @else N/A @endif
order_batch_enable != '1') style="display: none" @endif>Batch ID: @foreach ($order_batch_ids as $order_batch) @if ($new_exchange->order_batch == $order_batch->id) order_batch_enable != '1') style="display: none" @endif>{{ $order_batch->batch_name . '-' . Carbon\Carbon::parse($new_exchange->created_at)->format('Y-m-d') }} @else @endif @endforeach
@if (!empty($new_exchange->user->full_name)) Created By: {{ $created_by->full_name }}
@endif Delivery Status: @if ($new_exchange->status == 'pending') Pending @elseif ($new_exchange->status == 'dispatched') Dispatched @elseif ($new_exchange->status == 'package_dispatched') Package Dispatched @elseif ($new_exchange->status == 'pickup') Pickup @elseif ($new_exchange->status == 'returned') Returned @elseif ($new_exchange->status == 'delivered') Delivered @elseif ($new_exchange->status == 'canceled') Canceled @elseif ($new_exchange->status == 'reshedule') Reshedule @elseif ($new_exchange->status == 'reshedule_diliverd') Reshedule & Diliverd @endif
Payment Status: @if ($new_exchange->payment_status == 'due') Due @elseif ($new_exchange->payment_status == 'online') Online @elseif ($new_exchange->payment_status == 'paid') Paid @elseif ($new_exchange->payment_status == 'partial') Partial @elseif ($new_exchange->payment_status == 'canceled') Canceled @endif {{-- {{ Str::title($sale->payment_status) }}
--}}
user_profile_enable != '1') style="display: none" @endif>
@if (!empty($new_exchange->user->full_name)) @endif
Updated User
Updated Call Status
@foreach ($exchange_call_status as $status) @php $user_name = App\User::where('id', $status->user_id)->first(); @endphp
@if ($user_name) @if ($user_name->full_name) {{ $user_name->full_name }} @else {{ $user_name->username }} @endif @endif @if ($status->call_status == 'pending') Pending @elseif ($status->call_status == 'confirm') Confirm @elseif ($status->call_status == 'not_confirm') Not Confirm @elseif($status->call_status == 'cancel') Cancel Order @elseif($status->call_status == 'hold_oders') Hold Order @else Not Available @endif
@endforeach
@foreach ($ex_sale_items as $item) @if (!empty($item->product->product_name)) @else @endif @endforeach
Image Product Name SKU Attribute Quantity Unit Price Line Total
@php $product = App\Product::find($item->product_id); if (!empty($product->parent_product_id)) { $product = App\Product::find($product->parent_product_id); } @endphp @if (!empty($product->image)) @else @endif {{ $item->product->product_name }}   {{ $item->product->sku }} @if (!empty($item->product->attribute->attribute_name)) {{ $item->product->attribute->attribute_name }} {{ $item->attribute_value }} @else Single @endif {{ $item->qty }} {{ $item->product->unit->short_name }} {{ number_format($item->sale_unit_price, 2) }} {{ number_format($item->sale_line_total, 2) }}

Sale Note:

{{ $new_exchange->sale_note }}
Order Sub Total: {{ !empty($new_exchange->currency_type) ? App\PaymentAccount::CURRENCIES[$new_exchange->currency_type] : 'Rs.' }} {{ number_format($new_exchange->invoice_total, 2) }}
Discount: (-) {{ !empty($new_exchange->currency_type) ? App\PaymentAccount::CURRENCIES[$new_exchange->currency_type] : 'Rs.' }} {{ number_format($new_exchange->invoice_discount, 2) }}
Delivery Fee: (+) @if ($new_exchange->delivery_fee == 0) Free of Charge @else {{ !empty($new_exchange->currency_type) ? App\PaymentAccount::CURRENCIES[$new_exchange->currency_type] : 'Rs.' }} {{ number_format($new_exchange->delivery_fee, 2) }} @endif
Order Net Total: {{ !empty($new_exchange->currency_type) ? App\PaymentAccount::CURRENCIES[$new_exchange->currency_type] : 'Rs.' }} {{ number_format($new_exchange->invoice_nettotal, 2) }}
@endif @endsection @section('scripts') @endsection