@php $profile = App\Http\Controllers\Controller::static_profile(); @endphp Billing {{-- --}}
{{-- --}}

@if ((isset($res['pdf']) && $res['pdf']) || (isset($res['storage']) && $res['storage'])) @else {{-- @if (stripos(\Request::url(), 'localhost') !== false || stripos(\Request::url(), '127.0.0.1') !== false) --}} {{-- @else @endif --}} @endif

{!! strtoupper($profile->namapemerintahan) !!}
{!! $profile->alamatlengkap !!}
{{ $profile->fixedphone }}
Email : {!! $profile->alamatemail !!}


INVOICE
{{-- --}}
No. Registrasi : {{ $res['identitas']->noregistrasi }} Unit : {{ $res['identitas']->namadepartemen }}
No. RM / Umur : {{ $res['identitas']->nocm }} / {{ $res['identitas']->umur }} Ruang : {{ $res['identitas']->namaruangan }}
Nama Pasien : {{ $res['identitas']->namapasien . ' (' . $res['identitas']->jeniskelamin . ')' }} Tgl Masuk : {{ date_format(date_create($res['identitas']->tglregistrasi), 'd/m/Y') }}
DPJP : {{ $res['identitas']->namalengkap }} Tgl Pulang : {{ date_format(date_create($res['identitas']->tglpulang), 'd/m/Y') }}
Tipe : {{ $res['identitas']->kelompokpasien }} Penjamin : {{ $res['identitas']->namarekanan }}
No Kartu : {{ $res['identitas']->nobpjs }} Penjamin : {{ $res['identitas']->namarekanan }}
@php $nomor = 0; $totaltagihan = 0; $totaldiskon = 0; $jumlahbill = 0; $totaldiklaim = 0; @endphp @foreach ($res['billing'] as $ruangan) @php $subtotals = 0; @endphp @foreach ($ruangan->groupBy('jenis') as $jen => $item) @foreach ($item->groupBy('layanan_group') as $keyly => $lygroup) @php $total = 0; $diskon = 0; @endphp @foreach ($lygroup as $data) @php $total = $total + $data->total; $diskon = $diskon + $data->diskon; $nomor = $nomor + 1; $subtotals = $subtotals + $data->total; @endphp @endforeach @endforeach @endforeach @php $totaltagihan = $totaltagihan + $total; $totaldiskon = $totaldiskon + $diskon; $jumlahbill = $totaltagihan - $totaldiskon; @endphp @endforeach
No Tanggal Jenis Biaya Qty Tarif Sub Total
{{ strtoupper($ruangan[0]->namaruangan) }}
{{ $keyly }}
{{ $nomor }} {{ date_format(date_create($data->tglpelayanan), 'd/m/Y') }} {{ $data->namaproduk }} x{{ $data->jumlah }} {{ number_format($data->hargasatuan, 0, '.', ',') }} {{ number_format($data->total, 0, '.', ',') }}
{{ number_format($total, 0, '.', ',') }}
Sub Total : {{ number_format($subtotals, 0, '.', ',') }}
{{-- @if ($res['pengembalian'] > 0) @endif --}} @if ($res['ismultipenjamin'] == true) @foreach ($res['multipenjamin'] as $item) @php $total = $total + $item->totalppenjamin; @endphp @endforeach @endif
TOTAL TAGIHAN : {{ number_format($res['total'], 0, '.', ',') }}
DEPOSIT - UANG MUKA : {{ number_format($res['deposit'], 0, '.', ',') }}
PENGEMBALIAN DEPOSIT : {{ number_format($res['pengembalian'], 0, '.', ',') }}
{{ $item->namarekanan }} : {{ number_format($item->totalppenjamin, 0, '.', ',') }}
TOTAL BAYAR : {{ number_format($res['dibayar'], 0, '.', ',') }}
TOTAL DIKLAIM : {{ number_format($res['klaim'], 0, '.', ',') }}
TERBILANG :
# {{ strtoupper(App\Traits\Valet::static_terbilang($res['total'])) }} #
{!! $profile->namakota !!}, {{--   {{ date('d/m/Y H:i') }} --}}   {{ date('j-F-Y', strtotime($res['identitas']->tglclosing ?? '')) }}
Penanggung Biaya Kasir
{{ str_replace('( Laki-laki )', '', str_replace('( Perempuan )', '', $res['identitas']->namapasien)) }} -