@forelse($orders as $order)
@lang('restaurant.placed_at') | {{@format_date($order->created_at)}} {{ @format_time($order->created_at)}} |
---|---|
@lang('restaurant.order_status') | @php $count_sell_line = count($order->sell_lines); $count_cooked = count($order->sell_lines->where('res_line_order_status', 'cooked')); $count_served = count($order->sell_lines->where('res_line_order_status', 'served')); $order_status = 'received'; if($count_cooked == $count_sell_line) { $order_status = 'cooked'; } else if($count_served == $count_sell_line) { $order_status = 'served'; } else if ($count_served > 0 && $count_served < $count_sell_line) { $order_status = 'partial_served'; } else if ($count_cooked > 0 && $count_cooked < $count_sell_line) { $order_status = 'partial_cooked'; } @endphp@lang('restaurant.order_statuses.' . $order_status) |
@lang('contact.customer') | {{$order->customer_name}} |
@lang('restaurant.table') | {{$order->table_name}} |
@lang('sale.location') | {{$order->business_location}} |