MIF_E31210257/bangunan testing/resources/views/admin/app/content/detail-buku-besar.blade.php

104 lines
4.6 KiB
PHP

@include('components.theme.pages.header')
<div class="row">
<div class="col-md-12">
<div class="card">
@if(session()->has('success'))
<div class="alert alert-success">
{{ session()->get('success') }}
</div>
@else
@if(session()->has('error'))
<div class="alert alert-danger">
{{ session()->get('error') }}
</div>
@endif
@endif
<div class="card-header">
<h6 class="text-primary m-0">Buku Besar: {{ $akun->nama_akun }}</h6>
</div>
<div class="card-body">
<div class="mb-3">
<h4 class="h6 font-weight-bold">Nama Akun : <strong>{{ $akun->nama_akun }}</strong> </h4>
<h4 class="h6 font-weight-bold">Kode Akun : <strong>{{ $akun->kode_akun }}</strong> </h4>
<h4 class="h6 font-weight-bold">Periode : <strong>{{ $periode }}</strong> </h4>
</div>
<table class="table table-striped table-bordered text-center">
<tr>
<th class="text-center" colspan="3">Transaksi</th>
<th class="text-center" colspan="2">Saldo</th>
</tr>
<tr>
<th class="text-center">No</th>
<th class="text-center">Waktu Transaksi</th>
<th class="text-center">Keterangan</th>
<th class="text-center">Debet</th>
<th class="text-center">Kredit</th>
</tr>
<?php $i = 1 ?>
@foreach($daftar_buku as $data)
<tr>
<td class="text-center">{{ $i++ }}</td>
<td class="text-center">{{ $data->waktu_transaksi }}</td>
<td class="text-center">{{ $data->keterangan }}</td>
<td>
@if($data->tipe === 'd')
Rp. {{ number_format($data->nominal, 0, ',', '.') }},-
@else
-
@endif
</td>
<td>
@if($data->tipe === 'k')
Rp. {{ number_format($data->nominal, 0, ',', '.') }},-
@else
-
@endif
</td>
</tr>
@endforeach
<tr>
<th colspan="3" class="text-center">Jumlah</th>
<th class="text-center">Rp. {{ number_format($total_debet, 0, ',', '.') }},-</th>
<th class="text-center">Rp. {{ number_format($total_kredit, 0, ',', '.') }},-</th>
</tr>
<tr>
<th colspan="3" class="text-center">Saldo</th>
<th colspan="2" class="text-center">
@if( substr($akun->kode_akun, 0, 1) === '1' || substr($akun->kode_akun, 0, 1) === '4' )
Rp. {{ number_format(abs($total_debet - $total_kredit), 0, ',', '.') }},-
@elseif( substr($akun->kode_akun, 0, 1) === '2' || substr($akun->kode_akun, 0, 1) === '3' ||
substr($akun->kode_akun, 0, 1) === '5' )
Rp. {{ number_format($total_kredit - $total_debet, 0, ',', '.') }},-
@endif
</th>
</tr>
<tr>
<th colspan="3" class="text-center">Terbilang</th>
<th colspan="2" class="text-center">
<em>
@if( substr($akun->kode_akun, 0, 1) === '1' || substr($akun->kode_akun, 0, 1) === '4')
{{ ucwords(terbilang(abs($total_debet - $total_kredit))) }} Rupiah
@elseif( substr($akun->kode_akun, 0, 1) === '2' || substr($akun->kode_akun, 0, 1) ===
'3' || substr($akun->kode_akun, 0, 1) === '5')
{{ ucwords(terbilang(abs($total_kredit - $total_debet))) }} Rupiah
@endif
</em>
</th>
</tr>
</table>
</div>
</div>
</div>
</div>
@include('components.theme.pages.footer')