{{ $type == 1 ? __('obs.restaurant_prepaid_bill') : __('obs.laundry_prepaid_bill') }}
@if($type == 1) @endif @php $total_qty = 0; @endphp @foreach ($restaurant_bills as $i => $item) @if($type == 1) @endif @php $total_qty += ($item->quantity*$item->days); @endphp @endforeach
{{ __('obs.sl') }}{{ __('obs.menu') }}{{ __('obs.product') }} {{ __('obs.qty') }} {{ __('obs.days') }} {{ __('obs.total_qty') }} {{ __('obs.price') }} {{ __('obs.tax') }}(%) {{ __('obs.tax') }}(Amount) {{ __('obs.total') }}
{{ $i+1 }}{{ $item->getMenu->name ?? "" }}{{ $item->getProduct->name_eng ?? "" }} {{ $item->quantity ?? "" }} {{ $item->days ?? "" }} {{ $item->quantity*$item->days }} {{ $item->price > 0 ? $item->price : "Complementary" }} {{ $item->tax_percentage ?? "" }} {{ round($item->tax_amount ?? 0, 2) }} {{ round($item->gross_total ?? 0,2) }}
{{ __('obs.total') }} {{ $total_qty }} ({{ $tax_type == 1 ? 'Including' : 'Excluding' }}) {{ round($restaurant_bills->sum('tax_amount'),2) }} {{ round($restaurant_bills->sum('gross_total'),2) }}
{{ __('obs.day_wise') }}
@php $menus = $restaurant_bills->groupBy('menu_id'); $dates = $restaurant_bills->pluck('getAllDates')->flatten(1)->groupBy('date'); @endphp @foreach ($menus as $menu_id => $menu_items) @if($type == 1) @else @endif @endforeach @foreach ($menus as $menu_id => $menu_items) @foreach ($menu_items->groupBy('product_id') as $product_id => $product_items) @endforeach @endforeach @php $total_qty_arr = []; @endphp @foreach ($dates as $date => $date_items) @foreach ($menus as $menu_id => $menu_items) @foreach ($menu_items->groupBy('product_id') as $product_id => $product_items) @php $qty = $product_items->whereIn('id', $date_items->pluck('order_detail_id'))->sum('quantity'); $total_qty_arr[$menu_id][$product_id][] = $qty; @endphp @endforeach @endforeach @endforeach @foreach ($menus as $menu_id => $menu_items) @foreach ($menu_items->groupBy('product_id') as $product_id => $product_items) @endforeach @endforeach
{{ __('obs.sl') }} {{ __('obs.date') }}{{ $menu_items->first()->getMenu->name ?? "" }}Product/Service
{{ $product_items->first()->getProduct->name_eng ?? "" }}
{{ $loop->iteration }} {{ date('d-m-Y', strtotime($date)) }}{{ $qty }}
{{ __('obs.total') }}{{ array_sum($total_qty_arr[$menu_id][$product_id]) }}