{{-- --}}
{{ @$shop->nama ?? ' ' }} - Daily Sales Report
Report Printed on: {{date('l, F d, Y')}}
Printed By : {{\Auth::user()->nama}}
From Date: {{date('d/m/y', strtotime($start_date))}} To Date: {{date('d/m/y', strtotime($end_date))}}
@if(count($transactions) > 0) {{-- --}} @php $colh = 0; $colspan_cat = 0; @endphp {{-- @foreach ($shops as $shop) @php $colspan_cat += 3; @endphp @endforeach --}} @if (count($tipe_menus) > 0) @foreach ($tipe_menus as $tipe) @if ($filtered_tipe === 0) @if ($TotalTransactionTipe[$tipe->id] > 0) @php $colspan_cat += 3; @endphp @endif @else @php $colspan_cat += 3; @endphp @endif @endforeach @endif {{-- --}} {{-- @foreach ($shops as $shop) --}} {{-- @foreach ($shop->tipeMenus as $i=>$tipe) --}} {{-- @foreach (config('custom.jenis_tipe_item') as $jenis_tipe) --}} {{-- --}} {{-- @php --}} {{-- // $col++; // @endphp --}} {{-- @endforeach --}} {{-- @endforeach --}} {{-- @endforeach --}} {{-- --}} @php // variable nominal total $total_cash = 0; $total_card = 0; $total_digital = 0; $total_transfer_kamar = 0; $total_nonstay = 0; $total_ledger = 0; $total_services = 0; $total_tax = 0; $total_change = 0; // variable total_tagihan $total_gross = 0; // variable total compliment $total_compliment = 0; $count_compliment = 0; // variable nett $total_nett = 0; // variable total $Total = 0; $Total_Disc_G = 0; $Total_Disc_N = 0; // variable total tipe gross/nett // foreach ($shops as $shop) { // foreach (config('custom.jenis_tipe_item') as $key_jenis_tipe_item => $value) { // $total_tipe_gross[$shop->id][$key_jenis_tipe_item] = 0; // $total_tipe_nett[$shop->id][$key_jenis_tipe_item] = 0; // $disc_per_tipe[$shop->id][$key_jenis_tipe_item] = 0; // } // } foreach ($tipe_menus as $tipe) { $total_tipe_gross[$tipe->id] = 0; $total_tipe_nett[$tipe->id] = 0; $disc_per_tipe[$tipe->id] = 0; } // dd($total_tipe_gross); // $total_tipe_gross = array(); // $total_tipe_nett = array(); $total_tipe_gross[''] = 0; $total_tipe_nett[''] = 0; @endphp @foreach ( $transactions as $index=>$item ) @php // variable nominal column $nominal_cash = 0; $nominal_card = 0; $nominal_digital = 0; $nominal_kamar = 0; $nominal_nonstay = 0; $nominal_ledger = 0; $total_discount_bill= 0; $nominal_custom_menu = 0; // menghitung total harga dengan cost complimentary $grand_total_complimentary = 0; if ($item->complimentary_id > 0) { foreach ($item->menu as $k => $menu) { $grand_total_complimentary += $menu->grand_total_complimentary; } } // sum total tagihan if ($item->complimentary_id == 0) { $total_gross += $item->grand_total_pos; } // sum total tagihan by compliement if ($item->complimentary_id != 0) { $total_compliment += $grand_total_complimentary; } // Ambil dan Sum Transfer Kamar fitur ini sudah tidak digunakan // if ($item->status == 3) { // $nominal_kamar += $item->grand_total_pos; // }elseif ($item->status == 4) { // $nominal_nonstay += $item->grand_total_pos; // } // Ambil dan Sum ledger temporary :) if ($item->ledger_total != null) { $nominal_ledger += $item->ledger_total; } // Ambil hitungan yang compliment if ($item->complimentary_id != 0) { $count_compliment += 1; } @endphp {{-- --}} {{-- @php $hitung_i = 0; @endphp @foreach ($tipe_menus as $index=>$tipe) @php // Variable $total_per_tipe = 0; @endphp @foreach ($item->menu as $menu) @if ($menu->tipe_menu_id == $tipe->id) @php if ($item->complimentary_id > 0) { // sum total per tipe menu $total_per_tipe += $menu->grand_total_complimentary; }else{ // sum total per tipe menu $total_per_tipe += $menu->total_biaya; } @endphp @endif @endforeach @endforeach --}} @php $hitung_i = 0; @endphp {{-- @foreach ($shops as $shop) @foreach (config('custom.jenis_tipe_item') as $jenis_cindex=>$jenis_ctipe) @php // Variable $total_per_tipe = 0; $discount_per_tipe = 0; @endphp @foreach ($item->menu as $menu) @if ($menu->tipeMenu) @if ($menu->tipeMenu->type_category_id == $jenis_cindex && $menu->shop_id == $shop->id) @php if ($item->complimentary_id > 0) { // sum total per tipe menu $total_per_tipe += $menu->grand_total_complimentary; }else{ // sum total per tipe menu $total_per_tipe += $menu->total_biaya; } $discount_per_tipe += $menu->diskon @endphp @elseif($menu->tipeMenu->type_category_id == null && $menu->shop_id == $shop->id) @if ($jenis_cindex === 3 ) @php if ($item->complimentary_id > 0) { // sum total per tipe menu $total_per_tipe += $menu->grand_total_complimentary; }else{ // sum total per tipe menu $total_per_tipe += $menu->total_biaya; } $discount_per_tipe += $menu->diskon @endphp @endif @endif @endif @endforeach @php $total_discount_bill +=($discount_per_tipe*-1); @endphp @endforeach @endforeach --}} @if (count($tipe_menus) >0) @foreach ($tipe_menus as $tipe) @if ($filtered_tipe === 0) @if ($TotalTransactionTipe[$tipe->id] > 0) {{-- @foreach (config('custom.jenis_tipe_item') as $jenis_cindex=>$jenis_ctipe) --}} @php // Variable $total_per_tipe = 0; $discount_per_tipe = 0; @endphp @foreach ($item->menu as $menu) @if ($menu->tipeMenu) @if ($menu->tipeMenu->id == $tipe->id) @php if ($item->complimentary_id > 0) { // sum total per tipe menu $total_per_tipe += $menu->grand_total_complimentary; }else{ // sum total per tipe menu $total_per_tipe += $menu->total_biaya; } $discount_per_tipe += $menu->diskon; $total_per_tipe -= $menu->diskon; @endphp @elseif($menu->tipeMenu->id == null) {{-- @if ($jenis_cindex === 3 ) --}} @php if ($item->complimentary_id > 0) { // sum total per tipe menu $total_per_tipe += $menu->grand_total_complimentary; }else{ // sum total per tipe menu $total_per_tipe += $menu->total_biaya; } $discount_per_tipe += $menu->diskon; $total_per_tipe -= $menu->diskon; @endphp {{-- @endif --}} @endif @endif @endforeach @php $total_discount_bill +=($discount_per_tipe*-1); @endphp {{-- @endforeach --}} @endif @else {{-- @foreach (config('custom.jenis_tipe_item') as $jenis_cindex=>$jenis_ctipe) --}} @php // Variable $total_per_tipe = 0; $discount_per_tipe = 0; @endphp @foreach ($item->menu as $menu) @if ($menu->tipeMenu) @if ($menu->tipeMenu->id == $tipe->id) @php if ($item->complimentary_id > 0) { // sum total per tipe menu $total_per_tipe += $menu->grand_total_complimentary; }else{ // sum total per tipe menu $total_per_tipe += $menu->total_biaya; } $discount_per_tipe += $menu->diskon; $total_per_tipe -= $menu->diskon; @endphp @elseif($menu->tipeMenu->id == null) {{-- @if ($jenis_cindex === 3 ) --}} @php if ($item->complimentary_id > 0) { // sum total per tipe menu $total_per_tipe += $menu->grand_total_complimentary; }else{ // sum total per tipe menu $total_per_tipe += $menu->total_biaya; } $discount_per_tipe += $menu->diskon; $total_per_tipe -= $menu->diskon; @endphp {{-- @endif --}} @endif @endif @endforeach @php $total_discount_bill +=($discount_per_tipe*-1); @endphp {{-- @endforeach --}} @endif @endforeach @endif @php $total_tipe_gross[''] += $nominal_custom_menu ?? 0; $total_tipe_nett[''] += $nominal_custom_menu ?? 0; $total_discount_bill += $diskon_cm; @endphp {{-- --}} @foreach ($item->pembayaranpos as $urutan=>$bayar) @php // Ambil dan Sum pembayaranpos ^_^ if ($bayar->jenis_pembayaran_id == 1) { $nominal_cash += $bayar->nominal; }elseif ($bayar->jenis_pembayaran_id == 2) { $nominal_card += $bayar->nominal; }elseif ($bayar->jenis_pembayaran_id == 4) { $nominal_digital += $bayar->nominal; }elseif ($bayar->jenis_pembayaran_id == 7) { $nominal_kamar += $bayar->nominal; }elseif ($bayar->jenis_pembayaran_id == 6) { $nominal_nonstay += $bayar->nominal; } @endphp @endforeach @php // sum total $total_cash += $nominal_cash; $total_card += $nominal_card; $total_digital += $nominal_digital; $total_transfer_kamar += $nominal_kamar; $total_nonstay += $nominal_nonstay; $total_ledger += $nominal_ledger; $total_change += ($nominal_cash - $item->grand_total_pos) > 0 ? ($nominal_cash - $item->grand_total_pos) : 0; // sum ppn and tax $total_services += $item->services_charge; $total_tax += $item->ppn_charge; @endphp @endforeach @php // sum dan substract total $total_gross += $total_compliment; $total_nett = $total_gross - $total_compliment; // Hitung Total untuk Summary $Total = $total_cash + $total_card + $total_digital + $total_transfer_kamar + $total_nonstay + $total_ledger + $total_compliment; // total per tipe menu !!! ==== old script ==== // foreach ($tipe_menus as $tipe) { // // variable // $sum_tipe_gross = 0; // $sum_tipe_nett = 0; // foreach ($details as $key => $data) { // if ($data->tipe_menu_id == $tipe->id) { // $sum_tipe_gross += $data->cartresto->complimentary_id > 0 ? $data->grand_total_complimentary : $data->total_biaya; // // kondisi ambil yang compliment // if ($data->cartresto->complimentary_id != 0) { // $sum_tipe_nett += $data->grand_total_complimentary; // } // } // } // // get nett // $sum_tipe_nett = $sum_tipe_gross - $sum_tipe_nett; // $total_tipe_gross += array($tipe->id => $sum_tipe_gross); // $total_tipe_nett += array($tipe->id => $sum_tipe_nett); // } // // total per tipe menu !!! ==== new script ==== // foreach ($shops as $shop) { // foreach (config('custom.jenis_tipe_item') as $TG_ctipe_item_idx => $TG_ctipe_item) { // // variable // $sum_tipe_gross = 0; // $sum_tipe_nett = 0; // $sum_diskon = 0; // foreach ($details as $key => $data) { // if ($data->tipeMenu) { // if (@$data->tipeMenu->type_category_id == $TG_ctipe_item_idx && $shop->id == $data->shop_id) { // $sum_tipe_gross += @$data->cartresto->complimentary_id > 0 ? $data->grand_total_complimentary : $data->total_biaya; // // kondisi ambil yang compliment // if (@$data->cartresto->complimentary_id != 0) { // $sum_tipe_nett += $data->grand_total_complimentary; // }else{ // $sum_tipe_nett += 0; // } // $sum_diskon += $data->diskon; // } // elseif ($data->tipeMenu->type_category_id == null && $shop->id == $data->shop_id) { // if ($TG_ctipe_item_idx == 3) { // $sum_tipe_gross += @$data->cartresto->complimentary_id > 0 ? $data->grand_total_complimentary : $data->total_biaya; // // kondisi ambil yang compliment // if (@$data->cartresto->complimentary_id != 0) { // $sum_tipe_nett += $data->grand_total_complimentary; // }else{ // $sum_tipe_nett += 0; // } // $sum_diskon += $data->diskon; // } // } // } // } // // get nett // $sum_tipe_nett = $sum_tipe_gross - $sum_tipe_nett; // $total_tipe_gross[$shop->id] += $sum_tipe_gross ; // $total_tipe_nett[$shop->id] += $sum_tipe_nett ; // $disc_per_tipe[$shop->id] += $sum_diskon; // } // } foreach ($tipe_menus as $tipe) { // variable $sum_tipe_gross = 0; $sum_tipe_nett = 0; $sum_diskon = 0; foreach ($details as $key => $data) { if ($data->tipeMenu) { if (@$data->tipeMenu->id == $tipe->id) { $sum_tipe_gross += @$data->cartresto->complimentary_id > 0 ? $data->grand_total_complimentary : $data->total_biaya; // kondisi ambil yang compliment if (@$data->cartresto->complimentary_id != 0) { $sum_tipe_nett += $data->grand_total_complimentary; }else{ $sum_tipe_nett += 0; } $sum_diskon += $data->diskon; } elseif ($data->tipeMenu->id == null) { if ($TG_ctipe_item_idx == 3) { $sum_tipe_gross += @$data->cartresto->complimentary_id > 0 ? $data->grand_total_complimentary : $data->total_biaya; // kondisi ambil yang compliment if (@$data->cartresto->complimentary_id != 0) { $sum_tipe_nett += $data->grand_total_complimentary; }else{ $sum_tipe_nett += 0; } $sum_diskon += $data->diskon; } } } } // get nett $sum_tipe_nett = $sum_tipe_gross - $sum_tipe_nett; $total_tipe_gross[$tipe->id] += $sum_tipe_gross ; $total_tipe_nett[$tipe->id] += $sum_tipe_nett ; $disc_per_tipe[$tipe->id] += $sum_diskon; $total_tipe_gross[$tipe->id] -= $disc_per_tipe[$tipe->id] ; $total_tipe_nett[$tipe->id] -= $disc_per_tipe[$tipe->id] ; } @endphp {{-- --}} {{-- @foreach ($tipe_menus as $tipe) @endforeach --}} {{-- @foreach ($shops as $shop) @foreach (config('custom.jenis_tipe_item') as $cjenis_tipe_item_idx => $cjenis_tipe_item) @endforeach @endforeach --}} @if (count($tipe_menus) > 0) @foreach ($tipe_menus as $tipe) @if ($filtered_tipe === 0) @if ($TotalTransactionTipe[$tipe->id] > 0) @endif @else @endif @endforeach @endif {{-- @foreach ($shops as $shop) @foreach (config('custom.jenis_tipe_item') as $fg_tipe_item_idx => $fg_tipe_item) @endforeach @endforeach --}} {{-- --}} {{-- @foreach ($tipe_menus as $tipe) @endforeach --}} {{-- @foreach ($shops as $shop) @foreach (config('custom.jenis_tipe_item') as $fg_tipe_item_idx => $fg_tipe_item) @endforeach @endforeach --}} @if (count($tipe_menus) > 0) @foreach ($tipe_menus as $tipe) @if ($filtered_tipe === 0) @if ($TotalTransactionTipe[$tipe->id] > 0 && $filtered_tipe === 0) {{-- --}} @endif @else {{-- --}} @endif @endforeach @endif {{-- --}} {{-- --}} {{-- --}} {{-- @foreach ($tipe_menus as $tipe) @endforeach --}} {{-- @foreach ($shops as $shop) @foreach (config('custom.jenis_tipe_item') as $fn_tipe_item_idx => $fn_tipe_item) @endforeach @endforeach --}} @if (count($tipe_menus) > 0) @foreach ($tipe_menus as $tipe) @if ($filtered_tipe === 0) @if ($TotalTransactionTipe[$tipe->id] > 0 && $filtered_tipe === 0) {{-- --}} @endif @else {{-- --}} @endif @endforeach @endif {{-- --}} {{-- --}} @else @if (!\Request::get('shop') || !\Request::get('tanggal')) @else @endif @endif
Bill Number Pax Cashier POS{{$shop->nama}}{{ strlen($tipe->nama_tipe) > 5 ? removeVocalHuruf(@$tipe->nama_tipe) : @$tipe->nama_tipe}}{{ strlen($tipe->nama_tipe) > 5 ? removeVocalHuruf(@$tipe->nama_tipe) : @$tipe->nama_tipe}}Custom MenuDisc. Services Tax Total Cash Card Digital Tf Room Tf NonStay Ledger Change Note
{{$jenis_tipe}}
{{$item->order_flag}} 1 {{$item->user->nama}} {{ribuan($total_per_tipe)}} {{ribuan($total_per_tipe)}} --}} {{--
{{ $discount_per_tipe > 0 ? "(".ribuan($discount_per_tipe*-1).")" : ""}} --}} {{--
{{-- {{ribuan($total_per_tipe)}} --}} {{ribuanWithComma($total_per_tipe)}} @if($discount_per_tipe > 0)
Disc. {{ribuanWithComma($discount_per_tipe)}} @endif
{{-- {{ribuan($total_per_tipe)}} --}} {{ribuanWithComma($total_per_tipe)}} @if($discount_per_tipe > 0)
Disc. {{ribuanWithComma($discount_per_tipe)}} @endif
@php //custom_menu $diskon_cm = 0; $total_custom_menu = 0; foreach ($item->menu as $menu) { if ($menu->keterangan_custom) { $nominal_custom_menu += $menu->total_biaya - $menu->diskon; // $total_custom_menu += $menu->total_biaya; } $diskon_cm += $menu->diskon; } @endphp {{-- {{ribuan($nominal_custom_menu)}} --}} {{ribuanWithComma($nominal_custom_menu)}} @php $Total_Disc_G += $total_discount_bill; $Total_Disc_N += $total_discount_bill; @endphp {{-- {{ribuan($total_discount_bill)}} --}} {{ribuanWithComma($total_discount_bill)}} {{-- {{ribuan($item->services_charge)}} --}} {{ribuanWithComma($item->services_charge)}} {{-- {{ribuan($item->ppn_charge)}} --}} {{ribuanWithComma($item->ppn_charge)}} {{$item->complimentary_id > 0 ? ribuan($grand_total_complimentary) : ribuan($item->grand_total_pos)}}{{$item->complimentary_id > 0 ? ribuanWithComma($grand_total_complimentary) : ribuanWithComma($item->grand_total_pos)}} {{-- {{ribuan($nominal_cash)}} --}} {{ribuanWithComma($nominal_cash)}} {{-- {{ribuan($nominal_card)}} --}} {{ribuanWithComma($nominal_card)}} {{-- {{ribuan($nominal_digital)}} --}} {{ribuanWithComma($nominal_digital)}} {{-- {{ribuan($nominal_kamar)}} --}} {{ribuanWithComma($nominal_kamar)}} {{-- {{ribuan($nominal_nonstay)}} --}} {{ribuanWithComma($nominal_nonstay)}} {{-- {{ribuan($nominal_ledger)}} --}} {{ribuanWithComma($nominal_ledger)}} {{($nominal_cash - $item->grand_total_pos) > 0 ? ribuanWithComma($nominal_cash - $item->grand_total_pos) : 0}} {{$item->complimentary_id ? 'C' : ''}}
Discount {{ribuan( $disc_per_tipe[$shop->id][$fg_tipe_item_idx] )}}
G - Total {{count($transactions)}} {{ribuan( $total_tipe_gross[$tipe->id] )}}{{ribuan( $total_tipe_gross[$shop->id][$fg_tipe_item_idx] )}}{{ribuan($total_tipe_gross[$tipe->id])}}{{ribuanWithComma($total_tipe_gross[$tipe->id])}}{{ribuan($total_tipe_gross[$tipe->id])}}{{ribuanWithComma($total_tipe_gross[$tipe->id])}}{{ribuanWithComma($total_tipe_gross[''])}}{{ribuan($Total_Disc_G)}} {{ribuan($total_services)}} {{ribuan($total_tax)}}{{ribuanWithComma($Total_Disc_G)}} {{ribuanWithComma($total_services)}} {{ribuanWithComma($total_tax)}} {{ribuan($total_gross)}} {{ribuan($total_cash)}} {{ribuan($total_card)}} {{ribuan($total_digital)}} {{ribuan($total_transfer_kamar)}} {{ribuan($total_nonstay)}} {{ribuan($total_ledger)}}{{ribuanWithComma($total_gross)}} {{ribuanWithComma($total_cash)}} {{ribuanWithComma($total_card)}} {{ribuanWithComma($total_digital)}} {{ribuanWithComma($total_transfer_kamar)}} {{ribuanWithComma($total_nonstay)}} {{ribuanWithComma($total_ledger)}} {{ribuanWithComma($total_change)}}
R - Total @php $countMinusCompliment = count($transactions) - $count_compliment; @endphp {{$countMinusCompliment}} {{ribuan( $total_tipe_nett[$tipe->id] )}}{{ribuan( $total_tipe_nett[$shop->id][$fn_tipe_item_idx] )}}{{ribuan($total_tipe_nett[$tipe->id])}}{{ribuanWithComma($total_tipe_nett[$tipe->id])}}{{ribuan($total_tipe_nett[$tipe->id])}}{{ribuanWithComma($total_tipe_nett[$tipe->id])}}{{ribuanWithComma($total_tipe_nett[''])}}{{ribuan($Total_Disc_N)}} {{ribuan($total_services)}} {{ribuan($total_tax)}}{{ribuanWithComma($Total_Disc_N)}} {{ribuanWithComma($total_services)}} {{ribuanWithComma($total_tax)}} {{ribuan($total_nett)}} {{ribuan($total_cash)}} {{ribuan($total_card)}} {{ribuan($total_digital)}} {{ribuan($total_transfer_kamar)}} {{ribuan($total_nonstay)}} {{ribuan($total_ledger)}}{{ribuanWithComma($total_nett)}} {{ribuanWithComma($total_cash)}} {{ribuanWithComma($total_card)}} {{ribuanWithComma($total_digital)}} {{ribuanWithComma($total_transfer_kamar)}} {{ribuanWithComma($total_nonstay)}} {{ribuanWithComma($total_ledger)}} {{ribuanWithComma($total_change)}}
 

No Data

 

No Transactions Today.

@if(count($transactions) > 0)
{{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}}
Description Amount
Cash{{ribuan($total_cash)}}{{ribuanWithComma($total_cash)}}
Card{{ribuan($total_card)}}{{ribuanWithComma($total_card)}}
Digital{{ribuan($total_digital)}}{{ribuanWithComma($total_digital)}}
Transfer Kamar{{ribuan($total_transfer_kamar)}}{{ribuanWithComma($total_transfer_kamar)}}
Transfer Nonstay{{ribuan($total_nonstay)}}{{ribuanWithComma($total_nonstay)}}
Ledger{{ribuan($total_ledger)}}{{ribuanWithComma($total_ledger)}}
Compliment{{ribuan($total_compliment)}}{{ribuanWithComma($total_compliment)}}
   
Total{{ribuan($Total)}}{{ribuanWithComma($Total)}}
@endif