@extends('layouts.master') @section('page_title', 'Call Status Details') @section('title', 'Call Status Details') @section('main_item', 'Oder') @section('sub_item', 'Call Status Details') @section('content')

Filter

business_location != '1') style="display: none" @endif>
order_batch_enable != '1') style="display: none" @endif>
product_filter_enable != '1') style="display: none" @endif>
Reset
@foreach ($sales as $sale) @endforeach
Action Call Status Order ID Waybill No Resources customer_profile_enable != '1') style="display: none" @endif>Oders Count Business Location Customer Mobile No Land Mark Invoice Total Product Name Product Sku Last Status Remark Next Call Date Call Attempt Sale Date Updated order_batch_enable != '1') style="display: none" @endif>Campaign Batch ID
@php @endphp @php // $city = City::where('id', $sale->customer->city)->first(); @endphp @if ($sale->call_status == 'pending') Pending @elseif ($sale->call_status == 'confirm') Confirm @elseif ($sale->call_status == 'not_confirm') Not Confirm @elseif ($sale->call_status == 'cancel') Cancel Order @elseif ($sale->call_status == 'hold_oders') Hold Order @else Not Available @endif @if ($sale->call_status != 'cancel') {{-- // if ($city->name_en != 'Other') --}} @endif @if ($sale->call_status == 'duplicate') Duplicate {{-- // } --}} @endif @if (!empty($sale->invoice_no)) {{ $sale->invoice_no }} @elseif(!empty($sale->ref_no)) {{ $sale->ref_no }} @else N/A @endif @if (!empty($row->waybill_no)) {{ $row->waybill_prefix . $row->waybill_no . $row->waybill_postfix }} @else N/A @endif @if ($sale->resources == 'whats_app') Whats App @elseif ($sale->resources == 'face_book_leeds') Face Book Leads @elseif ($sale->resources == 'face_book_massenger') Face Book Massenger @elseif ($sale->resources == 'bulk_order') Bulk Order @elseif ($sale->resources == 'daraz') Daraz @elseif ($sale->resources == 'follow_up') Follow Up @elseif ($sale->resources == 'tamil_order') Tamil Order @elseif ($sale->resources == 'missed_call') Missed Call @elseif ($sale->resources == 'call_order') Call order @elseif ($sale->resources == 'voucher') Voucher Order @elseif ($sale->resources == 'flagship_store') Flagship store @elseif ($sale->resources == 'meta') Meta @elseif ($sale->resources == 'online') Online @else N/A @endif @if ($sale->call_status != 'cancel') @endif customer_profile_enable != '1') style="display: none" @endif> @php $contact_id = $sale->contact_id; $id = $contact_id; $totle_orders = App\Sale::where('sale_type', 'order') ->where('contact_id', $contact_id) ->count(); @endphp {{ $totle_orders }} @if (!empty($sale->location)) {{ $sale->business_locations->name }} @else N/A @endif {{ $sale->customer->name }} {{ $sale->customer->mobile }} {{ $sale->customer->mobile_2 }} {{ $sale->customer->landmark }} {{ number_format($sale->invoice_nettotal, 2) }} @php $items = $sale->saleItems; $p_names = ''; foreach ($items as $item) { // Retrieve the quantity from the stocks table $re_qty = DB::table('stocks')->where('id', $item->stock_id)->value('qty'); // Append the product name and quantity wrapped in a badge span $p_names .= $item->product->product_name . ' - ' . $re_qty . ', '; } @endphp {!! Str::replaceLast(', ', '', $p_names) !!} @php $items = $sale->saleItems; $skus = ''; foreach ($items as $item) { $skus .= $item->product->sku . ', '; } @endphp {{ Str::replaceLast(', ', '', $skus) }} @php $call_status = App\CallStatus::where('sale_id', $sale->id) ->get() ->last(); @endphp @if (!empty($call_status->call_status_reason)) {{ $call_status->call_status_reason }} @else N/A @endif @php $call_status = App\CallStatus::where('sale_id', $sale->id) ->get() ->last(); @endphp @if (!empty($call_status->remark)) {{ $call_status->remark }} @else N/A @endif @php $call_status = App\CallStatus::where('sale_id', $sale->id) ->get() ->last(); @endphp @if (!empty($call_status->next_call_date)) {{ Carbon\Carbon::parse($call_status->next_call_date)->format('Y-m-d') }} @else N/A @endif @php $call_status = App\CallStatus::where('sale_id', $sale->id)->count(); @endphp {{ $call_status }} @php $dates = Carbon\Carbon::parse($sale->sale_date)->toDateString(); @endphp {{ $dates }} {{ Carbon\Carbon::parse($sale->updated_at)->toDateString() }} order_batch_enable != '1') style="display: none" @endif> @php $campaign_id = App\OrderBatch::where('id', $sale->order_batch)->first(); $dates = Carbon\Carbon::parse($sale->created_at)->toDateString(); @endphp @if (!empty($campaign_id->batch_name)) {{ $campaign_id->batch_name . '-' . $dates }} @else N/A @endif
Total
{{ $sales->appends($_GET)->links() }}
@php $count = $sales->count(); @endphp
Total Count   {{ $count }}
@endsection @section('scripts') @endsection