From d21a2e03631896722babf39643a89c3859f26036 Mon Sep 17 00:00:00 2001 From: Nur Izzati Zulkifli Date: Thu, 27 Jul 2023 12:26:11 +0800 Subject: [PATCH] update coding for ppc percent --- resources/views/includes/sidebar.blade.php | 2 +- resources/views/kpi/senaraitempkpi.blade.php | 93 +++++++++++++++++--- 2 files changed, 84 insertions(+), 11 deletions(-) diff --git a/resources/views/includes/sidebar.blade.php b/resources/views/includes/sidebar.blade.php index 40b57ad4..900a5094 100644 --- a/resources/views/includes/sidebar.blade.php +++ b/resources/views/includes/sidebar.blade.php @@ -124,7 +124,7 @@
  • Jana dataKPI
  • -
  • +
  • Senarai dataKPI
  • diff --git a/resources/views/kpi/senaraitempkpi.blade.php b/resources/views/kpi/senaraitempkpi.blade.php index 937347b8..6d859176 100644 --- a/resources/views/kpi/senaraitempkpi.blade.php +++ b/resources/views/kpi/senaraitempkpi.blade.php @@ -61,8 +61,11 @@ Nama Staff NoKP Staff Aging (1-6bulan) + {{-- Markah --}} Aging (>6-12bulan) + {{-- Markah --}} Aging (>12bulan) + {{-- Markah --}} Penebusan (RM) {{-- Tindakan --}} @@ -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 - {{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}% + {{-- {{ number_format($percent,2) }}% --}} + {{ number_format($percent,2) }}%
    {{ number_format(($markah),2) }}% {{-- //>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 - {{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}% + {{-- {{ number_format($percent,2) }}% --}} + {{ number_format($percent,2) }}%
    {{ number_format(($markah),2) }}% {{-- >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 - {{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}% + {{-- {{ number_format(($jumlahsum/$jumpembiayaan)*100,2) }}% --}} + {{-- {{ number_format($percent,2) }}% --}} + {{ number_format($percent,2) }}%
    {{ number_format(($markah),2) }}% {{ number_format($send['laporan_ringkasan']['total_tebus'] , 2)}}