@php $customer = []; $user = $order->user; if( $bill_type == 'order'){ $bill = $order->bill_order; }else{ $bill = $order->bill_shipping; } if( $order->billing_address ){ $billing = json_decode( $order->billing_address ); $customer = $billing ? $billing : []; }else{ $type = $user->address_copy == 1 ? 'shipping' : 'billing'; $billing = App\Models\user_info::when('user_id',$user->id) ->where('type',$type) ->orderBy('default','desc') ->first(); $customer = @json_decode( $billing->address ); } @endphp
นามลูกค้า {{ $customer ? $customer->firstname .' ' . $customer->lastname : '' }} เลขที่ {{ @$bill->document_id }}
ที่อยู่ @if ($customer) {{ @$customer->address }} {{ @getDistrict_name( $customer->district ) }} {{ @getAmphure_name( $customer->city ) }} {{ @getProvince_name( $customer->province ) }} {{ @$customer->zipcode }} @endif วันที่ {{ dateTh( @$bill->document_date ) }}
เลขประจำตัวผู้เสียภาษี
สำนักงานใหญ่
สาขาที่