@extends(\Auth::user()->role != 10 ? 'layout' : 'layoutfrontdesk') @section('title', 'Company Bill | Tambah Company Bill') @section('css') @endsection @section('content')
@csrf

{{ $com->name ?? '' }}

{{--
--}}
{{-- --}} @php $no=1; @endphp @foreach($invoices as $invoice) @php $nominalpembayaran = 0; $nominalrefund = 0; $balance_total = 0; $nominaltransaksishop = 0; $nominalinvoice = $invoice->total - $invoice->total_deposit; if (count($invoice->shop_transaction)) { foreach ($invoice->shop_transaction as $transaction) { $nominaltransaksishop += $transaction->grand_total; } } $balance_total = $nominalinvoice + $nominaltransaksishop - $nominalpembayaran; $balance_total = $balance_total + $nominalrefund; @endphp {{-- --}} @php $no++; @endphp @endforeach @foreach($individualledgers as $individualledger) @php $nominalpembayaran = 0; $nominalrefund = 0; $balance_total = 0; $nominaltransaksishop = 0; $nominalinvoice = $individualledger->total - $individualledger->total_deposit; if (count($individualledger->shop_transaction)) { foreach ($individualledger->shop_transaction as $transaction) { $nominaltransaksishop += $transaction->grand_total; } } $balance_total = $nominalinvoice + $nominaltransaksishop - $nominalpembayaran; $balance_total = $balance_total + $nominalrefund; @endphp {{-- --}} @endforeach @foreach($cartrestos as $cartresto) {{-- --}} @endforeach
#HotelNama Company Nama Pelanggan Total
{{-- @foreach ($invoice->bookings as $booking) --}} {{-- @endforeach --}} {{@$invoice->hotel->nama}} @if (@$invoice->bookings->segmentasi_rate_code == 14) {{@$invoice->nama_pelanggan}} @else {{@$invoice->bookings->company ? $invoice->bookings->company->comp_title.' '.$invoice->bookings->company->name : ''}} @endif {{@$invoice->nama_pelanggan}} Rp {{ribuan($balance_total)}}
{{@$individualledger->hotel->nama}} {{@$individualledger->nama_pelanggan}} {{@$individualledger->nama_pelanggan}} Rp {{ribuan($balance_total)}}
{{-- @foreach ($invoice->bookings as $booking) --}} {{-- @endforeach --}} {{@$cartresto->cart->shop->hotel->nama}} {{@$cartresto->ledger ? $cartresto->ledger->comp_title.' '.$cartresto->ledger->name : ''}} {{@$cartresto->cart->nama_pelanggan}} Rp {{ribuan($cartresto->nominal)}}
@endsection @section('js') @endsection