@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 }}
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') }}
Dispacth Date: {{ !empty($sale->dispacth_date) ? Carbon\Carbon::parse($sale->dispacth_date)->format('Y-m-d') : '_' }}
Delivery Date: {{ !empty($sale->delivery_date) ? Carbon\Carbon::parse($sale->delivery_date)->format('Y-m-d') : '_' }}
Invoice No: {{ $sale->invoice_no }}
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: {{ $sale->user->full_name }}
@endif Delivery Status: @if ($sale->status == 'pending') Pending @elseif ($sale->status == 'dispatched') Dispatched @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
{{ $user_name ? $user_name->full_name : '' }} @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
@if ($setting->show_category) @endif @if ($setting->show_sub_category) @endif @foreach ($sale_items as $item) @if (!empty($item->product->product_name)) {{-- Add seperator (|) only if varations available --}} {{-- Fetch attribue name according to the value --}} @if ($setting->show_category) @endif @if ($setting->show_sub_category) @endif @else @endif @endforeach
Image Product Name SKU AttributeCategorySub CategoryQuantity 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); } $stocks = App\Stock::where('id', $item->stock_id)->first(); $attribute_value_id = App\AttributeValue::find($stocks->attribute_value_id); $second_attribute_value_id = App\AttributeValue::find($stocks->second_attribute_value_id); @endphp @if (!empty($product->image)) @else @endif {{ $item->product->product_name }} @if (!empty($attribute_value_id)) | {{ $attribute_value_id->value }} @else @endif @if (!empty($second_attribute_value_id)) | {{ $second_attribute_value_id->value }} @else @endif @php if (!empty($second_attribute_value_id)) { $product_sku = App\ProductHasMultipleVarition::where('product_id', $stocks->product_id) ->where('attribute_value_id', $stocks->attribute_value_id) ->where('second_attribute_value_id', $stocks->second_attribute_value_id) ->first(); } else { $product_sku = App\ProductHasMultipleVarition::where('product_id', $stocks->product_id) ->where('attribute_value_id', $stocks->attribute_value_id) ->first(); } @endphp {{-- If any error regarding sku then print empty value --}} {{ $product_sku->sku ?? '' }} @if (!empty($attribute_value_id) && !empty($second_attribute_value_id)) {{ $attribute_value_id->attribute->attribute_name }} | {{ $second_attribute_value_id->attribute->attribute_name }} @elseif (!empty($attribute_value_id)) {{ $attribute_value_id->attribute->attribute_name }} @elseif (!empty($second_attribute_value_id)) {{ $second_attribute_value_id->attribute->attribute_name }} @else single @endif {{ $item->product->category ? $item->product->category->category_name : 'N/A' }} @php $product_sub_category = DB::table('product_has_subcategories') ->where('product_id', $item->product->id) ->first(); if ($product_sub_category) { $sub_category = \App\SubCategory::find($product_sub_category->sub_category_id); } @endphp @if (isset($sub_category) && $sub_category) {{ $sub_category->sub_category_name }} @else N/A @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) }}
@endsection @section('scripts') @endsection