@php $address = @json_decode( $order->shipping_address ); $user = $order->user @endphp

เรียน คุณ {{ $user->firstname }} {{ $user->lastname }}

คำสั่งซื้อหมายเลข #{{ $order->order_no }} Costcenter {{ $order->event_code }}

WBS CODE {{ $order->wbs == 0 ? 'ไม่มี เนื่องจาก ' : '' }} {{ $order->wbs_value }}


รายละเอียดคำสั่งซื้อ:

หมายเลขคำสั่งซื้อ : #{{ $order->order_no }}

ผู้ส่งคำสั่งซื้อ : {{ $user->firstname }} {{ $user->lastname }}

วันที่สั่งซื้อ : {{ showDate( date('Y-m-d H:i:s', strtotime( $order->created_at ) ),true ) }}

@php $bgColor = '#eff1f6'; $txtColor = '#687188'; if( $order->status == 'approved' ){ $bgColor = '#038f22'; $txtColor = '#ffffff'; } if( $order->status == 'unapproved' ){ $bgColor = '#ff0000'; $txtColor = '#ffffff'; } @endphp
@if( count( $order->details ) > 0 ) @foreach( $order->details as $cart ) @php $total += $cart->price * $cart->quantity; @endphp @endforeach @endif
  Product Price Quantity Total
{{ $cart->product_name }} {{ $cart->product_name }} ฿{{ nb( $cart->price ,2 )}}
{{ $cart->quantity }}
฿{{ nb( $cart->price * $cart->quantity, 2 )}}
Totals
@php if( $total == 0 ) $shipping_price = 0; @endphp @if ($order->discount > 0 ) @php $total = $total - $order->discount; @endphp @endif
{{ $order->user->level == 'staff' ? 'Staff' : '' }} Discount ฿{{ nb($order->discount,2) }}
Subtotal ฿{{ nb($total,2) }}
Shipping ฿{{ nb( $shipping_price, 2 ) }}
Total ฿{{ nb( $total + $shipping_price ,2 ) }}

ผลการอนุมัติคำสั่งซื้อ

{{ trans('label.' . $order->status ) }}

@if ($order->status == 'unapproved')

สาเหตุ

{{ $order->approve_remark }}

@endif

ขอขอบคุณ