@extends('frontend.layouts.template') @section('stylesheet') @endsection @section('content')

Order #{{ $order->order_no }}

@if( $order->status == 'waiting' ) {{ trans('label.notice_of_payment') }} @endif
@php $bgColor = '#eff1f6'; $txtColor = '#687188'; if( $order->status == 'approved' ){ $bgColor = '#038f22'; $txtColor = '#ffffff'; } if( $order->status == 'unapproved' ){ $bgColor = '#ff0000'; $txtColor = '#ffffff'; } @endphp
@if ($order->status == 'unapproved') @endif
{{ trans('label.' . $order->status) }}
{{ $order->approve_remark }}
{{ trans('label.amount') }} ฿{{ nb(orderPrice($order),2) }}
{{ trans('label.before') }} {{ showDate( date('Y-m-d H:i:s', strtotime('+48 hours '. $order->created_at)),true ) }}
@if( count( $order->details ) > 0 ) @foreach( $order->details as $cart ) @php $total += $cart->price * $cart->quantity; @endphp @endforeach @endif
  {{ trans('label.product') }} {{ trans('label.price') }} {{ trans('label.quantity') }} {{ trans('label.total') }}
{{ $cart->product_name }} {{ $cart->product_name }} ฿{{ nb( $cart->price ,2 )}}
{{ $cart->quantity }}
฿{{ nb( $cart->price * $cart->quantity, 2 )}}
{{ trans('label.totals') }}
@php if( $total == 0 ) $shipping_price = 0; @endphp @if ($order->discount > 0 ) @php $total = $total - $order->discount; @endphp @endif
{{ auth()->user()->level == 'staff' ? 'Staff' : '' }} {{ trans('label.discount') }} ฿{{ nb($order->discount,2) }}
{{ trans('label.subtotal') }} ฿{{ nb($total,2) }}
{{ trans('label.shipping') }} ฿{{ nb( $shipping_price, 2 ) }}
{{ trans('label.total') }} ฿{{ nb( $total + $shipping_price ,2 ) }}
@endsection @section('javascript') @endsection