@extends(\Auth::user()->role != 40 ? 'layout' : 'layoutfrontdesk') @section('title', 'Complimentary Control Report') @section('css') @endsection @section('content')
Filter:
Shop* :
Date :
{{-- Room sales --}}
@if(!$shops->isEmpty()) {{-- set variable dengan nilai 0 untuk grand total --}} @php // Amount $grand_total_bill_amount = 0; $grand_total_food_amount = 0; $grand_total_beverage_amount = 0; $grand_total_other_amount = 0; // Cost $grand_total_food_cost = 0; $grand_total_beverage_cost = 0; $grand_total_other_cost = 0; $grand_total_cost_of_sales = 0; @endphp {{-- Data Array shops --}} @foreach ($shops as $shop) {{-- set variable dengan nilai 0 untuk total --}} @php $total_bill_amount = 0; $total_food_amount = 0; $total_food_cost = 0; $total_beverage_amount = 0; $total_beverage_cost = 0; $total_other_amount = 0; $total_other_cost = 0; $total_cost_of_sales = 0; @endphp {{-- Data Array Cart Resto --}} @foreach (@$shop->carts as $cart) {{-- set variable dengan nilai 0 --}} @php // Amount $bill_amount = 0; $food_amount = 0; $beverage_amount = 0; $other_amount = 0; // Cost (complimentary) $cost_of_sales = 0; $food_cost = 0; $beverage_cost = 0; $other_cost = 0; @endphp {{-- Data Array Shop Transactions --}} @foreach (@$cart->menu as $menu) {{-- Kalkulasi Amount & cost (complimentary) --}} @php if (@$menu->menu->tipeMenu->type_category_id == 1 || @$menu->custom_tipe_kategori == 1) { $food_amount += $menu->total_biaya; $food_cost += $menu->grand_total_complimentary; } if (@$menu->menu->tipeMenu->type_category_id == 2 || @$menu->custom_tipe_kategori == 2) { $beverage_amount += $menu->total_biaya; $beverage_cost += $menu->grand_total_complimentary; } if (@$menu->menu->tipeMenu->type_category_id == 3 || @$menu->custom_tipe_kategori == 3) { $other_amount += $menu->total_biaya; $other_cost += $menu->grand_total_complimentary; } $bill_amount = $food_amount + $beverage_amount + $other_amount; $cost_of_sales = $food_cost + $beverage_cost + $other_cost; @endphp @endforeach {{-- --}} {{-- Kalkulasi total amount & cost(complimentary) --}} @php $total_bill_amount += $bill_amount; $total_cost_of_sales += $cost_of_sales; $total_food_amount += $food_amount; $total_beverage_amount += $beverage_amount; $total_other_amount += $other_amount; $total_food_cost += $food_cost; $total_beverage_cost += $beverage_cost; $total_other_cost += $other_cost; @endphp @endforeach {{-- --}} {{-- Kalkulasi grand total amount & cost(complimentary) --}} @php $grand_total_bill_amount += $total_bill_amount; $grand_total_food_amount += $total_food_amount; $grand_total_beverage_amount += $total_beverage_amount; $grand_total_other_amount += $total_other_amount; $grand_total_food_cost += $total_food_cost; $grand_total_beverage_cost += $total_beverage_cost; $grand_total_other_cost += $total_other_cost; $grand_total_cost_of_sales += $total_cost_of_sales; @endphp @endforeach {{-- --}} @else @endif
Date Outlet/Shop No. Bill Guest Name Description Bill Amount Food Amount Food Cost Beverage Amount Beverage Cost Other Amount Other Cost Cost of Sales
{{ formatDate($cart->transaction_date) }} {{ $shop->nama }} {{ $cart->order_flag }} {{ $cart->nama_pelanggan}} - {{ @$cart->complimentary->department->name}} {{ @$cart->coa->description}}{{ ribuan($bill_amount) }} {{ ribuan($food_amount) }} {{ ribuan($food_cost) }} {{ ribuan($beverage_amount) }} {{ ribuan($beverage_cost) }} {{ ribuan($cost_of_sales) }}{{ ribuanWithComma($bill_amount) }} {{ ribuanWithComma($food_amount) }} {{ ribuanWithComma($food_cost) }} {{ ribuanWithComma($beverage_amount) }} {{ ribuanWithComma($beverage_cost) }} {{ ribuanWithComma($other_amount) }} {{ ribuanWithComma($other_cost) }} {{ ribuanWithComma($cost_of_sales) }}
Total{{ ribuan($total_bill_amount) }} {{ ribuan($total_food_amount) }} {{ ribuan($total_food_cost) }} {{ ribuan($total_beverage_amount) }} {{ ribuan($total_beverage_cost) }} {{ ribuan($total_cost_of_sales) }}{{ ribuanWithComma($total_bill_amount) }} {{ ribuanWithComma($total_food_amount) }} {{ ribuanWithComma($total_food_cost) }} {{ ribuanWithComma($total_beverage_amount) }} {{ ribuanWithComma($total_beverage_cost) }} {{ ribuanWithComma($total_other_amount) }} {{ ribuanWithComma($total_other_cost) }} {{ ribuanWithComma($total_cost_of_sales) }}
Grand Total{{ ribuan($grand_total_bill_amount) }} {{ ribuan($grand_total_food_amount) }} {{ ribuan($grand_total_food_cost) }} {{ ribuan($grand_total_beverage_amount) }} {{ ribuan($grand_total_beverage_cost) }} {{ ribuan($grand_total_cost_of_sales) }}{{ ribuanWithComma($grand_total_bill_amount) }} {{ ribuanWithComma($grand_total_food_amount) }} {{ ribuanWithComma($grand_total_food_cost) }} {{ ribuanWithComma($grand_total_beverage_amount) }} {{ ribuanWithComma($grand_total_beverage_cost) }} {{ ribuanWithComma($grand_total_other_amount) }} {{ ribuanWithComma($grand_total_other_cost) }} {{ ribuanWithComma($grand_total_cost_of_sales) }}

No Transactions

{{-- get tanggal --}} @php $tanggal = explode(' - ', \Request::get('tanggal') ?? getSystemDate().' - '.getSystemDate()); $tanggal[0] = formatDate($tanggal[0]); $tanggal[1] = formatDate($tanggal[1]); @endphp {{-- closing get tanggal --}} @endsection @section('js') @endsection