Merged in atie (pull request #10)

update coding for ppc percent
This commit is contained in:
izzati zulkifli
2023-07-27 04:26:41 +00:00
2 changed files with 84 additions and 11 deletions
+1 -1
View File
@@ -124,7 +124,7 @@
<li class="{{ (request()->is('janakpi/janaekpi/*') || request()->is('janakpi/janaekpi') ) ? 'active' : '' }}">
<a href="{{url('janakpi/janaekpi')}}">Jana dataKPI</a>
</li>
<li class="{{ (request()->is('janakpi/janaekpi/*') || request()->is('janakpi/janaekpi') ) ? 'active' : '' }}">
<li class="{{ (request()->is('janakpi/listdatakpi/*') || request()->is('janakpi/listdatakpi') ) ? 'active' : '' }}">
<a href="{{url('janakpi/listdatakpi')}}">Senarai dataKPI</a>
</li>
+83 -10
View File
@@ -61,8 +61,11 @@
<th align="left">Nama Staff</th>
<th align="left">NoKP Staff</th>
<th>Aging (1-6bulan)</th>
{{-- <th>Markah</th> --}}
<th>Aging (>6-12bulan)</th>
{{-- <th>Markah</th> --}}
<th>Aging (>12bulan)</th>
{{-- <th>Markah</th> --}}
<th>Penebusan (RM)</th>
{{-- <th class="text-center">Tindakan</th> --}}
</tr>
@@ -131,30 +134,100 @@
@if ($index < 6)
@php
$jumlahcount += $ag; $jumlahsum += $send['aging'][0]['sum'][$index];
@endphp
$percent = ($jumlahsum/$jumpembiayaan)*100;
@endphp
@if($percent <= '85.00')
@php
$markah = 100.00;
@endphp
@elseif($percent > '85.00' && $percent <= '90.00')
@php
$markah = 75.00;
@endphp
@elseif($percent > '90.00' && $percent <= '95.00')
@php
$markah = 50.00;
@endphp
@elseif($percent > '95.00' && $percent <= '100.00')
@php
$markah = 25.00;
@endphp
@elseif($percent > '100.00')
@php
$markah = 0.00;
@endphp
@endif
@endif
@endforeach
<td align="center">{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}%<input type="hidden" class="form-control" id="aging1" name="aging1[]" value="{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}"></td>
{{-- <td align="center">{{ number_format($percent,2) }}%</td> --}}
<td align="center">{{ number_format($percent,2) }}%<br><b>{{ number_format(($markah),2) }}%</b><input type="hidden" class="form-control" id="aging1" name="aging1[]" value="{{ number_format(($markah),2) }}"></td>
{{-- //>6 Bulan --}}
@php $jumlahcount = 0;$jumlahsum = 0; @endphp
@foreach($send['aging'][0]['sum'] as $index=>$ag)
@if ($index > 5 && $index < 12 )
@php
$jumlahsum += $send['aging'][0]['sum'][$index];
@endphp
@php
$jumlahsum += $send['aging'][0]['sum'][$index];
$percent = ($jumlahsum/$jumpembiayaan)*100;
@endphp
@if($percent <= '15.00')
@php
$markah = 100.00;
@endphp
@elseif($percent > '15.00' && $percent <= '16.00')
@php
$markah = 75.00;
@endphp
@elseif($percent > '16.00' && $percent <= '17.00')
@php
$markah = 50.00;
@endphp
@elseif($percent > '17.00' && $percent <= '18.00')
@php
$markah = 25.00;
@endphp
@elseif($percent > '18.00')
@php
$markah = 0.00;
@endphp
@endif
@endif
@endforeach
<td align="center">{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}%<input type="hidden" class="form-control" id="aging2" name="aging2[]" value="{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}"></td>
{{-- <td align="center">{{ number_format($percent,2) }}%</td> --}}
<td align="center">{{ number_format($percent,2) }}%<br><b>{{ number_format(($markah),2) }}%</b><input type="hidden" class="form-control" id="aging2" name="aging2[]" value="{{ number_format($markah,2) }}"></td>
{{-- >12 Bulan --}}
@php $jumlahcount = 0;$jumlahsum = 0; @endphp
@foreach($send['aging'][0]['sum'] as $index=>$ag)
@if ($index > 11 && $index < 14)
@php
$jumlahsum += $send['aging'][0]['sum'][$index];
@endphp
@php
$jumlahsum += $send['aging'][0]['sum'][$index];
$percent = ($jumlahsum/$jumpembiayaan)*100;
@endphp
@if($percent <= '1.00')
@php
$markah = 100.00;
@endphp
@elseif($percent > '1.00' && $percent <= '2.00')
@php
$markah = 75.00;
@endphp
@elseif($percent > '2.00' && $percent <= '3.00')
@php
$markah = 50.00;
@endphp
@elseif($percent > '3.00' && $percent <= '4.00')
@php
$markah = 25.00;
@endphp
@elseif($percent > '5.00')
@php
$markah = 0.00;
@endphp
@endif
@endif
@endforeach
<td align="center">{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}%<input type="hidden" class="form-control" id="aging3" name="aging3[]" value="{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}"></td>
{{-- <td align="center">{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}%<input type="hidden" class="form-control" id="aging3" name="aging3[]" value="{{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}"></td> --}}
{{-- <td align="center">{{ number_format($percent,2) }}%</td> --}}
<td align="center">{{ number_format($percent,2) }}%<br><b>{{ number_format(($markah),2) }}%</b><input type="hidden" class="form-control" id="aging3" name="aging3[]" value="{{ number_format($markah,2) }}"></td>
<td align="right"> {{ number_format($send['laporan_ringkasan']['total_tebus'] , 2)}} <input type="hidden" class="form-control" id="total_tebus" name="total_tebus[]" value="{{ $send['laporan_ringkasan']['total_tebus'] }}"></td>
</tr>