dashboard operasi

This commit is contained in:
MUHD HAFIFIE
2021-04-21 15:55:09 +08:00
parent bde37da6c3
commit 0189a7b6b0
7 changed files with 69 additions and 41 deletions
+3 -1
View File
@@ -2089,7 +2089,9 @@ class KhazanahController extends Controller
$split_date = explode('-',$request->datetimepicker1);
$tebus_date = $split_date[2] . '-' . $split_date[1] . '-' . $split_date[0];
}
$stokaudit = Http::get(config('api.url'). '/api/gadai/cawangan/'. $auth_user['cawangan']. '/' . $tebus_date)->json();
// $stokaudit = Http::get(config('api.url'). '/api/gadai/cawangan/'. $auth_user['cawangan']. '/' . $tebus_date)->json();
$stokaudit = Http::get(config('api.url'). '/api/stokaudit/aktif/'. $auth_user['cawangan'],['tarikh' => $tebus_date])->json();
$cawangan=Http::get(config('api.url').'/api/cawangan/detail/'.$auth_user['cawangan'])->json();
$cawangan_detail=$cawangan[0];
// dd($gadai);
@@ -22,7 +22,7 @@
</div>
<div class="row">
<div class="col-md-5">
<form action="{{ route('stokaudit.laporancetak') }}" target="_blank" method="post">
<form action="{{ route('stokaudit.laporancetak') }}" target="_blank" method="get">
@csrf
<div class="input-group mb-3">
<div class="input-group-prepend">
+28 -21
View File
@@ -116,6 +116,9 @@
</li>
<script>
var audiokhazanah = new Audio("{{ asset('sound/3.wav') }}");
audiokhazanah.muted = true;
// Enable pusher logging - don't include this in production
// Pusher.logToConsole = true;
@@ -130,32 +133,36 @@
var channel = pusher.subscribe('status-liked');
channel.bind('my-event', function(data) {
// let message = JSON.stringify(data);
if(cawangankhazanah == data.cawangan)
{
$('#bell').css("color", "red");
$('#linkz').text(data.namateller + " Memohon Kelulusan");
$("#linkz").attr("href", "{{ url('kelulusan') }}");
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 5000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
$('#bell').css("color", "red");
$('#linkz').text(data.namateller + " Memohon Kelulusan");
$("#linkz").attr("href", "{{ url('kelulusan') }}");
audiokhazanah.play();
audiokhazanah.muted = false;
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 5000,
timerProgressBar: true,
didOpen: (toast) => {
toast.addEventListener('mouseenter', Swal.stopTimer)
toast.addEventListener('mouseleave', Swal.resumeTimer)
}
})
Toast.fire({
icon: 'error',
title: 'Kelulusan Dipohon Sekarang!'
})
}
})
Toast.fire({
icon: 'error',
title: 'Kelulusan Dipohon Sekarang!'
})
}
});
@@ -112,6 +112,9 @@
<script>
var audio = new Audio("{{ asset('sound/3.wav') }}");
audio.muted = true;
// Enable pusher logging - don't include this in production
Pusher.logToConsole = false;
@@ -128,6 +131,9 @@
$('#linkz').text(data.namateller + " Pohon Kelulusan");
$("#linkz").attr("href", "{{ url('kelulusan') }}");
audio.play();
audio.muted = false;
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
@@ -209,9 +209,11 @@
<th>Berat</th>
<th>N Marhun</th>
<th>Pembiayaan</th>
<th>Peratus (%)</th>
</tr>
@php $counter = 0; @endphp
@php $counter = 1; $totalpinjaman = 0; @endphp
@foreach($gadai as $index=>$item)
@php $totalpinjaman += $item['pinjaman'] @endphp
@if($index > 0)
@if($item['teller'] != $gadai[$index - 1]['teller'])
<tr>
@@ -224,6 +226,7 @@
</tr>
@endif
<tr>
<td>{{ $counter }}</td>
<td colspan=2 style="width:100px">{{$item['norujukan']}}</td>
<td>
@php
@@ -232,18 +235,19 @@
@endphp
</td>
<td>{{$customer_detail[0]['alamat1']}}</td>
<td>{{$item['nokp']}}</td>
<td>{{$item['masa']}}</td>
<td>{{$item['marhun']}}</td>
<td>{{$item['berat']}}</td>
<td>{{$item['nilaimarhun']}}</td>
<td>{{$item['pinjaman'] . ' ' . $item['percentpinj'].'%'}}</td>
<td>{{ $item['nokp'] }}</td>
<td>{{ $item['masa'] }}</td>
<td>{{ $item['marhun'] }}</td>
<td>{{ number_format($item['berat'],2) }}</td>
<td>{{ number_format($item['nilaimarhun'],2) }}</td>
<td>{{ number_format($item['pinjaman'],2) }}</td>
<td>{{ $item['percentpinj'] }}</td>
</tr>
@php $counter++; @endphp
@if($index+1 < sizeof($gadai))
@if($item['teller'] != $gadai[$index + 1]['teller'])
<tr>
<td colspan=10>{{ $counter }} Jumlah Bagi Teller : {{$item['teller']}}</td>
<td colspan=10>{{ $counter-1 }} Jumlah Surat Bagi Teller : {{$item['teller']}}</td>
</tr>
@php $counter = 0; @endphp
@endif
@@ -253,6 +257,11 @@
</tr>
@endif
@endforeach
<tfoot>
<th colspan="9" style="text-align:right;">JUMLAH</th>
<th>{{ number_format($totalpinjaman,2) }}</th>
<th></th>
</tfoot>
</table>
<br>
@@ -213,7 +213,7 @@
<th>N Marhun</th>
<th>Jenis Tebus</th>
</tr>
@php $counter = 0; @endphp
@php $counter = 0; $totalpembiayaan = 0;@endphp
@foreach($tebus as $index=>$item)
@if($index > 0)
@if($item['teller'] != $tebus[$index - 1]['teller'])
@@ -227,6 +227,7 @@
</tr>
@endif
<tr>
<td>{{ $loop->iteration }}</td>
<td colspan=2>{{$item['norujukan']}}</td>
<td>
@php
@@ -198,34 +198,37 @@
<br>
<table id="details">
<tr>
<thead>
<th>Bil</th>
<th>Norujukan</th>
<th>JBG</th>
<th>No. KP</th>
<th>Marhun</th>
<th>Berat</th>
<th>Nilai Marhun (RM)</th>
<th>Pembiayaan</th>
<th>Jenis Tebus</th>
</tr>
<th>Lanjutan</th>
</thead>
@php $counter = 1; @endphp
@foreach($stokaudit as $index=>$item)
@foreach($stokaudit['rekod'] as $index=>$item)
<tr>
<td>{{ $counter }}</td>
<td>{{$item['norujukan']}}</td>
<td>{{ $item['jbg'] }}</td>
<td>{{$item['nokp']}}</td>
<td>{{ $item['marhun'] }}</td>
<td>{{ number_format($item['berat'],2) }}</td>
<td>{{ number_format($item['nilaimarhun'],2) }}</td>
<td>{{ number_format($item['pinjaman'],2) }}</td>
<td>{{$item['jenistebus']}}</td>
<td>{{$item['lelong_tawarruq']}}</td>
</tr>
@php $counter++; @endphp
@endforeach
<tfoot>
<th colspan='4'>Jumlah</th>
<th>{{ number_format($stokaudit['totalberat'],2) }}</th>
<th>{{ number_format($stokaudit['totalnilaimarhun'],2) }}</th>
<th>{{ number_format($stokaudit['total'],2) }}</th>
<th></th>
</tfoot>
</table>
<br>