Browse Source

add spt stats

main^2
dfoso 1 year ago committed by =
parent
commit
713225cb5a
  1. 5
      app/Controllers/Home.php
  2. 28
      app/Models/Mpemby.php
  3. 38
      app/Views/ppm/dashboard.php
  4. 1
      writable/debugbar/debugbar_1709527804.967263.json
  5. 1
      writable/debugbar/debugbar_1709527869.922241.json
  6. 1
      writable/debugbar/debugbar_1709528362.479022.json
  7. 1
      writable/debugbar/debugbar_1709530587.194122.json
  8. 1
      writable/debugbar/debugbar_1709530617.361660.json
  9. 31
      writable/logs/log-2024-03-04.log

5
app/Controllers/Home.php

@ -39,9 +39,10 @@ class Home extends BaseController
$p['paycomp'] = $model->paycompNas($param)->getResult();
$p['parsesof'] = $model->sofNas($param)->getResult();
$p['refbulan'] = $model->getBln();
$p['wp_terdaftar'] =$model->getWpsk()->getFirstRow('array');
$p['wp_sk'] =$model->getBreakdownPen($param)->getFirstRow('array');
$p['wp_terdaftar'] = $model->getWpsk()->getFirstRow('array');
$p['wp_sk'] = $model->getBreakdownPen($param)->getFirstRow('array');
$p['wpadm'] = $model->getWPterdaftar($param)->getFirstRow('array');
$p['laporThn'] = $model->laporTahunan($param)->getFirstRow('array');

28
app/Models/Mpemby.php

@ -87,10 +87,10 @@ class Mpemby extends Model
$tahun = $param['tahun'];
$bln = $param['bln'];
$query = $this->db->query("SELECT NO,LAPISAN,WPBYR,TOTAL,
(SELECT SUM(ROUND(WPBYR/2)) FROM SOFNAS WHERE THNBYR = '" . $tahun ."' AND BLNBYR < = '" . $bln . "') TOTWPBYR,
(SELECT SUM(TOTAL) FROM SOFNAS WHERE THNBYR = '" . $tahun ."' AND BLNBYR < = '" . $bln . "') TOTALL
(SELECT SUM(ROUND(WPBYR/2)) FROM SOFNAS WHERE THNBYR = '" . $tahun . "' AND BLNBYR < = '" . $bln . "') TOTWPBYR,
(SELECT SUM(TOTAL) FROM SOFNAS WHERE THNBYR = '" . $tahun . "' AND BLNBYR < = '" . $bln . "') TOTALL
FROM (
SELECT NO,LAPISAN,SUM(ROUND(WPBYR/2)) WPBYR,SUM(ROUND(TOTAL)) TOTAL FROM SOFNAS WHERE THNBYR = '" . $tahun . "' AND BLNBYR < = '".$bln."'
SELECT NO,LAPISAN,SUM(ROUND(WPBYR/2)) WPBYR,SUM(ROUND(TOTAL)) TOTAL FROM SOFNAS WHERE THNBYR = '" . $tahun . "' AND BLNBYR < = '" . $bln . "'
GROUP BY NO,LAPISAN) ORDER BY NO ASC ");
return $query;
}
@ -104,7 +104,7 @@ class Mpemby extends Model
function getWpsk()
{
$query= $this->db->query("SELECT SUM(CASE WHEN FLAG_WPS_WPK = 'WPK' THEN JUMLAHWP ELSE 0 END) WPK,
$query = $this->db->query("SELECT SUM(CASE WHEN FLAG_WPS_WPK = 'WPK' THEN JUMLAHWP ELSE 0 END) WPK,
SUM(CASE WHEN FLAG_WPS_WPK = 'WPS' THEN JUMLAHWP ELSE 0 END) WPS
FROM WPSK_MV");
return $query;
@ -115,7 +115,7 @@ class Mpemby extends Model
$tahun = $param['tahun'];
$tahunl = $tahun - 1;
$bln = $param['bln'];
$query= $this->db->query("SELECT
$query = $this->db->query("SELECT
SUM(CASE WHEN FLAG_WPS_WPK = 'WPS' AND THNBYR = '" . $tahun . "' AND BLNBYR <= '" . $bln . "' THEN WPBYR ELSE 0 END) WPSWP,
SUM(CASE WHEN FLAG_WPS_WPK = 'WPS' AND THNBYR = '" . $tahunl . "' AND BLNBYR <= '" . $bln . "' THEN WPBYR ELSE 0 END) WPSWPL,
SUM(CASE WHEN FLAG_WPS_WPK = 'WPS' AND THNBYR = '" . $tahun . "' AND BLNBYR <= '" . $bln . "' THEN ROUND(TOTAL) ELSE 0 END) WPSBYRN,
@ -132,13 +132,23 @@ class Mpemby extends Model
{
$tahun = $param['tahun'];
$tahunl = $tahun - 1;
$query = $this->db->query("SELECT
SUM(CASE WHEN TAHUN <= '".$tahun."' THEN JUMLAHWP ELSE 0 END) WPADMNOW,
SUM(CASE WHEN TAHUN <= '".$tahunl."' THEN JUMLAHWP ELSE 0 END) WPADMPAST
SUM(CASE WHEN TAHUN <= '" . $tahun . "' THEN JUMLAHWP ELSE 0 END) WPADMNOW,
SUM(CASE WHEN TAHUN <= '" . $tahunl . "' THEN JUMLAHWP ELSE 0 END) WPADMPAST
FROM WP_TERDAFTAR");
return $query;
}
function laporTahunan($param)
{
$tahun = $param['tahun'];
$tahunl = $tahun - 1;
$query = $this->db->query("SELECT SUM(CASE WHEN TAHUN = '" . $tahun . "' THEN JMLLAPOR ELSE 0 END) LAPORNOW,
SUM(CASE WHEN TAHUN = '" . $tahunl . "' THEN JMLLAPOR ELSE 0 END) LAPORPAST
FROM DASH_SPTTAHUNAN");
return $query;
}
}

38
app/Views/ppm/dashboard.php

@ -374,8 +374,8 @@ $hariini = date('d-m-y');
<thead>
<tr>
<th class="text-center">Tahun</th>
<th class="text-center">WP TERDAFTAR</th>
<th class="text-center">WP BAYAR</th>
<th class="text-center">WP Terdaftar</th>
<th class="text-center">WP Bayar</th>
<th class="text-center">Ratio (%)</th>
</tr>
</thead>
@ -401,6 +401,40 @@ $hariini = date('d-m-y');
</tr>
</tbody>
</table>
<table class="table table-hover">
<thead>
<tr>
<th class="text-center">Tahun</th>
<th class="text-center">WP Lapor</th>
<th class="text-center"></th>
<th class="text-center">Ratio (%)</th>
</tr>
</thead>
<tbody>
<tr>
<td class="text-center"><?php echo $tahunx ?></td>
<td class="text-center"><?= number_format($laporThn['LAPORNOW'], 0, ',', '.') ?></td>
<td class="text-center"></td>
<td class="text-center"><?= number_format(($laporThn['LAPORNOW'] / $wpadm['WPADMNOW']) * 100, 2) ?></td>
</tr>
<tr>
<td class="text-center"><?php echo $tahunx - 1 ?></td>
<td class="text-center"><?= number_format($laporThn['LAPORPAST'], 0, ',', '.') ?></td>
<td class="text-center"></td>
<td class="text-center"><?= number_format(($laporThn['LAPORPAST'] / $wpadm['WPADMPAST']) * 100, 2) ?></td>
</tr>
<tr>
<td class="text-center">Delta</td>
<td class="text-center"><?= number_format(($laporThn['LAPORNOW'] - $laporThn['LAPORPAST']) / $laporThn['LAPORPAST'] * 100, 2) ?>%</td>
<td class="text-center"></td>
<td class="text-center">-</td>
</tr>
</tbody>
</table>
</div>
</div>

1
writable/debugbar/debugbar_1709527804.967263.json

File diff suppressed because one or more lines are too long

1
writable/debugbar/debugbar_1709527869.922241.json

File diff suppressed because one or more lines are too long

1
writable/debugbar/debugbar_1709528362.479022.json

File diff suppressed because one or more lines are too long

1
writable/debugbar/debugbar_1709530587.194122.json

File diff suppressed because one or more lines are too long

1
writable/debugbar/debugbar_1709530617.361660.json

File diff suppressed because one or more lines are too long

31
writable/logs/log-2024-03-04.log

@ -362,3 +362,34 @@ Class 'App\Models\MKanwil' not found
in APPPATH\Views\errors\html\error_exception.php on line 33.
1 [internal function]: CodeIgniter\Debug\Exceptions->shutdownHandler()
INFO - 2024-03-04 17:29:57 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
INFO - 2024-03-04 21:01:02 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
INFO - 2024-03-04 21:01:02 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
INFO - 2024-03-04 21:01:05 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
INFO - 2024-03-04 21:01:05 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
INFO - 2024-03-04 21:01:13 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.
CRITICAL - 2024-03-04 21:01:13 --> Error: Class 'App\Models\MKanwil' not found
in APPPATH\Controllers\Kanwil.php on line 17.
1 SYSTEMPATH\CodeIgniter.php(941): App\Controllers\Kanwil->index()
2 SYSTEMPATH\CodeIgniter.php(502): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\Kanwil))
3 SYSTEMPATH\CodeIgniter.php(361): CodeIgniter\CodeIgniter->handleRequest(null, Object(Config\Cache), false)
4 FCPATH\index.php(79): CodeIgniter\CodeIgniter->run()
CRITICAL - 2024-03-04 21:01:13 --> ErrorException: Uncaught Error: Call to undefined method CodeIgniter\Debug\ExceptionHandler::cleanPath() in C:\xampp\htdocs\engineN\app\Views\errors\html\error_exception.php:33
Stack trace:
#0 C:\xampp\htdocs\engineN\system\Debug\BaseExceptionHandler.php(258): include()
#1 C:\xampp\htdocs\engineN\system\Debug\BaseExceptionHandler.php(261): CodeIgniter\Debug\BaseExceptionHandler->CodeIgniter\Debug\{closure}()
#2 C:\xampp\htdocs\engineN\system\Debug\ExceptionHandler.php(112): CodeIgniter\Debug\BaseExceptionHandler->render(Object(Error), 500, 'C:\\xampp\\htdocs...')
#3 C:\xampp\htdocs\engineN\system\Debug\Exceptions.php(157): CodeIgniter\Debug\ExceptionHandler->handle(Object(Error), Object(CodeIgniter\HTTP\IncomingRequest), Object(CodeIgniter\HTTP\Response), 500, 1)
#4 [internal function]: CodeIgniter\Debug\Exceptions->exceptionHandler(Object(Error))
#5 {main}
thrown
【Previous Exception】
Error
Class 'App\Models\MKanwil' not found
#0 C:\xampp\htdocs\engineN\system\CodeIgniter.php(941): App\Controllers\Kanwil->index()
#1 C:\xampp\htdocs\engineN\system\CodeIgniter.php(502): CodeIgniter\CodeIgniter->runController(Object(App\Controllers\Kanwil))
#2 C:\xampp\htdocs\engineN\system\CodeIgniter.php(361): CodeIgniter\CodeIgniter->handleRequest(NULL, Object(Config\Cache), false)
#3 C:\xampp\htdocs\engineN\index.php(79): CodeIgniter\CodeIgniter->run()
#4 {main}
in APPPATH\Views\errors\html\error_exception.php on line 33.
1 [internal function]: CodeIgniter\Debug\Exceptions->shutdownHandler()
INFO - 2024-03-04 21:01:17 --> Session: Class initialized using 'CodeIgniter\Session\Handlers\FileHandler' driver.

Loading…
Cancel
Save