{{ $shop->nama}}
{{@$shop->hotel->nama}}
{{@$shop->hotel->alamat}}
{{-- {{date('d F y H:i')}} --}}

{!! $copy ? '** (copy)' : '*' !!}
@if ($carts->order_flag == null) Date : {{ now()->format('d-m-y') }}   {{ now()->format('H:i') }}
Customer : {{ @$compliment ? $compliment->name : ($carts->nama_pelanggan ? $carts->nama_pelanggan : 'Default User' ) }} @else No. Bill : {{$carts->order_flag}}
@if ($carts->table) Table No. {{@$carts->table->nomor_meja}} @endif
Date : {{ now()->format('d-m-y') }}   {{ now()->format('H:i') }}
Customer : {{$carts->nama_pelanggan ? $carts->nama_pelanggan: 'default user'}} @endif
Cashier : {{@$carts->user->nama ?? \Auth::user()->nama}}
{{-- kondisi untuk menentukan bayar pos/sendtoguestbill/roomservice --}} @if ($carts->kamar_id != 0)
Room : {{@$carts->kamar->no_kamar}} {{-- A.N.Kasir POS ABC --}}
@elseif ($carts->status == 3) {{-- kondisi jika send to guest bill --}}
Room : {{@$carts->kamar->no_kamar}}
@endif
Menu Total
@php $sub_total_review = 0; $total_discount = 0; $service_review = 0; $tax_review = 0; $grand_total_review = 0; @endphp @foreach ($orders as $idx=>$order) @php if ($checker) { $grand_total_review += $order->keterangan_custom == null ? @$inserted['price'][$order->id] : @$inserted['price'][$order->id] * @$inserted['qty'][$order->id] ; }else{ $sub_total_review += @$order->total_biaya - $order->diskon; $total_discount += @$order->diskon; $service_review += @$order->service; $tax_review += @$order->ppn; $grand_total_review += @$order->grand_total - $order->diskon; } @endphp @if ($checker) {{-- --}} @else @if ($carts->status == 3) {{-- kondisi jika transfer ke kamar --}} @php $harga_per_item = $order->jumlah == 0 ? 0 : $order->grand_total/$order->jumlah; @endphp {{-- --}} @else {{-- kondisi jika tidak ke kamar --}} {{-- --}} @endif @endif {{-- @if($order->diskon>0) --}} {{-- Kondisi jika ada diskon --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- --}} {{-- @endif --}} @endforeach
{{ @$order->menu_id ? @$order->menu->nama : $order->keterangan_custom}} {{@$inserted['qty'][$order->id] ?? @$order->jumlah}}
{{$inserted['qty'][$order->id]}} x {{ribuanWithComma($order->keterangan_custom == null ? ($inserted['qty'][$order->id] == 0 ? 0 : $inserted['price'][$order->id] / $inserted['qty'][$order->id]) : $inserted['price'][$order->id])}} {{ribuanWithComma($order->keterangan_custom == null ? ( $inserted['price'][$order->id] ) : $inserted['price'][$order->id]*$inserted['qty'][$order->id] )}}
{{ @$order->menu_id ? @$order->menu->nama : $order->keterangan_custom}}
{{$order->jumlah}} x {{ribuanWithComma($harga_per_item)}}{{@$cart->menu->nama ? ribuanWithComma($order->menu->harga) : ribuanWithComma($order->total_biaya)}}{{ribuanWithComma($order->grand_total)}}
{{ @$order->menu_id ? @$order->menu->nama : $order->keterangan_custom}}
{{$order->jumlah}} x {{@$order->menu->nama ? ( $carts->complimentary_id > 0 ? ribuanWithComma($order->jumlah > 0 ? ($order->grand_total/$order->jumlah) : 0) : ribuanWithComma($order->menu->harga)) : ribuanWithComma($order->jumlah > 0 ? ($order->grand_total/$order->jumlah) : 0)}}{{@$cart->menu->nama ? ribuanWithComma($order->menu->harga) : ribuanWithComma($order->grand_total)}}{{ribuanWithComma($order->grand_total)}}
Discount {{@$cart->menu->nama ? ribuanWithComma($order->menu->harga) : ribuanWithComma($order->total_biaya)}}- {{ribuanWithComma($order->diskon)}}

@if ($total_discount > 1)
Total Discount : {{ribuanWithComma(($total_discount*-1))}}
@endif

{{--
---------- {{date('d.m.y H:i:s')}} ----------
--}} {{-- PEMBATAS FOREACH --}} {{-- Jika ini print preview --}} @if ($carts->order_flag == null) @php // defining $ppn = $shop->ppn; $services = $shop->services; //$discounts = $sub_total_review*$discount['discount']/100; //$disc_charge = ($sub_total_review) - ($discount['tipe'] == 1 ? $discounts : $discount['discount']); // operating // $service_review = ( $sub_total_review * $services/100); // $tax_review = ( ($sub_total_review + $service_review) * $ppn/100); // $grand_total_review = $sub_total_review + $tax_review + $service_review; $total_pembayaran = 0;// variable total pembayaran @endphp {{-- @if (!$checker) @endif --}} {{-- dummy space --}} {{-- --}} @if (!$checker) @if (count($carts->pembayaranpos) > 0) @foreach ($carts->pembayaranpos as $key=>$item) @if ($item->jenis_pembayaran_id == 1) @php $total_pembayaran += $item->nominal; @endphp @endif @endforeach @foreach ($carts->pembayaranpos as $key=>$item) @if ($item->jenis_pembayaran_id == 2 || $item->jenis_pembayaran_id == 4) @php $total_pembayaran += $item->nominal; @endphp @endif @endforeach @foreach ($carts->pembayaranpos as $key=>$item) @if ($item->jenis_pembayaran_id == 3 || $item->jenis_pembayaran_id == 6 ) @php $total_pembayaran += $item->nominal; @endphp @endif @endforeach @foreach ($carts->pembayaranpos as $key=>$item) @if ($item->jenis_pembayaran_id == 5 ) @php $total_pembayaran += $item->nominal; @endphp @endif @endforeach @foreach ($carts->pembayaranpos as $key=>$item) @if ($item->jenis_pembayaran_id == 7 ) @php $total_pembayaran += $item->nominal; @endphp @endif @endforeach @endif @php if($carts->complimentary_id > 0){ $balance = 0; } else { $balance = $grand_total_review + ($total_pembayaran *-1); } @endphp @endif
Sub Total : {{ribuanWithComma($sub_total_review)}}
Service : {{ribuanWithComma($service_review)}}
Tax : {{ribuanWithComma($tax_review)}}
 
Grand Total : {{ribuanWithComma($grand_total_review)}}
 
     
Cash : {{ribuanWithComma(($item->nominal * -1))}}
{{@$item->platform->nama}} - {{$item->voucher}} : {{ribuanWithComma(($item->nominal * -1))}}
Transfer Nonstay : {{ribuanWithComma(($item->nominal * -1))}}
{{@$item->ledger->name}} : {{ribuanWithComma(($item->nominal * -1))}}
Transfer to Room - {{ @$item->Invoice->nomor_kamar }} - {{$nama_ini}} : {{ribuanWithComma(($item->nominal * -1))}}
 
     
Balance : {{ribuanWithComma(str_replace('-','',$balance))}}
@endif {{-- Jika Transaksi bayar langsung di POS --}} @if($carts->pembayaranpos && $carts->order_flag != null) @php $discount = $carts->sub_total*$carts->discount/100; $disc_charge = ($carts->sub_total) - ($carts->type_discount == 1 ? $discount : $carts->discount); // variable unutk total refund $total = 0; $balance = 0; // Variable Balance $status_bill = 0; //status_nonstay. $refund_for_transfer = 0;//for transfer room or nonstay $refund_for_transfer_cash = 0;//for transfer room or nonstay $total_pembayaran = 0;// variable total pembayaran @endphp {{-- --}} {{-- --}} {{-- Kondisi jika guest bill : tidak ada pembayaran maka hanya grand total saja --}} @if($carts->complimentary_id > 0) @endif @if ($carts->status != 3) @foreach ($carts->pembayaranpos as $key=>$item) @if ($item->jenis_pembayaran_id == 1) @php $total += ($item->nominal * -1); $refund_for_transfer_cash += ($item->nominal); $total_pembayaran += $item->nominal; @endphp @endif @endforeach @foreach ($carts->pembayaranpos as $key=>$item) @if ($item->jenis_pembayaran_id == 2 || $item->jenis_pembayaran_id == 4) @php $total += ($item->nominal * -1); $total_pembayaran += $item->nominal; @endphp @endif @endforeach @foreach ($carts->pembayaranpos as $key=>$item) @if ($item->jenis_pembayaran_id == 3 || $item->jenis_pembayaran_id == 6 ) @php $status_bill = 1;// kondisi jika jenis pembyaran nonstay $refund_for_transfer_cash += ($item->nominal);//nonstay $total += ($item->nominal * -1); $total_pembayaran += $item->nominal; @endphp @endif @endforeach @foreach ($carts->pembayaranpos as $key=>$item) @if ($item->jenis_pembayaran_id == 5 ) @php $total += ($item->nominal * -1); $total_pembayaran += $item->nominal; @endphp @endif @endforeach @foreach ($carts->pembayaranpos as $key=>$item) @if ($item->jenis_pembayaran_id == 7 ) @php $total += ($item->nominal * -1); $total_pembayaran += $item->nominal; $nama_ini = $carts->nama_pelanggan ? $carts->nama_pelanggan: 'default user'; @endphp @endif @endforeach @php $refund = 0; @endphp @if ($carts->complimentary_id == 0) @php $refund = 0;//variable if ($carts->complimentary_id == 0) { if ($status_bill == 1) { $refund = ($refund_for_transfer_cash * -1) + ($carts->grand_total_pos - $refund_for_transfer ); }else { $refund = ($total) + ($carts->grand_total_pos); } }else{ $refund = 0; } @endphp @endif @endif @php if($carts->complimentary_id > 0){ $balance = 0; } else { $balance = $carts->grand_total_pos + ($total_pembayaran *-1) - $refund; } @endphp
Disc. : {{ribuanWithComma(($total_discount*-1))}}
Sub Total : {{ribuanWithComma($sub_total_review)}}
Service : {{ribuanWithComma($service_review)}}
Tax : {{ribuanWithComma($tax_review)}}
{{ $carts->complimentary_id > 0 ? 'Compliment' : 'Grand Total' }} : {{ $carts->complimentary_id > 0 ? $carts->complimentary->name : ribuanWithComma($grand_total_review )}}
{{ @$carts->coa->description}}
 
     
Cash : {{ribuanWithComma(($item->nominal))}}
{{@$item->platform->nama}} - {{$item->voucher}} : {{ribuanWithComma(($item->nominal))}}
Transfer Nonstay : {{ribuanWithComma(($item->nominal))}}
{{@$item->ledger->name}} : {{ribuanWithComma(($item->nominal))}}
Transfer to Room - {{ @$item->Invoice->nomor_kamar }} - {{@$item->Invoice->nama_pelanggan}} : {{ribuanWithComma(($item->nominal))}}
 
     
Change : {{ribuanWithComma(str_replace('-','',$refund))}}
Balance : {{ribuanWithComma(str_replace('-','',$balance))}}
@endif
Thank You
Please Come Again
By Hotely