@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
{{-- @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)}}
|
@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
|
{{--
{{@$individualledger->hotel->nama}}
| --}}
{{@$individualledger->nama_pelanggan}}
|
{{@$individualledger->nama_pelanggan}}
|
Rp {{ribuan($balance_total)}}
|
@endforeach
@foreach($cartrestos as $cartresto)
{{-- @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)}}
|
@endforeach