fix latest
This commit is contained in:
@@ -41,7 +41,9 @@
|
||||
{{-- {{ dd($arraytunai) }} --}}
|
||||
|
||||
<ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
|
||||
<script> let listu = [];</script>
|
||||
@foreach($listUser as $index1=>$ls)
|
||||
<script> listu.push("{{ $ls->id }}"); </script>
|
||||
|
||||
@if($index1 == 0)
|
||||
<li class="nav-item">
|
||||
@@ -59,7 +61,7 @@
|
||||
<div class="tab-content" id="pills-tabContent">
|
||||
|
||||
@foreach($listUser as $index1=>$ls)
|
||||
{{-- {{ dd(empty($arraytunai[1])) }} --}}
|
||||
|
||||
@if($index1 == 0)
|
||||
<div class="tab-pane fade show active" id="pills-{{ $ls->id }}" role="tabpanel" aria-labelledby="pills-home-tab">
|
||||
|
||||
@@ -145,38 +147,121 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<table class='table mt-4' id='table-{{ $ls->id }}' style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>bil</th>
|
||||
<th>Tarikh</th>
|
||||
<th>Baki Awal Tunai</th>
|
||||
<th>Tunai Diterima</th>
|
||||
<th>Tunai Dikeluar</th>
|
||||
<th>Gadaian</th>
|
||||
<th>Tebusan</th>
|
||||
<th>Baki Akhir Tunai</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($arraytunai[$index1] as $tunai)
|
||||
<nav>
|
||||
<div class="nav nav-tabs mb-4" id="nav-tab" role="tablist">
|
||||
<a class="nav-item nav-link active" id="nav-home-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-history" role="tab" aria-controls="nav-history" aria-selected="true">History Tunai</a>
|
||||
<a class="nav-item nav-link" id="nav-home-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-addtunai" role="tab" aria-controls="nav-addtunai" aria-selected="true">Tunai</a>
|
||||
<a class="nav-item nav-link" id="nav-profile-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-gt" role="tab" aria-controls="nav-gt" aria-selected="false">Gadai / Tebus</a>
|
||||
<a class="nav-item nav-link" id="nav-contact-tab" data-toggle="tab" href="#nav-{{ $ls->id }}-tuntutbaki" role="tab" aria-controls="nav-tuntutbaki" aria-selected="false">Tuntut Baki</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="tab-content" id="nav-tabContent">
|
||||
|
||||
<div class="mt-3">
|
||||
<div class="tab-pane fade show active" id="nav-{{ $ls->id }}-history" role="tabpanel" aria-labelledby="nav-history-tab">
|
||||
<table class='table' id='table-{{ $ls->id }}' style="width:100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>bil</th>
|
||||
<th>Tarikh</th>
|
||||
<th>Baki Awal Tunai</th>
|
||||
<th>Tunai Diterima</th>
|
||||
<th>Tunai Dikeluar</th>
|
||||
<th>Gadaian</th>
|
||||
<th>Tebusan</th>
|
||||
<th>Baki Akhir Tunai</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($arraytunai[$index1] as $tunai)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $tunai['tarikh'] }}</td>
|
||||
<td>{{ number_format($tunai['bakiawal'],2) }}</td>
|
||||
<td>{{ number_format($tunai['tambah'],2) }}</td>
|
||||
<td>{{ number_format($tunai['kurang'],2) }}</td>
|
||||
<td>{{ number_format($tunai['keluar'],2) }}</td>
|
||||
<td>{{ number_format($tunai['masuk'],2) }}</td>
|
||||
<td>{{ number_format($tunai['baki'],2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-tunai" role="tabpanel" aria-labelledby="nav-tunai-tab">
|
||||
.....
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-gt" role="tabpanel" aria-labelledby="nav-gt-tab">
|
||||
|
||||
<table class="table text-center" id="tablegadaitebus-{{ $ls->id }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $tunai['tarikh'] }}</td>
|
||||
<td>{{ $tunai['bakiawal'] }}</td>
|
||||
<td>{{ $tunai['tambah'] }}</td>
|
||||
<td>{{ $tunai['kurang'] }}</td>
|
||||
<td>{{ $tunai['keluar'] }}</td>
|
||||
<td>{{ $tunai['masuk'] }}</td>
|
||||
<td>{{ $tunai['baki'] }}</td>
|
||||
<th>Bil</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Pinjaman (RM)</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>Jenis Transaksi</th>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(is_object($arraygadaitebus) || is_array($arraygadaitebus))
|
||||
@foreach($arraygadaitebus[$index1] as $gt)
|
||||
<tr>
|
||||
<td> {{ $loop->iteration }} </td>
|
||||
<td> {{ $gt['norujukan'] }} </td>
|
||||
<td> {{ number_format($gt['pinjaman'],2) }} </td>
|
||||
<td> {{ number_format($gt['nilaimarhun'],2) }} </td>
|
||||
<td> @php if($gt['jenistebus'] == ''){
|
||||
echo '<h4><span class="badge badge-success">Gadai</span></h4>';
|
||||
}else{
|
||||
echo '<h4><span class="badge badge-danger">Tebus</span></h4>';
|
||||
}
|
||||
@endphp </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-tuntutbaki" role="tabpanel" aria-labelledby="nav-tuntutbaki-tab">
|
||||
<table class="table text-center" id="tabletuntutbaki-{{ $ls->id }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Tarikh</th>
|
||||
<th>Caj Lelong (RM)</th>
|
||||
<th>Jumlah (RM)</th>
|
||||
<th>Jenis</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(is_object($arraytuntutbaki) || is_array($arraytuntutbaki))
|
||||
@foreach($arraytuntutbaki[$index1] as $tb)
|
||||
<tr>
|
||||
<td> {{ $loop->iteration }} </td>
|
||||
<td> {{ $tb['tarikh'] }} </td>
|
||||
<td> {{ number_format($tb['cajlelong'],2) }} </td>
|
||||
<td> {{ number_format($tb['jumlah'],2) }} </td>
|
||||
<td> @php if($tb['jenis'] == 'T'){
|
||||
echo '<h4><span class="badge badge-success">Baki Lelong</span></h4>';
|
||||
}else{
|
||||
echo '<h4><span class="badge badge-danger">Rugi Lelong</span></h4>';
|
||||
}
|
||||
@endphp </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@else
|
||||
@@ -264,42 +349,125 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<nav>
|
||||
<div class="nav nav-tabs mb-4" id="nav-tab" role="tablist">
|
||||
<a class="nav-item nav-link active" id="nav-history-tab-{{ $ls->id }}" data-toggle="tab" href="#nav-{{$ls->id}}-history" role="tab" aria-controls="nav-history-{{ $ls->id }}" aria-selected="true">History Tunai</a>
|
||||
<a class="nav-item nav-link" id="nav-tunai-tab-{{ $ls->id }}" data-toggle="tab" href="#nav-{{$ls->id}}-tunai" role="tab" aria-controls="nav-tunai-{{ $ls->id }}" aria-selected="true">Tunai</a>
|
||||
<a class="nav-item nav-link" id="nav-gt-tab-{{ $ls->id }}" data-toggle="tab" href="#nav-{{$ls->id}}-gt" role="tab" aria-controls="nav-gt-{{ $ls->id }}" aria-selected="false">Gadai / Tebus</a>
|
||||
<a class="nav-item nav-link" id="nav-tuntutbaki-tab-{{ $ls->id }}" data-toggle="tab" href="#nav-{{$ls->id}}-tuntutbaki" role="tab" aria-controls="nav-tuntutbaki-{{ $ls->id }}" aria-selected="false">Tuntut Baki</a>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="mt-3">
|
||||
|
||||
<table class='table mt-4' id='table-{{ $ls->id }}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>bil</th>
|
||||
<th>Tarikh</th>
|
||||
<th>Baki Awal Tunai</th>
|
||||
<th>Tunai Diterima</th>
|
||||
<th>Tunai Dikeluar</th>
|
||||
<th>Gadaian</th>
|
||||
<th>Tebusan</th>
|
||||
<th>Baki Akhir Tunai</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{-- {{ dd($arraytunai) }} --}}
|
||||
@foreach ($arraytunai[$index1] as $tunai)
|
||||
{{-- {{ dd($tunai) }} --}}
|
||||
|
||||
<div class="tab-content" id="nav-tabContent">
|
||||
<div class="mt-3">
|
||||
<div class="tab-pane fade show active" id="nav-{{$ls->id}}-history" role="tabpanel" aria-labelledby="nav-history-tab-{{ $ls->id }}">
|
||||
<table class='table mt-4' id='table-{{ $ls->id }}'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>bil</th>
|
||||
<th>Tarikh</th>
|
||||
<th>Baki Awal Tunai</th>
|
||||
<th>Tunai Diterima</th>
|
||||
<th>Tunai Dikeluar</th>
|
||||
<th>Gadaian</th>
|
||||
<th>Tebusan</th>
|
||||
<th>Baki Akhir Tunai</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{-- {{ dd($arraytunai) }} --}}
|
||||
@foreach ($arraytunai[$index1] as $tunai)
|
||||
{{-- {{ dd($tunai) }} --}}
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $tunai['tarikh'] }}</td>
|
||||
<td>{{ $tunai['bakiawal'] }}</td>
|
||||
<td>{{ $tunai['tambah'] }}</td>
|
||||
<td>{{ $tunai['kurang'] }}</td>
|
||||
<td>{{ $tunai['keluar'] }}</td>
|
||||
<td>{{ $tunai['masuk'] }}</td>
|
||||
<td>{{ $tunai['baki'] }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-tunai" role="tabpanel" aria-labelledby="nav-tunai-tab-{{ $ls->id }}">
|
||||
.....
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-gt" role="tabpanel" aria-labelledby="nav-gt-tab-{{ $ls->id }}">
|
||||
|
||||
<table class="table text-center mt-4" id="tablegadaitebus-{{ $ls->id }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td>{{ $tunai['tarikh'] }}</td>
|
||||
<td>{{ $tunai['bakiawal'] }}</td>
|
||||
<td>{{ $tunai['tambah'] }}</td>
|
||||
<td>{{ $tunai['kurang'] }}</td>
|
||||
<td>{{ $tunai['keluar'] }}</td>
|
||||
<td>{{ $tunai['masuk'] }}</td>
|
||||
<td>{{ $tunai['baki'] }}</td>
|
||||
<th>Bil</th>
|
||||
<th>No Rujukan</th>
|
||||
<th>Pinjaman (RM)</th>
|
||||
<th>Nilai Marhun (RM)</th>
|
||||
<th>Jenis Transaksi</th>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(is_object($arraygadaitebus) || is_array($arraygadaitebus))
|
||||
@foreach($arraygadaitebus[$index1] as $gt)
|
||||
<tr>
|
||||
<td> {{ $loop->iteration }} </td>
|
||||
<td> {{ $gt['norujukan'] }} </td>
|
||||
<td> {{ number_format($gt['pinjaman'],2) }} </td>
|
||||
<td> {{ number_format($gt['nilaimarhun'],2) }} </td>
|
||||
<td> @php if($gt['jenistebus'] == ''){
|
||||
echo '<h4><span class="badge badge-success">Gadai</span></h4>';
|
||||
}else{
|
||||
echo '<h4><span class="badge badge-danger">Tebus</span></h4>';
|
||||
}
|
||||
@endphp </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="nav-{{ $ls->id }}-tuntutbaki" role="tabpanel" aria-labelledby="nav-tuntutbaki-tab-{{ $ls->id }}">
|
||||
|
||||
<table class="table text-center" id="tabletuntutbaki-{{ $ls->id }}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Bil</th>
|
||||
<th>Tarikh</th>
|
||||
<th>Caj Lelong (RM)</th>
|
||||
<th>Jumlah (RM)</th>
|
||||
<th>Jenis</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@if(is_object($arraytuntutbaki) || is_array($arraytuntutbaki))
|
||||
@foreach($arraytuntutbaki[$index1] as $tb)
|
||||
<tr>
|
||||
<td> {{ $loop->iteration }} </td>
|
||||
<td> {{ $tb['tarikh'] }} </td>
|
||||
<td> {{ $tb['cajlelong'] }} </td>
|
||||
<td> {{ $tb['jumlah'] }} </td>
|
||||
<td> @php if($tb['jenis'] == 'T'){
|
||||
echo '<h4><span class="badge badge-success">Baki Lelong</span></h4>';
|
||||
}else{
|
||||
echo '<h4><span class="badge badge-danger">Rugi Lelong</span></h4>';
|
||||
}
|
||||
@endphp </td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@@ -357,18 +525,23 @@
|
||||
</div>
|
||||
<script>
|
||||
|
||||
// var tablecapaian = $('#table-tunai').DataTable({
|
||||
// "scrollX": true
|
||||
// });
|
||||
$(document).ready(function() {
|
||||
|
||||
$(listu).each(function(index,element) {
|
||||
var tabletunai = $('#table-' + element).DataTable({
|
||||
});
|
||||
|
||||
var tablegadaitebus = $('#tablegadaitebus-' + element).DataTable({
|
||||
});
|
||||
|
||||
var tabletuntutbaki = $('#tabletuntutbaki-' + element).DataTable({
|
||||
});
|
||||
});
|
||||
|
||||
var tablecapaian = $('#table-PetiBesi').DataTable({
|
||||
});
|
||||
|
||||
|
||||
let namefordatatable = "{{ $listUser }}";
|
||||
|
||||
console.log(namefordatatable);
|
||||
console.log(JSON.parse(namefordatatable));
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user