|
@php
@endphp
@if ($sale->call_status == 'cancel')
|
@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($sale->waybill_no))
{{ $sale->waybill_prefix . $sale->waybill_no . $sale->waybill_postfix }}
@else
N/A
@endif
|
{{ $sale->customer->name }}
|
@if ($settings->hide_payment_status != '1')
{{ $sale->payment_status }}
|
@endif
{{ $sale->payment_method }} |
{{ number_format($sale->invoice_nettotal, 2) }} |
@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
|
@if (!empty($sale->next_call_date))
{{ Carbon\Carbon::parse( $sale->next_call_date)->format('Y-m-d') }}
@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() }} |
{{-- showproduct name and qty --}}
@foreach($sale->saleItems as $saleItem)
{{ $saleItem->product->product_name }} - {{ $saleItem->qty }} ,
@endforeach
|
@endforeach