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

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

คำสั่งซื้อหมายเลข #{{ $order->order_no }} ของคุณ ได้ทำการส่งคำสั่งซื้อของท่าน ให้เจ้าหน้าที่ในการตรวจสอบแล้ว

@if ( !$order->event_code )

โปรดทำการชำระเงิน ภายใน {{ showDate( date('Y-m-d H:i:s', strtotime('+48 hours '. $order->created_at)),true ) }} มิฉนั้น คำสั่งซื้อของท่าน จะถูกยกเลิก โดยอัตโนมัติ

@else

โปรดรอการ อนุมัติการสั่งซื้อ จากหัวหน้าทีมของท่านอีกครั้ง

@endif

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

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

วันที่สั่งซื้อ : {{ 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 )}}
Cart 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 ) }}

ขอขอบคุณ