@php $setting = App\Setting::first(); $city = \App\City::find($setting->city); @endphp @php $x = 4; @endphp @foreach (array_chunk($courier_orders, $x) as $orders) @foreach ($orders as $data) @php $sale = \App\Sale::with('customer')->find($data['sale_id']); $business_location = App\BusinessLocation::find($sale->location); @endphp @endforeach @endforeach
Order No : {{ $sale->invoice_no }}

From
Name:{{ $business_location->name ?? $setting->name }}
Address: {{ $business_location->landmark ?? $setting->landmark }}, {{ $business_location->city ?? $city->name_en ?? '' }}
Mobile:{{ $business_location->mobile }}

To
@if ($setting->order_sale_note == '1') @endif
Name:{{ $sale->customer->name }}
Address: {{ $sale->customer->landmark }}, @if ($sale->customer->city_id->name_en != 'Other') {{ $sale->customer->city_id->name_en }} @endif
Sale Note: {{ $sale->sale_note }}
Mobile: {{ $sale->customer->mobile }} @if (!empty($sale->customer->mobile_2)) , {{ $sale->customer->mobile_2 }} @endif
Parcel desc: {{ $sale->saleItems->pluck('product.product_name')->filter()->implode(', ') }}

@if ($sale->payment_status == 'due') COD : {!! number_format($sale->invoice_nettotal, 2) !!} {{ $sale->currency_type == 'usd' ? '$' : ' LKR' }} @elseif ($sale->payment_status == 'partial') COD BALANCE : {!! number_format($sale->invoice_balance, 2) !!} {{ $sale->currency_type == 'usd' ? '$' : ' LKR' }} @else FREE @endif

barcode
{{ $sale->waybill_prefix . $sale->waybill_no . $sale->waybill_postfix }}