@foreach($orders as $k=>$val)
@php
$totalAmount = 0.00;
@endphp
@if($val->order_history)
@foreach($val->order_history as $key_OH=>$val_OH)
@if($val_OH->orders_items)
@foreach($val_OH->orders_items as $key_OI=>$val_OI)
@php
$price = $val_OI->item_price*$val_OI->item_qty;
$totalAmount = $totalAmount+$price;
$totalAmmountsArr[$val->id] = $totalAmount;
@endphp
@endforeach
@endif
@endforeach
@endif
@endforeach
{{lang_trans('txt_sno')}} |
{{lang_trans('txt_customer_name')}} |
{{lang_trans('txt_table_num')}} |
{{lang_trans('txt_order_amount')}} |
{{lang_trans('txt_action')}} |
@foreach($orders as $k=>$val)
{{$k+1}} |
{{$val->name}} |
{{$val->table_num}} |
{{getCurrencySymbol()}} {{@$totalAmmountsArr[$val->id]}} |
{{lang_trans('btn_repeat_order')}}
{{lang_trans('btn_pay')}}
{{lang_trans('txt_sno')}} |
{{lang_trans('txt_datetime')}} |
{{lang_trans('txt_orderitem_qty')}} |
@if($val->order_history)
@foreach($val->order_history as $key_OH=>$val_OH)
{{$key_OH+1}} |
{{$val_OH->created_at}} |
@if($val_OH->orders_items)
@foreach($val_OH->orders_items as $key_OI=>$val_OI)
@php
$price = $val_OI->item_price*$val_OI->item_qty;
$totalAmount = $totalAmount+$price;
@endphp
{{$val_OI->item_name}} |
{{$val_OI->item_qty}} |
@endforeach
@endif
|
@endforeach
@endif
|
@endforeach