add pendahuluan

This commit is contained in:
MUHD HAFIFIE
2021-08-23 16:58:56 +08:00
parent 59a3c012b3
commit de7bdaa3af
4 changed files with 83 additions and 26 deletions
+3 -3
View File
@@ -38,7 +38,7 @@
<div class="inner">
<h3>RM {{ ($ringkasanharian['gadai'][0]['jumlahpinjaman']) ? number_format($ringkasanharian['gadai'][0]['jumlahpinjaman'],2) : "0.00" }}</h3>
<p style="font-weight:bold;">Gadai Hari Ini</p>
<p style="font-weight:bold;">Pembiayaan Hari Ini</p>
</div>
<div class="icon">
</div>
@@ -171,7 +171,7 @@
<div class="inner">
<h3>RM {{ ($dashboard[0]['variasi']) ? number_format((float)$dashboard[0]['variasi'],2) : "0.00" }}</h3>
<p>Varian</p>
<p>Varians</p>
</div>
<div class="icon">
</div>
@@ -231,7 +231,7 @@
<div class="inner">
<h3>RM {{ ($komuditicheck) ? number_format($komuditicheck['unit_komuditi'],2) : '0.00' }}</h3>
<p>Baki Komuditi</p>
<p>Baki Komoditi</p>
</div>
<div class="icon">
</div>
@@ -20,6 +20,17 @@
<div class="card-body">
@php
$dt = \Carbon\Carbon::now();
$date = $dt->format('Y-m-d');
@endphp
<div class="col-12 d-flex justify-content-end">
<button class="btn btn-danger fas fa-trash-alt" onclick="togglepadam();"></button>
</div>
<div class="mt-3 mx-auto">
{{-- @php $date = date('yy-m-d'); @endphp --}}
<table class='table table-hover table-striped table-bordered' id='table-pendahuluanserahan' style="width: 100%;">
@@ -29,7 +40,7 @@
<th>Description</th>
<th>Pendahuluan (RM)</th>
<th>Serahan (RM)</th>
{{-- <th>Tindakan</th> --}}
<th>Tindakan</th>
</tr>
</thead>
<tbody>
@@ -39,7 +50,7 @@
<td>{{ $gldetail['descpt'] }}</td>
<td>{{ ($gldetail['pendahuluan'] == 0 && ($gldetail['ktacct'] == '7000/102' || $gldetail['ktacct'] == '7000/106')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['pendahuluan'],2) }}</td>
<td>{{ ($gldetail['serahan'] == 0 && ($gldetail['dtacct'] == '1000/026' || $gldetail['dtacct'] == '1000/020' || $gldetail['dtacct'] == '1000/090')) ? number_format($gldetail['amaun'],2) : number_format($gldetail['serahan'],2) }}</td>
{{-- @if($date === $gldetail['tarikh']) <td class="text-center"><button onclick="deletependser();" class="btn btn-danger fas fa-trash-alt"></button></td>@else<td></td> @endif --}}
@if($date === $gldetail['tarikh']) <td class="text-center"><button onclick="deletependser();" class="btn btn-danger fas fa-minus-square"></button></td>@else<td></td> @endif
</tr>
@endforeach
</tbody>
@@ -62,7 +73,14 @@
var tablependahuluanserahan = $('#table-pendahuluanserahan').DataTable({
"scrollX": true,
"order": [[ 0, "desc" ]]
"order": [[ 0, "desc" ]],
"columnDefs": [
{
"targets": [ 4 ],
"visible": false,
"searchable": false
}
]
});
let api = "{{ config('api.url') }}";
@@ -112,6 +130,15 @@
});
function togglepadam()
{
event.preventDefault();
var column = tablependahuluanserahan.column(4);
column.visible(!column.visible());
}
function deletependser()
{
Swal.fire({
@@ -124,14 +151,14 @@
cancelButtonColor: '#d33',
confirmButtonText: 'Teruskan!'
}).then((result) => {
if (result.isConfirmed) {
Swal.fire(
'Deleted!',
'Your file has been deleted.',
'success'
)
}
});
if (result.isConfirmed) {
Swal.fire(
'Deleted!',
'Your file has been deleted.',
'success'
)
}
});
}
function validateformat(evt)