diff --git a/.env b/.env new file mode 100644 index 00000000..3c42d175 --- /dev/null +++ b/.env @@ -0,0 +1,143 @@ +#-------------------------------------------------------------------- +# Example Environment Configuration file +# +# This file can be used as a starting point for your own +# custom .env files, and contains most of the possible settings +# available in a default install. +# +# By default, all of the settings are commented out. If you want +# to override the setting, you must un-comment it by removing the '#' +# at the beginning of the line. +#-------------------------------------------------------------------- + +#-------------------------------------------------------------------- +# ENVIRONMENT +#-------------------------------------------------------------------- + +CI_ENVIRONMENT = development + +#-------------------------------------------------------------------- +# APP +#-------------------------------------------------------------------- + +# app.baseURL = '' +# If you have trouble with `.`, you could also use `_`. +# app_baseURL = '' +# app.forceGlobalSecureRequests = false +# app.CSPEnabled = false + +#-------------------------------------------------------------------- +# DATABASE +#-------------------------------------------------------------------- + +# database.default.hostname = localhost +# database.default.database = ci4 +# database.default.username = root +# database.default.password = root +# database.default.DBDriver = MySQLi +# database.default.DBPrefix = +# database.default.port = 3306 + +# database.tests.hostname = localhost +# database.tests.database = ci4_test +# database.tests.username = root +# database.tests.password = root +# database.tests.DBDriver = MySQLi +# database.tests.DBPrefix = +# database.tests.port = 3306 + +#-------------------------------------------------------------------- +# CONTENT SECURITY POLICY +#-------------------------------------------------------------------- + +# contentsecuritypolicy.reportOnly = false +# contentsecuritypolicy.defaultSrc = 'none' +# contentsecuritypolicy.scriptSrc = 'self' +# contentsecuritypolicy.styleSrc = 'self' +# contentsecuritypolicy.imageSrc = 'self' +# contentsecuritypolicy.baseURI = null +# contentsecuritypolicy.childSrc = null +# contentsecuritypolicy.connectSrc = 'self' +# contentsecuritypolicy.fontSrc = null +# contentsecuritypolicy.formAction = null +# contentsecuritypolicy.frameAncestors = null +# contentsecuritypolicy.frameSrc = null +# contentsecuritypolicy.mediaSrc = null +# contentsecuritypolicy.objectSrc = null +# contentsecuritypolicy.pluginTypes = null +# contentsecuritypolicy.reportURI = null +# contentsecuritypolicy.sandbox = false +# contentsecuritypolicy.upgradeInsecureRequests = false +# contentsecuritypolicy.styleNonceTag = '{csp-style-nonce}' +# contentsecuritypolicy.scriptNonceTag = '{csp-script-nonce}' +# contentsecuritypolicy.autoNonce = true + +#-------------------------------------------------------------------- +# COOKIE +#-------------------------------------------------------------------- + +# cookie.prefix = '' +# cookie.expires = 0 +# cookie.path = '/' +# cookie.domain = '' +# cookie.secure = false +# cookie.httponly = false +# cookie.samesite = 'Lax' +# cookie.raw = false + +#-------------------------------------------------------------------- +# ENCRYPTION +#-------------------------------------------------------------------- + +# encryption.key = +# encryption.driver = OpenSSL +# encryption.blockSize = 16 +# encryption.digest = SHA512 + +#-------------------------------------------------------------------- +# HONEYPOT +#-------------------------------------------------------------------- + +# honeypot.hidden = 'true' +# honeypot.label = 'Fill This Field' +# honeypot.name = 'honeypot' +# honeypot.template = '' +# honeypot.container = '
' + +#-------------------------------------------------------------------- +# SECURITY +#-------------------------------------------------------------------- + +# security.csrfProtection = 'cookie' +# security.tokenRandomize = false +# security.tokenName = 'csrf_token_name' +# security.headerName = 'X-CSRF-TOKEN' +# security.cookieName = 'csrf_cookie_name' +# security.expires = 7200 +# security.regenerate = true +# security.redirect = false +# security.samesite = 'Lax' + +#-------------------------------------------------------------------- +# SESSION +#-------------------------------------------------------------------- + +# session.driver = 'CodeIgniter\Session\Handlers\FileHandler' +# session.cookieName = 'ci_session' +# session.expiration = 7200 +# session.savePath = null +# session.matchIP = false +# session.timeToUpdate = 300 +# session.regenerateDestroy = false + +#-------------------------------------------------------------------- +# LOGGER +#-------------------------------------------------------------------- + +# logger.threshold = 4 + +#-------------------------------------------------------------------- +# CURLRequest +#-------------------------------------------------------------------- + +# curlrequest.shareOptions = false diff --git a/app/Controllers/Home.php b/app/Controllers/Home.php index 941dfded..0d000785 100644 --- a/app/Controllers/Home.php +++ b/app/Controllers/Home.php @@ -31,12 +31,14 @@ class Home extends BaseController $param = array('tahun' => $tahun, 'bln' => $bulan); $p['tahunx'] = $tahun; + $p['bulanx'] = $bulan; $p['penerimaan'] = $model->getPenn($param)->getResult(); $p['updatex'] = $model->getUpd()->getFirstRow('array'); $p['perkategori'] = $model->getKat($param)->getResult(); $p['pie_penerimaan'] = $model->getPiePen($param)->getResult(); $p['paycomp'] = $model->paycompNas($param)->getResult(); $p['parsesof'] = $model->sofNas($param)->getResult(); + $p['refbulan'] = $model->getBln(); diff --git a/app/Models/Mpemby.php b/app/Models/Mpemby.php index e581b466..61bc154d 100644 --- a/app/Models/Mpemby.php +++ b/app/Models/Mpemby.php @@ -37,10 +37,10 @@ class Mpemby extends Model $bln = $param['bln']; $query = $this->db->query("SELECT CASE WHEN KD_KATEGORI IS NULL THEN '-' ELSE KD_KATEGORI END KODE, CASE WHEN KD_KATEGORI IS NULL THEN 'UNKNOWN' ELSE NM_KATEGORI END NMKAT, - SUM(CASE WHEN THNBYR = '" . $tahun . "' AND BLNBYR = '" . $bln . "' THEN WPBAYAR ELSE 0 END)WPBYRN, - SUM(CASE WHEN THNBYR = '" . $tahunl . "' AND BLNBYR = '" . $bln . "' THEN WPBAYAR ELSE 0 END)WPBYRP, - SUM(CASE WHEN THNBYR = '" . $tahun . "' AND BLNBYR = '" . $bln . "' THEN ROUND(TOTAL) ELSE 0 END) KPENN, - SUM(CASE WHEN THNBYR = '" . $tahunl . "' AND BLNBYR = '" . $bln . "' THEN ROUND(TOTAL) ELSE 0 END) KPENP + SUM(CASE WHEN THNBYR = '" . $tahun . "' AND BLNBYR <= '" . $bln . "' THEN WPBAYAR ELSE 0 END)WPBYRN, + SUM(CASE WHEN THNBYR = '" . $tahunl . "' AND BLNBYR <= '" . $bln . "' THEN WPBAYAR ELSE 0 END)WPBYRP, + SUM(CASE WHEN THNBYR = '" . $tahun . "' AND BLNBYR <= '" . $bln . "' THEN ROUND(TOTAL) ELSE 0 END) KPENN, + SUM(CASE WHEN THNBYR = '" . $tahunl . "' AND BLNBYR <= '" . $bln . "' THEN ROUND(TOTAL) ELSE 0 END) KPENP FROM PERKATEGORI_MV GROUP BY KD_KATEGORI,NM_KATEGORI ORDER BY KD_KATEGORI ASC @@ -71,6 +71,7 @@ class Mpemby extends Model { $tahun = $param['tahun']; $tahunl = $tahun - 1; + $bln = $param['bulan']; $query = $this->db->query("SELECT A.JMLBULAN, A.JUMLAHWP,B.JUMLAHWP JUMLAHWPP FROM (SELECT TO_NUMBER(BLNBYR) JMLBULAN,JUMLAHWP FROM PAYCOMPNAS WHERE THNBYR = '" . $tahun . "') A, @@ -84,11 +85,18 @@ class Mpemby extends Model function sofNas($param) { $tahun = $param['tahun']; - $query = $this->db->query("SELECT LAPISAN,WPBYR,TOTAL, + $query = $this->db->query("SELECT LAPISAN,SUM(WPBYR) WPBYR,SUM(TOTAL) TOTAL, (SELECT SUM(WPBYR) FROM SOFNAS WHERE THNBYR = '" . $tahun . "') TOTWPBYR, (SELECT SUM(TOTAL) FROM SOFNAS WHERE THNBYR = '" . $tahun . "') TOTALL FROM ( - SELECT LAPISAN,TO_NUMBER(WPBYR) WPBYR,ROUND(TOTAL) TOTAL FROM SOFNAS WHERE THNBYR = '" . $tahun . "')"); + SELECT LAPISAN,TO_NUMBER(WPBYR) WPBYR,ROUND(TOTAL) TOTAL FROM SOFNAS WHERE THNBYR = '" . $tahun . "') GROUP BY LAPISAN ORDER BY LAPISAN ASC"); return $query; } + + function getBln() + { + $builder = $this->db->table('BULAN'); + $builder->select('*'); + return $builder->get()->getResult(); + } } diff --git a/app/Views/inc/js.php b/app/Views/inc/js.php index eeb179f7..0815ea00 100644 --- a/app/Views/inc/js.php +++ b/app/Views/inc/js.php @@ -18,7 +18,7 @@ - + diff --git a/app/Views/ppm/dashboard.php b/app/Views/ppm/dashboard.php index d8055fbe..53747f2d 100644 --- a/app/Views/ppm/dashboard.php +++ b/app/Views/ppm/dashboard.php @@ -94,7 +94,10 @@ foreach ($paycomp as $rowp) { } $datapaycomp = $datapaycomp . "]"; +$tahun2 = date('Y'); +$rentang_tahun = range($tahun2, 2022); +$hariini = date('d-m-y'); ?> @@ -106,9 +109,30 @@ $datapaycomp = $datapaycomp . "]";