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

Payment Method:

Payment Date:

 

Total AR Payment:

@php $no = 1; $idx_item = 0; @endphp @foreach($hotel_bills as $hotel_bill) @php $pay_amount = $hotel_bill->pay_amount ? $hotel_bill->pay_amount : 0; if($hotel_bill->tipe_pembayaran == 1){ $nominal = $hotel_bill->nominal; } else{ $nominal = $hotel_bill->nominal * -1; } $balance = $nominal - $pay_amount; $invoice_company = $hotel_bill->booking->company ? $hotel_bill->booking->company->comp_title.' '.$hotel_bill->booking->company->name : (@$hotel_bill->booking->guest->individual_ledger ? @$hotel_bill->booking->guest->name : '-'); if ($hotel_bill->platform_pembayaran_id) { $invoice_company = @$hotel_bill->platformPembayaran->nama ?? '-'; } $address = $hotel_bill->booking->company ? @$hotel_bill->booking->company->address.', '.@$hotel_bill->booking->company->city : @$hotel_bill->booking->guest->address.', '.@$hotel_bill->booking->guest->city; $department = $hotel_bill->booking->company ? ($hotel_bill->booking->company->department ? $hotel_bill->booking->company->department : 'Accounting Department') : ''; $room_no = ""; if($hotel_bill->booking->bookingDetails){ foreach($hotel_bill->booking->bookingDetails as $booking_detail){ if($hotel_bill->room_index == $booking_detail->room_index){ $room_no = $booking_detail->nomor_kamar; } } } @endphp @if($balance != 0) @php $no++; $idx_item++; @endphp @endif @endforeach @foreach($hotel_bill_deposits as $hotel_bill_deposit) @if(array_key_exists($hotel_bill_deposit->booking_id, $invoice_array)) @if(array_key_exists($hotel_bill_deposit->room_index, $invoice_array[$hotel_bill_deposit->booking_id])) @php $pay_amount = $hotel_bill_deposit->pay_amount ? $hotel_bill_deposit->pay_amount : 0; $balance = $hotel_bill_deposit->nominal - $pay_amount; @endphp @if($balance != 0) @if($hotel_bill_deposit->booking) @php $invoice_company = isset($hotel_bill_deposit->booking->company) ? $hotel_bill_deposit->booking->company->name.', '.$hotel_bill_deposit->booking->company->comp_title : (@$hotel_bill_deposit->booking->guest->individual_ledger ? $hotel_bill_deposit->booking->guest->name : '-'); $address = isset($hotel_bill_deposit->booking->company) ? @$hotel_bill_deposit->booking->company->address.', '.@$hotel_bill_deposit->booking->company->city : @$hotel_bill_deposit->booking->guest->address.', '.@$hotel_bill_deposit->booking->guest->city; $department = $hotel_bill_deposit->booking->company ? ($hotel_bill_deposit->booking->company->department ? $hotel_bill_deposit->booking->company->department : 'Accounting Department') : ''; $room_no = $hotel_bill_deposit->nomor_kamar; if ($hotel_bill_deposit->platform_pembayaran_id) { $invoice_company = @$hotel_bill_deposit->platform->nama ?? '-'; } @endphp @php $no++; $idx_item++; @endphp @endif @endif @endif @endif @if($hotel_bill_deposit->folioDummy) @php $invoice_company = @$hotel_bill_deposit->folioDummy->guestProfile->individual_ledger ? $hotel_bill_deposit->folioDummy->guestProfile->name : '-'; $address = $hotel_bill_deposit->folioDummy->guestProfile ? $hotel_bill_deposit->folioDummy->guestProfile->address.', '.$hotel_bill_deposit->folioDummy->guestProfile->city : '-'; $department = ''; $pay_amount = $hotel_bill_deposit->pay_amount ? $hotel_bill_deposit->pay_amount : 0; $balance = $hotel_bill_deposit->nominal - $pay_amount; if ($hotel_bill_deposit->platform_pembayaran_id) { $invoice_company = @$hotel_bill_deposit->platform->nama ?? '-'; } @endphp @if ($balance != 0) @php $no++; $idx_item++; @endphp @endif @endif @endforeach @foreach($outlet_bills as $outlet_bill) @php $pay_amount = $outlet_bill->pay_amount ? $outlet_bill->pay_amount : 0; $balance = $outlet_bill->nominal - $pay_amount; $invoice_company = $outlet_bill->ledger ? $outlet_bill->ledger->comp_title.' '.$outlet_bill->ledger->name : '-'; if ($outlet_bill->platform_id) { $invoice_company = @$outlet_bill->platform->nama ?? '-'; } $address = $outlet_bill->ledger ? $outlet_bill->ledger->address.', '.$outlet_bill->ledger->city : '-'; $department = $outlet_bill->ledger ? ($outlet_bill->ledger->department ? $outlet_bill->ledger->department : 'Accounting Department') : ''; $room_no = $outlet_bill->nomor_kamar; @endphp @if($balance != 0) @php $no++; $idx_item++; @endphp @endif @endforeach
# Bill No Customer Method Company/Platform Transaction Date Debt Amount Pay Amount Balance Invoice
{{ @$hotel_bill->invoice->no_invoice }} {{ $hotel_bill->invoice->nama_pelanggan ?? 'Customer' }} {{ @$hotel_bill->jenis_pembayaran_id ? config('custom.jenis_pembayaran')[@$hotel_bill->jenis_pembayaran_id] : '-' }} {{ $invoice_company }} {{ $hotel_bill->transaction_date ? date('d-m-Y', strtotime($hotel_bill->transaction_date)) : '-' }} {{ ribuanWithComma($nominal) }} {{ ribuanWithComma($pay_amount) }} {{ ribuanWithComma($balance) }}
{{ $hotel_bill_deposit->booking_id && $hotel_bill_deposit->room_index ? $invoice_array[$hotel_bill_deposit->booking_id][$hotel_bill_deposit->room_index]->no_invoice : '' }} {{ $hotel_bill_deposit->booking_id && $hotel_bill_deposit->room_index ? $invoice_array[$hotel_bill_deposit->booking_id][$hotel_bill_deposit->room_index]->nama_pelanggan : 'Customer' }} {{ @$hotel_bill_deposit->jenis_deposit ? config('custom.jenis_deposit')[@$hotel_bill_deposit->jenis_deposit] : '-' }} {{ $invoice_company }} {{ $hotel_bill_deposit->transaction_date ? date('d-m-Y', strtotime($hotel_bill_deposit->transaction_date)) : '-' }} {{ ribuanWithComma($hotel_bill_deposit->nominal) }} {{ ribuanWithComma($pay_amount) }} {{ ribuanWithComma($balance) }}
{{ @$hotel_bill_deposit->folioDummy->no_bill }} {{ $hotel_bill_deposit->folioDummy->guestProfile->name ?? 'Customer' }} {{ @$hotel_bill_deposit->jenis_deposit ? config('custom.jenis_deposit')[@$hotel_bill_deposit->jenis_deposit] : '-' }} {{ $invoice_company }} {{ $hotel_bill_deposit->transaction_date ? date('d-m-Y', strtotime($hotel_bill_deposit->transaction_date)) : '-' }} {{ ribuanWithComma($hotel_bill_deposit->nominal) }} {{ ribuanWithComma($pay_amount) }} {{ ribuanWithComma($balance) }}
{{ @$outlet_bill->cart->order_flag }} {{ $outlet_bill->cart->nama_pelanggan ?? 'Customer' }} {{ @$outlet_bill->jenis_pembayaran_id ? config('custom.jenis_pembayaran')[@$outlet_bill->jenis_pembayaran_id] : '-' }} {{ $invoice_company }} {{ $outlet_bill->transaction_date ? date('d-m-Y', strtotime($outlet_bill->transaction_date)) : '-' }} {{ ribuanWithComma($outlet_bill->nominal) }} {{ ribuanWithComma($pay_amount) }} {{ ribuanWithComma($balance) }}
{{-- -------------------------------------------------------------- Modal AR Payment -------------------------------------------------------------- --}} {{-- -------------------------------------------------------------- Modal AR Transfer -------------------------------------------------------------- --}} {{-- -------------------------------------------------------------- Modal Create Invoice AR -------------------------------------------------------------- --}} {{-- -------------------------------------------------------------- Modal AR Invoice List -------------------------------------------------------------- --}} @endsection @section('js') @endsection