@php // variabel untuk hitung total qty $total_qty = 0; // variable untuk hitung total sales $total_sales = 0; // variable untuk hitung total sales $total_payment = 0; @endphp @if(count($transactions) > 0) @foreach ( $transactions as $key => $transaction ) @foreach ($transaction->menu as $detail) @php // menghitung total harga dengan cost complimentary $grand_total_complimentary = 0; if ($transaction->complimentary_id > 0) { foreach ($transaction->menu as $k => $menu) { $grand_total_complimentary += $menu->grand_total_complimentary; } } //hitung qty $total_qty += $detail->jumlah; // hitung total sales $ptotal_sales = $transaction->complimentary_id > 0 ? $detail->grand_total_complimentary : $detail->grand_total; $ptotal_sales -= $detail->diskon; $total_sales += $ptotal_sales; @endphp {{-- --}} @endforeach @php // Variable untuk sum pembayaran $sum_total_bayar = 0; @endphp @foreach ($transaction->pembayaranpos as $pembayaran) @if ($pembayaran->jenis_transaksi == 1) @php // hitung total qty $total_qty += 1; // hitung total bayar agar bisa dapat change $sum_total_bayar += $pembayaran->nominal; @endphp {{-- --}} @endif @endforeach {{-- @if ($transaction->status == 1) --}} @php // hitung total qty $total_qty += 1; // hitung change $change = $transaction->complimentary_id > 0 ? 0 : ($sum_total_bayar) - ($transaction->grand_total_pos); // hitung total payment $total_payment += $change - $sum_total_bayar ; @endphp {{-- --}} {{-- @endif --}} @endforeach {{-- --}} @else @endif
Date Table Number No{{'.'}} Bill Department Item Type Description Qty Sales Payment Time GuestName Room No Note
{{formatDate($detail->transaction_date)}} {{@$detail->cartresto->table->nomor_meja}} {{@$detail->cartresto->order_flag}} {{@$detail->shop->nama}} {{@$detail->tipeMenu->nama_tipe ?? '-'}} {{@$detail->menu->nama ?? $detail->keterangan_custom}} {{$detail->jumlah}}{{$transaction->complimentary_id > 0 ? ribuan($detail->grand_total_complimentary) : ribuan($detail->grand_total)}}{{ribuanWithComma($ptotal_sales)}} @if ($detail->diskon>0)
Disc. {{ribuanWithComma($detail->diskon)}} @endif
0 {{$detail->created_at->format('H:i')}} {{$transaction->nama_pelanggan}} {{@$transaction->kamar->no_kamar}} {{$transaction->status == 3 ? 'T. Kamar':''}}
{{formatDate($pembayaran->transaction_date)}} {{@$pembayaran->cart->table->nomor_meja}} {{@$pembayaran->cart->order_flag}} {{@$pembayaran->cart->shop->nama}} {{$pembayaran->jenis_pembayaran_id ? config('custom.jenis_pembayaran')[$pembayaran->jenis_pembayaran_id] : ''}} {{$pembayaran->platform ? $pembayaran->platform->nama : (config('custom.jenis_pembayaran')[$pembayaran->jenis_pembayaran_id] ?? 'Compliment') }} 1 0-{{ribuan(@$pembayaran->nominal)}}-{{ribuanWithComma(@$pembayaran->nominal)}} {{@$pembayaran->created_at->format('H:i')}} {{$transaction->nama_pelanggan}} {{@$transaction->kamar->no_kamar}} {{$pembayaran->jenis_pembayaran_id == 6 ? 'T. NonStay': ($transaction->status == 3 ? 'T.Kamar':'') }}
{{formatDate($detail->transaction_date)}} {{@$transaction->table->nomor_meja}} {{@$transaction->order_flag}} Change Change {{$transaction->shop->nama}} 1 0{{ribuan($change)}}{{ribuanWithComma($change)}} {{@$transaction->updated_at->format('H:i')}} {{$transaction->nama_pelanggan}} {{@$transaction->kamar->no_kamar}} {{$transaction->status == 3 ? 'T. Kamar':''}}
Total {{ribuan($total_qty)}} {{ribuan($total_sales)}} {{ribuan($total_payment)}} {{ribuanWithComma($total_qty)}} {{ribuanWithComma($total_sales)}} {{ribuanWithComma($total_payment)}}

Tidak Ada Transaksi Hari Ini