Spaces:
Running
Running
Download application/views/dashboard1.php from cappucaine/ERP: direct link, hf CLI and curl.
- Browser
- Download file 157 kB
-
https://huggingface.co/spaces/cappucaine/ERP/resolve/main/application/views/dashboard1.php
- Command line
-
hf download hf://spaces/cappucaine/ERP/application/views/dashboard1.php
-
curl -L -o dashboard1.php https://huggingface.co/spaces/cappucaine/ERP/resolve/main/application/views/dashboard1.php
157 kB
<?php
// _global function
$this->db->select('Display_Rows,decFormat');
$resGlobal = $this->db->get('tglobalsetting')->result();
foreach($resGlobal as $row) :
$Display_Rows = $row->Display_Rows;
$decFormat = $row->decFormat;
endforeach;
$decFormat = 2;
date_default_timezone_set("Asia/Jakarta");
$myPRJCODE = '';
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$this->load->view('template/head');
$appName = $this->session->userdata('appName');
$FlagUSER = $this->session->userdata['FlagUSER'];
$DefEmp_ID = $this->session->userdata['Emp_ID'];
//$this->load->view('template/topbar');
//$this->load->view('template/sidebar');
$selPRJCODE = "AllPRJ";
if(isset($_POST['submitPRJ']))
{
$selPRJCODE = $_POST['selPRJCODE'];
}
$appName = $this->session->userdata('appName');
$Emp_ID = $this->session->userdata('Emp_ID');
$myPRJCODE = '';
if($selPRJCODE == "AllPRJ")
{
$myrow = 0;
$sql = "SELECT A.proj_Code
FROM tbl_employee_proj A
LEFT JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.Emp_ID = '$Emp_ID'";
$result = $this->db->query($sql)->result();
foreach($result as $row) :
$myrow = $myrow + 1;
$PRJCODED = $row ->proj_Code;
if($myrow == 1)
{
$myPRJCODE = "'$PRJCODED'";
$myPRJCODE1 = "'$PRJCODED'";
}
if($myrow > 1)
{
$myPRJCODE1 = "$myPRJCODE1, '$PRJCODED'";
$myPRJCODE = "$myPRJCODE1";
}
endforeach;
}
else
{
$myPRJCODE = "'$selPRJCODE'";
}
// ----------------------- PROJECT
$PRJ_CODE = '';
$PRJ_VALUE = 0;
$PRJ_RAP = 0;
$PRJ_RAB = 0;
$TOT_BA = 0;
$TOT_BA_A = 0;
// ----------------------- REQUEST
$REQ_NEW = 0;
$REQ_CON = 0;
$REQ_APP = 0;
$REQ_REV = 0;
$REQ_REJ = 0;
$REQ_CLS = 0;
$TOT_REQ_NEW = 0;
$TOT_REQ_CON = 0;
$TOT_REQ_APP = 0;
$TOT_REQ_REV = 0;
$TOT_REQ_REJ = 0;
$TOT_REQ_CLS = 0;
// ----------------------- PURCHASE ORDER
$PO_NEW = 0;
$PO_CON = 0;
$PO_APP = 0;
$PO_REV = 0;
$PO_REJ = 0;
$PO_CLS = 0;
$TOT_PO_NEW = 0;
$TOT_PO_CON = 0;
$TOT_PO_APP = 0;
$TOT_PO_REV = 0;
$TOT_PO_REJ = 0;
$TOT_PO_CLS = 0;
// ----------------------- ITEM RECEIPT
$IR_NEW = 0;
$IR_CON = 0;
$IR_APP = 0;
$IR_REV = 0;
$IR_REJ = 0;
$IR_CLS = 0;
$TOT_IR_NEW = 0;
$TOT_IR_CON = 0;
$TOT_IR_APP = 0;
$TOT_IR_REV = 0;
$TOT_IR_REJ = 0;
$TOT_IR_CLS = 0;
// ----------------------- PURCHASE INVOICE / FAKTUR
$PINV_NEW = 0;
$PINV_CON = 0; // OUTSTANDING PAYMENT
$PINV_HP = 0;
$PINV_FP = 0;
$PINV_REJ = 0;
$TOT_PINV_NEW = 0;
$TOT_PINV_CON = 0;
$TOT_PINV_HP = 0;
$TOT_PINV_FP = 0;
$TOT_PINV_REJ = 0;
// ----------------------- VOUCHER
$VLK_NEW = 0;
$VLK_CON = 0;
$VLK_APP = 0;
$VLK_REV = 0;
$VLK_REJ = 0;
$VLK_CLS = 0;
$TOT_VLK_NEW = 0;
$TOT_VLK_CON = 0;
$TOT_VLK_APP = 0;
$TOT_VLK_REV = 0;
$TOT_VLK_REJ = 0;
$TOT_VLK_CLS = 0;
// ----------------------- INVOICE / FAKTUR
$INV_NEW = 0;
$INV_CON = 0;
$INV_APP = 0;
$INV_REV = 0;
$INV_REJ = 0;
$INV_CLS = 0;
$TOT_INV_NEW = 0;
$TOT_INV_CON = 0;
$TOT_INV_APP = 0;
$TOT_INV_REV = 0;
$TOT_INV_REJ = 0;
$TOT_INV_CLS = 0;
$TOT_INV_FP = 0;
$TOT_INV_NP = 0;
// ----------------------- RETURN
/*$RET_NEW = 0;
$RET_CON = 0;
$RET_APP = 0;
$RET_REV = 0;
$RET_REJ = 0;
$RET_CLS = 0;
$TOT_RET_NEW = 0;
$TOT_RET_CON = 0;
$TOT_RET_APP = 0;
$TOT_RET_REV = 0;
$TOT_RET_REJ = 0;
$TOT_RET_CLS = 0;*/
// ----------------------- MC
$MC_NEW = 0;
$MC_CON = 0;
$MC_APP = 0;
$MC_REV = 0;
$MC_REJ = 0;
$MC_CLS = 0;
$TOT_MC_NEW = 0;
$TOT_MC_CON = 0;
$TOT_MC_APP = 0;
$TOT_MC_REV = 0;
$TOT_MC_REJ = 0;
$TOT_MC_CLS = 0;
$TOT_MC_INV = 0;
$TOT_MC_FP = 0;
// ----------------------- SITE INSTRUCTION
$SI_NEW = 0;
$SI_CON = 0;
$SI_APP = 0;
$SI_REV = 0;
$SI_REJ = 0;
$SI_CLS = 0;
$TOT_SI_NEW = 0;
$TOT_SI_CON = 0;
$TOT_SI_APP = 0;
$TOT_SI_REV = 0;
$TOT_SI_REJ = 0;
$TOT_SI_CLS = 0;
$TOT_SI_INV = 0;
$TOT_SI_FP = 0;
// ----------------------- SI CERTIFICATE
/*$SIC_NEW = 0;
$SIC_CON = 0;
$SIC_APP = 0;
$SIC_REV = 0;
$SIC_REJ = 0;
$SIC_CLS = 0;
$TOT_SIC_NEW = 0;
$TOT_SIC_CON = 0;
$TOT_SIC_APP = 0;
$TOT_SIC_REV = 0;
$TOT_SIC_REJ = 0;
$TOT_SIC_CLS = 0;*/
// ----------------------- JOB OUTSTANDING INFORMATION
$OUT_DEPTJOB = 0;
// ----------------------- GEN. GRAPH
$GRF_OC = 0; // Outstanding Chart
$GRF_SB = 0; // Sparkline Bar Chart
$GRF_LC = 0; // Project Progress - Line
$GRF_AC = 0; // Area Chart
$GRF_OUT_TRANS = 0; // All Outtsanding Transaction - Purchasing
$GRF_BC = 0; // Bar Chart
$GRF_OUT_PERCEN = 0;
$GRF_LOGHIST = 0;
$GRF_CIvsCO = 0;
$GRF_SINGLE_LINE= 0;
$GRF_PRJFLUK = 0;
$GRF_PROGRES = 0;
$GRF_SPP = 0;
// ----------------------- RISK MANAGEMENT
$RISK_LEV1 = 0;
$RISK_LEV2 = 0;
$RISK_LEV3 = 0;
$RISK_LEV4 = 0;
$RISK_LEV5 = 0;
// ----------------------- ASSET USAGE
$ASUS_NEW = 0;
$ASUS_CON = 0;
$ASUS_APP = 0;
$ASUS_PROC = 0;
$ASUS_FINS = 0;
// ----------------------- ASSET MAINTENANCE
$ASMA_NEW = 0;
$ASMA_CON = 0;
$ASMA_APP = 0;
$ASMA_PROC = 0;
$ASMA_FINS = 0;
// ----------------------- PROJECT RECOMMENDATION
$PREC_NEW = 0;
$PREC_CON = 0;
$PREC_PRO = 0;
$PREC_COM = 0;
// GET QTY FOR EACH STATUS
if($selPRJCODE == "AllPRJ")
{
$sqlAllData = "SELECT
SUM(TOT_REQ) AS TOT_REQ, SUM(TOT_REQ_N) AS TOT_REQ_NEW, SUM(TOT_REQ_C) AS TOT_REQ_CON,
SUM(TOT_REQ_A) AS TOT_REQ_APP, SUM(TOT_REQ_R) AS TOT_REQ_REV, SUM(TOT_REQ_RJ) AS TOT_REQ_REJ,
SUM(TOT_REQ_CL) AS TOT_REQ_CLS,
SUM(TOT_PO) AS TOT_PO, SUM(TOT_PO_N) AS TOT_PO_NEW, SUM(TOT_PO_C) AS TOT_PO_CON, SUM(TOT_PO_A) AS TOT_PO_APP,
SUM(TOT_PO_R) AS TOT_PO_REV, SUM(TOT_PO_RJ) AS TOT_PO_REJ, SUM(TOT_PO_CL) AS TOT_PO_CLS,
SUM(TOT_IR) AS TOT_IR, SUM(TOT_IR_N) AS TOT_IR_NEW, SUM(TOT_IR_C) AS TOT_IR_CON, SUM(TOT_IR_A) AS TOT_IR_APP,
SUM(TOT_IR_R) AS TOT_IR_REV, SUM(TOT_IR_RJ) AS TOT_IR_REJ, SUM(TOT_IR_CL) AS TOT_IR_CLS,
SUM(TOT_PINV) AS TOT_PINV, SUM(TOT_PINV_N) AS TOT_PINV_NEW, SUM(TOT_PINV_C) AS TOT_PINV_CON, SUM(TOT_PINV_HP) AS TOT_PINV_HP,
SUM(TOT_PINV_FP) AS TOT_PINV_FP, SUM(TOT_PINV_R) AS TOT_PINV_REJ,
SUM(TOT_INV) AS TOT_INV, SUM(TOT_INV_FP) AS TOT_INV_FP, SUM(TOT_INV_NP) AS TOT_INV_NP,
SUM(TOT_MC) AS TOT_MC, SUM(TOT_MC_N) AS TOT_MC_NEW, SUM(TOT_MC_C) AS TOT_MC_CON, SUM(TOT_MC_A) AS TOT_MC_APP,
SUM(TOT_MC_R) AS TOT_MC_REV, SUM(TOT_MC_RJ) AS TOT_MC_REJ, SUM(TOT_MC_CL) AS TOT_MC_CLS,
SUM(TOT_SI) AS TOT_SI, SUM(TOT_SI_N) AS TOT_SI_NEW, SUM(TOT_SI_C) AS TOT_SI_CON, SUM(TOT_SI_A) AS TOT_SI_APP,
SUM(TOT_SI_R) AS TOT_SI_REV, SUM(TOT_SI_RJ) AS TOT_SI_REJ, SUM(TOT_SI_CL) AS TOT_SI_CLS,
SUM(TOT_VLK) AS TOT_VLK, SUM(TOT_VLK_N) AS TOT_VLK_NEW, SUM(TOT_VLK_C) AS TOT_VLK_CON,
SUM(TOT_VLK_A) AS TOT_VLK_APP,
SUM(TOT_ASUS_N) AS TOT_ASUS_NEW, SUM(TOT_ASUS_P) AS TOT_ASUS_PROC, SUM(TOT_ASUS_F) AS TOT_ASUS_FINS,
SUM(TOT_ASMA_N) AS TOT_ASMA_NEW, SUM(TOT_ASMA_P) AS TOT_ASMA_PROC, SUM(TOT_ASMA_F) AS TOT_ASMA_FINS,
SUM(TOT_RECOMM_N) AS TOT_RECOMM_NEW, SUM(TOT_RECOMM_C) AS TOT_RECOMM_CON, SUM(TOT_RECOMM_A) AS TOT_RECOMM_APP,
SUM(TOT_RECOMM_F) AS TOT_RECOMM_FINS
FROM tbl_dash_transac WHERE PRJ_CODE IN ($myPRJCODE)";
$resAllData = $this->db->query($sqlAllData)->result();
foreach($resAllData as $rowAllD) :
$PRJ_CODE = '';
$PRJ_VALUE = '';
$PRJ_RAP = '';
$PRJ_RAB = '';
$TOT_REQ = $rowAllD->TOT_REQ;
$TOT_REQ_NEW = $rowAllD->TOT_REQ_NEW;
$TOT_REQ_CON = $rowAllD->TOT_REQ_CON;
$TOT_REQ_APP = $rowAllD->TOT_REQ_APP;
$TOT_REQ_REV = $rowAllD->TOT_REQ_REV;
$TOT_REQ_REJ = $rowAllD->TOT_REQ_REJ;
$TOT_REQ_CLS = $rowAllD->TOT_REQ_CLS; // CLOSE
$TOT_PO = $rowAllD->TOT_PO;
$TOT_PO_NEW = $rowAllD->TOT_PO_NEW;
$TOT_PO_CON = $rowAllD->TOT_PO_CON;
$TOT_PO_APP = $rowAllD->TOT_PO_APP;
$TOT_PO_REV = $rowAllD->TOT_PO_REV;
$TOT_PO_REJ = $rowAllD->TOT_PO_REJ;
$TOT_PO_CLS = $rowAllD->TOT_PO_CLS;
$TOT_IR = $rowAllD->TOT_IR;
$TOT_IR_NEW = $rowAllD->TOT_IR_NEW;
$TOT_IR_CON = $rowAllD->TOT_IR_CON;
$TOT_IR_APP = $rowAllD->TOT_IR_APP;
$TOT_IR_REV = $rowAllD->TOT_IR_REV;
$TOT_IR_REJ = $rowAllD->TOT_IR_REJ;
$TOT_IR_CLS = $rowAllD->TOT_IR_CLS;
$TOT_PINV = $rowAllD->TOT_PINV;
$TOT_PINV_NEW = $rowAllD->TOT_PINV_NEW;
$TOT_PINV_CON = $rowAllD->TOT_PINV_CON;
$TOT_PINV_HP = $rowAllD->TOT_PINV_HP;
$TOT_PINV_FP = $rowAllD->TOT_PINV_FP;
$TOT_PINV_REJ = $rowAllD->TOT_PINV_REJ;
$TOT_INV = $rowAllD->TOT_INV;
$TOT_INV_FP = $rowAllD->TOT_INV_FP;
$TOT_INV_NP = $rowAllD->TOT_INV_NP;
$TOT_MC = $rowAllD->TOT_MC;
$TOT_MC_NEW = $rowAllD->TOT_MC_NEW;
$TOT_MC_CON = $rowAllD->TOT_MC_CON;
$TOT_MC_APP = $rowAllD->TOT_MC_APP;
$TOT_MC_REV = $rowAllD->TOT_MC_REV;
$TOT_MC_REJ = $rowAllD->TOT_MC_REJ;
$TOT_MC_CLS = $rowAllD->TOT_MC_CLS;
$TOT_SI = $rowAllD->TOT_SI;
$TOT_SI_NEW = $rowAllD->TOT_SI_NEW;
$TOT_SI_CON = $rowAllD->TOT_SI_CON;
$TOT_SI_APP = $rowAllD->TOT_SI_APP;
$TOT_SI_REV = $rowAllD->TOT_SI_REV;
$TOT_SI_REJ = $rowAllD->TOT_SI_REJ;
$TOT_SI_CLS = $rowAllD->TOT_SI_CLS;
$TOT_VLK = $rowAllD->TOT_VLK;
$TOT_VLK_NEW = $rowAllD->TOT_VLK_NEW;
$TOT_VLK_CON = $rowAllD->TOT_VLK_CON;
$TOT_VLK_APP = $rowAllD->TOT_VLK_APP;
$TOT_ASUS_NEW = $rowAllD->TOT_ASUS_NEW;
$TOT_ASUS_PROC = $rowAllD->TOT_ASUS_PROC;
$TOT_ASUS_FINS = $rowAllD->TOT_ASUS_FINS;
$TOT_ASMA_NEW = $rowAllD->TOT_ASMA_NEW;
$TOT_ASMA_PROC = $rowAllD->TOT_ASMA_PROC;
$TOT_ASMA_FINS = $rowAllD->TOT_ASMA_FINS;
$TOT_RECOMM_NEW = $rowAllD->TOT_RECOMM_NEW;
$TOT_RECOMM_CON = $rowAllD->TOT_RECOMM_CON;
$TOT_RECOMM_APP = $rowAllD->TOT_RECOMM_APP;
$TOT_RECOMM_FINS= $rowAllD->TOT_RECOMM_FINS;
endforeach;
}
else
{
$sqlAllData = "SELECT * FROM tbl_dash_transac WHERE PRJ_CODE = $myPRJCODE";
$resAllData = $this->db->query($sqlAllData)->result();
foreach($resAllData as $rowAllD) :
$PRJ_CODE = $rowAllD->PRJ_CODE;
$PRJ_VALUE = $rowAllD->PRJ_VALUE;
$PRJ_RAP = $rowAllD->PRJ_RAP;
$PRJ_RAB = $rowAllD->PRJ_RAB;
$PRJ_CODE = '';
$PRJ_VALUE = '';
$PRJ_RAP = '';
$PRJ_RAB = '';
$TOT_REQ = $rowAllD->TOT_REQ;
$TOT_REQ_NEW = $rowAllD->TOT_REQ_N;
$TOT_REQ_CON = $rowAllD->TOT_REQ_C;
$TOT_REQ_APP = $rowAllD->TOT_REQ_A;
$TOT_REQ_REV = $rowAllD->TOT_REQ_R;
$TOT_REQ_REJ = $rowAllD->TOT_REQ_RJ;
$TOT_REQ_CLS = $rowAllD->TOT_REQ_CL; // CLOSE
$TOT_PO = $rowAllD->TOT_PO;
$TOT_PO_NEW = $rowAllD->TOT_PO_N;
$TOT_PO_CON = $rowAllD->TOT_PO_C;
$TOT_PO_APP = $rowAllD->TOT_PO_A;
$TOT_PO_REV = $rowAllD->TOT_PO_R;
$TOT_PO_REJ = $rowAllD->TOT_PO_RJ;
$TOT_PO_CLS = $rowAllD->TOT_PO_CL;
$TOT_IR = $rowAllD->TOT_IR;
$TOT_IR_NEW = $rowAllD->TOT_IR_N;
$TOT_IR_CON = $rowAllD->TOT_IR_C;
$TOT_IR_APP = $rowAllD->TOT_IR_A;
$TOT_IR_REV = $rowAllD->TOT_IR_R;
$TOT_IR_REJ = $rowAllD->TOT_IR_RJ;
$TOT_IR_CLS = $rowAllD->TOT_IR_CL;
$TOT_PINV = $rowAllD->TOT_PINV;
$TOT_PINV_NEW = $rowAllD->TOT_PINV_N;
$TOT_PINV_CON = $rowAllD->TOT_PINV_C;
$TOT_PINV_HP = $rowAllD->TOT_PINV_HP;
$TOT_PINV_FP = $rowAllD->TOT_PINV_FP;
$TOT_PINV_REJ = $rowAllD->TOT_PINV_R;
$TOT_INV = $rowAllD->TOT_INV;
$TOT_INV_FP = $rowAllD->TOT_INV_FP;
$TOT_INV_NP = $rowAllD->TOT_INV_NP;
$TOT_MC = $rowAllD->TOT_MC;
$TOT_MC_NEW = $rowAllD->TOT_MC_N;
$TOT_MC_CON = $rowAllD->TOT_MC_C;
$TOT_MC_APP = $rowAllD->TOT_MC_A;
$TOT_MC_REV = $rowAllD->TOT_MC_R;
$TOT_MC_REJ = $rowAllD->TOT_MC_RJ;
$TOT_MC_CLS = $rowAllD->TOT_MC_CL;
$TOT_SI = $rowAllD->TOT_SI;
$TOT_SI_NEW = $rowAllD->TOT_SI_N;
$TOT_SI_CON = $rowAllD->TOT_SI_C;
$TOT_SI_APP = $rowAllD->TOT_SI_A;
$TOT_SI_REV = $rowAllD->TOT_SI_R;
$TOT_SI_REJ = $rowAllD->TOT_SI_RJ;
$TOT_SI_CLS = $rowAllD->TOT_SI_CL;
$TOT_VLK = $rowAllD->TOT_VLK;
$TOT_VLK_NEW = $rowAllD->TOT_VLK_N;
$TOT_VLK_CON = $rowAllD->TOT_VLK_C;
$TOT_VLK_APP = $rowAllD->TOT_VLK_A;
$TOT_ASUS_NEW = $rowAllD->TOT_ASUS_N;
$TOT_ASUS_PROC = $rowAllD->TOT_ASUS_P;
$TOT_ASUS_FINS = $rowAllD->TOT_ASUS_F;
$TOT_ASMA_NEW = $rowAllD->TOT_ASMA_N;
$TOT_ASMA_PROC = $rowAllD->TOT_ASMA_P;
$TOT_RECOMM_NEW = $rowAllD->TOT_RECOMM_N;
$TOT_RECOMM_CON = $rowAllD->TOT_RECOMM_C;
$TOT_RECOMM_APP = $rowAllD->TOT_RECOMM_A;
$TOT_RECOMM_FINS= $rowAllD->TOT_RECOMM_F;
endforeach;
}
// GET HR DASH SETTING
$EMP_TOT = 0;
$EMP_ACT = 0;
$EMP_NACT = 0;
$EMP_NEW = 0;
$GRP_EMP_TOT = 0;
$GRP_EMP_GEND = 0;
$GRP_EMP_AGE = 0;
$GRP_EMP_POS = 0;
$DHR_TOTEMP = 0;
$DHR_TOTACT = 0;
$DHR_TOTNACT = 0;
$DHR_TOTM = 0;
$DHR_TOTF = 0;
$DHR_TOTNEW = 0;
$DHR_TOT30 = 0;
$DHR_TOT40 = 0;
$DHR_TOT50 = 0;
$DHR_TOTBOD = 0;
$DHR_TOTGM = 0;
$DHR_TOTMNG = 0;
$DHR_TOTKEPU = 0;
$DHR_TOTPM = 0;
$DHR_TOTKU = 0;
$DHR_TOTSM = 0;
$DHR_TOTSPEC = 0;
$DHR_TOTSTF = 0;
$DHR_TOTNSTF = 0;
$sqlAllDBHR = "SELECT * FROM tbl_dash_hr";
$resAllDBHR = $this->db->query($sqlAllDBHR)->result();
foreach($resAllDBHR as $rowDBHR) :
$DHR_TOTEMP = $rowDBHR->DHR_TOTEMP;
$DHR_TOTACT = $rowDBHR->DHR_TOTACT;
$DHR_TOTNACT = $rowDBHR->DHR_TOTNACT;
$DHR_TOTM = $rowDBHR->DHR_TOTM;
$DHR_TOTF = $rowDBHR->DHR_TOTF;
$DHR_TOTNEW = $rowDBHR->DHR_TOTNEW;
$DHR_TOT30 = $rowDBHR->DHR_TOT30;
$DHR_TOT40 = $rowDBHR->DHR_TOT40;
$DHR_TOT50 = $rowDBHR->DHR_TOT50;
$DHR_TOTBOD = $rowDBHR->DHR_TOTBOD;
$DHR_TOTGM = $rowDBHR->DHR_TOTGM;
$DHR_TOTMNG = $rowDBHR->DHR_TOTMNG;
$DHR_TOTKEPU = $rowDBHR->DHR_TOTKEPU;
$DHR_TOTPM = $rowDBHR->DHR_TOTPM;
$DHR_TOTKU = $rowDBHR->DHR_TOTKU;
$DHR_TOTSM = $rowDBHR->DHR_TOTSM;
$DHR_TOTSPEC = $rowDBHR->DHR_TOTSPEC;
$DHR_TOTSTF = $rowDBHR->DHR_TOTSTF;
$DHR_TOTNSTF = $rowDBHR->DHR_TOTNSTF;
endforeach;
$sqlDBHR = "SELECT DS_TYPE AS DS_TYPEHR FROM tbl_dash_sett_hr_emp WHERE EMP_ID = '$Emp_ID'";
$resDBHR = $this->db->query($sqlDBHR)->result();
foreach($resDBHR as $rowDBHR) :
$DS_TYPEHR = $rowDBHR->DS_TYPEHR;
if($DS_TYPEHR == "EMP_TOT")
{
$EMP_TOT = 1;
if($DHR_TOTEMP == '')
$DHR_TOTEMP = 0;
}
elseif($DS_TYPEHR == "EMP_ACT")
{
$EMP_ACT = 1;
if($DHR_TOTACT == '')
$DHR_TOTACT = 0;
}
elseif($DS_TYPEHR == "EMP_NACT")
{
$EMP_NACT = 1;
if($DHR_TOTNACT == '')
$DHR_TOTNACT = 0;
}
elseif($DS_TYPEHR == "EMP_NEW")
{
$EMP_NEW = 1;
if($DHR_TOTNEW == '')
$DHR_TOTNEW = 0;
}
elseif($DS_TYPEHR == "GRP_EMP_TOT")
{
$GRP_EMP_TOT = 1;
$TOT_GRP_EMP = $DHR_TOTACT + $DHR_TOTNACT;
}
elseif($DS_TYPEHR == "GRP_EMP_GEND")
{
$GRP_EMP_GEND = 1;
$TOT_GRP_EMP_GEN= $DHR_TOTM + $DHR_TOTM;
}
elseif($DS_TYPEHR == "GRP_EMP_AGE")
{
$GRP_EMP_AGE = 1;
$TOT_GRP_EMP_AGE= $DHR_TOT30 + $DHR_TOT40 + $DHR_TOT50;
}
elseif($DS_TYPEHR == "GRP_EMP_POS")
{
$GRP_EMP_POS = 1;
$TOT_GRP_EMP_POS= $DHR_TOTBOD + $DHR_TOTGM + $DHR_TOTMNG + $DHR_TOTKEPU + $DHR_TOTPM + $DHR_TOTKU + $DHR_TOTSM + $DHR_TOTSPEC + $DHR_TOTSTF + $DHR_TOTNSTF;
}
endforeach;
//echo "testetet $GRP_EMP_GEND";
// GET EMP SETT
$sqlDBoard = "SELECT DS_TYPE FROM tbl_dash_sett_emp WHERE EMP_ID = '$Emp_ID'";
$resDBoard = $this->db->query($sqlDBoard)->result();
foreach($resDBoard as $rowDB) :
$DS_TYPE = $rowDB->DS_TYPE;
if($DS_TYPE == "REQ_NEW")
{
$REQ_NEW = 1;
if($TOT_REQ_NEW == '')
$TOT_REQ_NEW = 0;
}
elseif($DS_TYPE == "REQ_CON")
{
$REQ_CON = 1;
if($TOT_REQ_CON == '')
$TOT_REQ_CON = 0;
}
elseif($DS_TYPE == "REQ_APP")
{
$REQ_APP = 1;
if($TOT_REQ_APP == '')
$TOT_REQ_APP = 0;
}
elseif($DS_TYPE == "REQ_CLS")
{
$REQ_CLS = 1;
if($TOT_REQ_CLS == '')
$TOT_REQ_CLS = 0;
}
elseif($DS_TYPE == "PO_NEW")
{
$PO_NEW = 1;
if($TOT_PO_NEW == '')
$TOT_PO_NEW = 0;
}
elseif($DS_TYPE == "PO_CON")
{
$PO_CON = 1;
if($TOT_PO_CON == '')
$TOT_PO_CON = 0;
}
elseif($DS_TYPE == "PO_APP")
{
$PO_APP = 1;
if($TOT_PO_APP == '')
$TOT_PO_APP = 0;
}
elseif($DS_TYPE == "PO_CLS")
{
$PO_CLS = 1;
if($TOT_PO_CLS == '')
$TOT_PO_CLS = 0;
}
elseif($DS_TYPE == "IR_NEW")
{
$IR_NEW = 1;
if($TOT_IR_NEW == '')
$TOT_IR_NEW = 0;
}
elseif($DS_TYPE == "IR_CON")
{
$IR_CON = 1;
if($TOT_IR_CON == '')
$TOT_IR_CON = 0;
}
elseif($DS_TYPE == "IR_APP")
{
$IR_APP = 1;
if($TOT_IR_APP == '')
$TOT_IR_APP = 0;
}
elseif($DS_TYPE == "IR_CLS")
{
$IR_CLS = 1;
if($TOT_IR_CLS == '')
$TOT_IR_CLS = 0;
}
elseif($DS_TYPE == "PINV_NEW")
{
$PINV_NEW = 1;
if($TOT_PINV_NEW == '')
$TOT_PINV_NEW = 0;
}
elseif($DS_TYPE == "PINV_CON")
{
$PINV_CON = 1;
if($TOT_PINV_CON == '')
$TOT_PINV_CON = 0;
}
elseif($DS_TYPE == "PINV_HP")
{
$PINV_HP = 1;
if($TOT_PINV_HP == '')
$TOT_PINV_HP = 0;
}
elseif($DS_TYPE == "PINV_FP")
{
$PINV_FP = 1;
if($TOT_PINV_FP == '')
$TOT_PINV_FP = 0;
}
elseif($DS_TYPE == "PINV_REJ")
{
$PINV_REJ = 1;
if($TOT_PINV_REJ == '')
$TOT_PINV_REJ = 0;
}
elseif($DS_TYPE == "VLK_CON")
{
$VLK_CON = 1;
if($TOT_VLK_CON == '')
$TOT_VLK_CON = 0;
}
elseif($DS_TYPE == "MC_NEW")
{
$MC_NEW = 1;
if($TOT_MC_NEW == '')
$TOT_MC_NEW = 0;
}
elseif($DS_TYPE == "MC_CON")
{
$MC_CON = 1;
if($TOT_MC_CON == '')
$TOT_MC_CON = 0;
}
elseif($DS_TYPE == "MC_APP")
{
$MC_APP = 1;
if($TOT_MC_APP == '')
$TOT_MC_APP = 0;
}
elseif($DS_TYPE == "MC_CLS")
{
$MC_CLS = 1;
if($TOT_MC_CLS == '')
$TOT_MC_CLS = 0;
}
elseif($DS_TYPE == "SI_NEW")
{
$SI_NEW = 1;
if($TOT_SI_NEW == '')
$TOT_SI_NEW = 0;
}
elseif($DS_TYPE == "SI_CON")
{
$SI_CON = 1;
if($TOT_SI_CON == '')
$TOT_SI_CON = 0;
}
elseif($DS_TYPE == "SI_APP")
{
$SI_APP = 1;
if($TOT_SI_APP == '')
$TOT_SI_APP = 0;
}
elseif($DS_TYPE == "SI_CLS")
{
$SI_CLS = 1;
if($TOT_SI_CLS == '')
$TOT_SI_CLS = 0;
}
elseif($DS_TYPE == "ASUS_NEW")
{
$ASUS_NEW = 1;
$sqlASUS_N = "tbl_asset_usage WHERE AU_PROCS = '0'";
$TOT_ASUS_N = $this->db->count_all($sqlASUS_N);
}
elseif($DS_TYPE == "ASUS_PROC")
{
$ASUS_PROC = 1;
$sqlASUS_P = "tbl_asset_usage WHERE AU_PROCS = '1'";
$TOT_ASUS_P = $this->db->count_all($sqlASUS_P);
}
elseif($DS_TYPE == "ASUS_FINS")
{
$ASUS_FINS = 1;
$sqlASUS_F = "tbl_asset_usage WHERE AU_PROCS = '2'";
$TOT_ASUS_F = $this->db->count_all($sqlASUS_F);
}
elseif($DS_TYPE == "ASMA_NEW")
{
$ASMA_NEW = 1;
$sqlASMA_N = "tbl_asset_mainten WHERE AM_PROCS = '0'";
$TOT_ASMA_N = $this->db->count_all($sqlASMA_N);
}
elseif($DS_TYPE == "ASMA_PROC")
{
$ASMA_PROC = 1;
$sqlASMA_P = "tbl_asset_mainten WHERE AM_PROCS = '1'";
$TOT_ASMA_P = $this->db->count_all($sqlASMA_P);
}
elseif($DS_TYPE == "ASMA_FINS")
{
$ASMA_FINS = 1;
$sqlASMA_F = "tbl_asset_mainten WHERE AM_PROCS = '2'";
$TOT_ASMA_F = $this->db->count_all($sqlASMA_F);
}
elseif($DS_TYPE == "OUT_DEPTJOB")
{
$OUT_DEPTJOB= 1;
}
elseif($DS_TYPE == "GRF_OUT_TRANS")
{
$GRF_OUT_TRANS = 1;
}
elseif($DS_TYPE == "GRF_SPP")
{
$GRF_SPP = 1;
}
elseif($DS_TYPE == "GRF_OUT_PERCEN")
{
$GRF_OUT_PERCEN = 1;
}
elseif($DS_TYPE == "GRF_LOGHIST")
{
$sqlLogH = "SELECT LCONC_NEVER, LCONC_SOMET, LCONC_OFTEN, LCONC_FANTASTIC FROM tbl_login_concl";
$resLogH = $this->db->query($sqlLogH)->result();
foreach($resLogH as $rowLH) :
$LCONC_NEVER = $rowLH->LCONC_NEVER;
$LCONC_SOMET = $rowLH->LCONC_SOMET;
$LCONC_OFTEN = $rowLH->LCONC_OFTEN;
$LCONC_FANT = $rowLH->LCONC_FANTASTIC;
endforeach;
$GRF_LOGHIST = 1;
}
elseif($DS_TYPE == "GRF_CIvsCO")
{
$FT_PRJCOST = 0;
$FT_CASH = 0;
$FT_AR = 0;
$FT_COP = 0;
$FT_AP = 0;
$FT_CO = 0;
$FT_PROG = 0;
$FT_PROGAM = 0;
$sqlFINT = "SELECT FT_PRJCOST, FT_CASH, FT_AR, FT_COP, FT_AP, FT_CO, FT_PROG, FT_PROGAM FROM tbl_financial_track WHERE FT_PRJCODE IN ($myPRJCODE)";
$resFINT = $this->db->query($sqlFINT)->result();
foreach($resFINT as $rowFINT) :
$FT_PRJCOST = $rowFINT->FT_PRJCOST;
$FT_CASH = $rowFINT->FT_CASH;
$FT_AR = $rowFINT->FT_AR;
$FT_COP = $rowFINT->FT_COP;
$FT_AP = $rowFINT->FT_AP;
$FT_CO = $rowFINT->FT_CO;
$FT_PROG = $rowFINT->FT_PROG;
$FT_PROGAM = $rowFINT->FT_PROGAM;
endforeach;
$GRF_CIvsCO = 1;
}
elseif($DS_TYPE == "GRF_PROGRES")
{
$GRF_PROGRES= 1;
}
elseif($DS_TYPE == "RISK_LEV1")
{
$RISK_LEV1 = 1;
$Emp_IDRisk = 'All';
if($Emp_IDRisk == 'All')
{
$sqlRSKLV1A = "tbl_riskdescdet WHERE RIDD_TYPE1 = '1' AND RIDD_STAT1 = '1'";
$sqlRSKLV1B = "tbl_riskimpactdet WHERE RIDD_TYPE2 = '1' AND RIDD_STAT2 = '1'";
$sqlRSKLV1C = "tbl_riskpolicydet WHERE RIDD_TYPE3 = '1' AND RIDD_STAT3 = '1'";
}
else
{
$sqlRSKLV1A = "tbl_riskdescdet WHERE EMP_ID1 = '$Emp_IDRisk' AND RIDD_TYPE1 = 1 AND RIDD_STAT1 = 1";
$sqlRSKLV1B = "tbl_riskimpactdet WHERE EMP_ID2 = '$Emp_IDRisk' AND RIDD_TYPE2 = 1 AND RIDD_STAT2 = 1";
$sqlRSKLV1C = "tbl_riskpolicydet WHERE EMP_ID3 = '$Emp_IDRisk' AND RIDD_TYPE3 = 1 AND RIDD_STAT3 = 1";
}
$resRSKLV1A = $this->db->count_all($sqlRSKLV1A);
$TOTRSKLV1A = $resRSKLV1A;
if($resRSKLV1A == '')
$TOTRSKLV1A = 0;
$resRSKLV1B = $this->db->count_all($sqlRSKLV1B);
$TOTRSKLV1B = $resRSKLV1B;
if($resRSKLV1B == '')
$TOTRSKLV1B = 0;
$resRSKLV1C = $this->db->count_all($sqlRSKLV1C);
$TOTRSKLV1C = $resRSKLV1C;
if($resRSKLV1C == '')
$TOTRSKLV1C = 0;
$GTOTRSKLV1 = $TOTRSKLV1A + $TOTRSKLV1B + $TOTRSKLV1C;
}
elseif($DS_TYPE == "RISK_LEV2")
{
$RISK_LEV2 = 1;
//$Emp_IDRisk = $Emp_ID;
$Emp_IDRisk = 'All';
if($Emp_IDRisk == 'All')
{
$sqlRSKLV2A = "tbl_riskdescdet WHERE RIDD_TYPE1 = '2' AND RIDD_STAT1 = '1'";
$sqlRSKLV2B = "tbl_riskimpactdet WHERE RIDD_TYPE2 = '2' AND RIDD_STAT2 = '1'";
$sqlRSKLV2C = "tbl_riskpolicydet WHERE RIDD_TYPE3 = '2' AND RIDD_STAT3 = '1'";
}
else
{
$sqlRSKLV2A = "tbl_riskdescdet WHERE EMP_ID1 = '$Emp_IDRisk' AND RIDD_TYPE1 = 2 AND RIDD_STAT1 = 1";
$sqlRSKLV2B = "tbl_riskimpactdet WHERE EMP_ID2 = '$Emp_IDRisk' AND RIDD_TYPE2 = 2 AND RIDD_STAT2 = 1";
$sqlRSKLV2C = "tbl_riskpolicydet WHERE EMP_ID3 = '$Emp_IDRisk' AND RIDD_TYPE3 = 2 AND RIDD_STAT3 = 1";
}
$resRSKLV2A = $this->db->count_all($sqlRSKLV2A);
$TOTRSKLV2A = $resRSKLV2A;
if($resRSKLV2A == '')
$TOTRSKLV2A = 0;
$resRSKLV2B = $this->db->count_all($sqlRSKLV2B);
$TOTRSKLV2B = $resRSKLV2B;
if($resRSKLV2B == '')
$TOTRSKLV2B = 0;
$resRSKLV2C = $this->db->count_all($sqlRSKLV2C);
$TOTRSKLV2C = $resRSKLV2C;
if($resRSKLV2C == '')
$TOTRSKLV2C = 0;
$GTOTRSKLV2 = $TOTRSKLV2A + $TOTRSKLV2B + $TOTRSKLV2C;
}
elseif($DS_TYPE == "RISK_LEV3")
{
$RISK_LEV3 = 1;
//$Emp_IDRisk = $Emp_ID;
$Emp_IDRisk = 'All';
if($Emp_IDRisk == 'All')
{
$sqlRSKLV3A = "tbl_riskdescdet WHERE RIDD_TYPE1 = '3' AND RIDD_STAT1 = '1'";
$sqlRSKLV3B = "tbl_riskimpactdet WHERE RIDD_TYPE2 = '3' AND RIDD_STAT2 = '1'";
$sqlRSKLV3C = "tbl_riskpolicydet WHERE RIDD_TYPE3 = '3' AND RIDD_STAT3 = '1'";
}
else
{
$sqlRSKLV3A = "tbl_riskdescdet WHERE EMP_ID1 = '$Emp_IDRisk' AND RIDD_TYPE1 = 3 AND RIDD_STAT1 = 1";
$sqlRSKLV3B = "tbl_riskimpactdet WHERE EMP_ID2 = '$Emp_IDRisk' AND RIDD_TYPE2 = 3 AND RIDD_STAT2 = 1";
$sqlRSKLV3C = "tbl_riskpolicydet WHERE EMP_ID3 = '$Emp_IDRisk' AND RIDD_TYPE3 = 3 AND RIDD_STAT3 = 1";
}
$resRSKLV3A = $this->db->count_all($sqlRSKLV3A);
$TOTRSKLV3A = $resRSKLV3A;
if($resRSKLV3A == '')
$TOTRSKLV3A = 0;
$resRSKLV3B = $this->db->count_all($sqlRSKLV3B);
$TOTRSKLV3B = $resRSKLV3B;
if($resRSKLV3B == '')
$TOTRSKLV3B = 0;
$resRSKLV3C = $this->db->count_all($sqlRSKLV3C);
$TOTRSKLV3C = $resRSKLV3C;
if($resRSKLV3C == '')
$TOTRSKLV3C = 0;
$GTOTRSKLV3 = $TOTRSKLV3A + $TOTRSKLV3B + $TOTRSKLV3C;
}
elseif($DS_TYPE == "RISK_LEV4")
{
$RISK_LEV4 = 1;
//$Emp_IDRisk = $Emp_ID;
$Emp_IDRisk = 'All';
if($Emp_IDRisk == 'All')
{
$sqlRSKLV4A = "tbl_riskdescdet WHERE RIDD_TYPE1 = '4' AND RIDD_STAT1 = '1'";
$sqlRSKLV4B = "tbl_riskimpactdet WHERE RIDD_TYPE2 = '4' AND RIDD_STAT2 = '1'";
$sqlRSKLV4C = "tbl_riskpolicydet WHERE RIDD_TYPE3 = '4' AND RIDD_STAT3 = '1'";
}
else
{
$sqlRSKLV4A = "tbl_riskdescdet WHERE EMP_ID1 = '$Emp_IDRisk' AND RIDD_TYPE1 = 4 AND RIDD_STAT1 = 1";
$sqlRSKLV4B = "tbl_riskimpactdet WHERE EMP_ID2 = '$Emp_IDRisk' AND RIDD_TYPE2 = 4 AND RIDD_STAT2 = 1";
$sqlRSKLV4C = "tbl_riskpolicydet WHERE EMP_ID3 = '$Emp_IDRisk' AND RIDD_TYPE3 = 4 AND RIDD_STAT3 = 1";
}
$resRSKLV4A = $this->db->count_all($sqlRSKLV4A);
$TOTRSKLV4A = $resRSKLV4A;
if($resRSKLV4A == '')
$TOTRSKLV4A = 0;
$resRSKLV4B = $this->db->count_all($sqlRSKLV4B);
$TOTRSKLV4B = $resRSKLV4B;
if($resRSKLV4B == '')
$TOTRSKLV4B = 0;
$resRSKLV4C = $this->db->count_all($sqlRSKLV4C);
$TOTRSKLV4C = $resRSKLV4C;
if($resRSKLV4C == '')
$TOTRSKLV4C = 0;
$GTOTRSKLV4 = $TOTRSKLV4A + $TOTRSKLV4B + $TOTRSKLV4C;
}
elseif($DS_TYPE == "RISK_LEV5")
{
$RISK_LEV5 = 1;
//$Emp_IDRisk = $Emp_ID;
$Emp_IDRisk = 'All';
if($Emp_IDRisk == 'All')
{
$sqlRSKLV5A = "tbl_riskdescdet WHERE RIDD_TYPE1 = '5' AND RIDD_STAT1 = '1'";
$sqlRSKLV5B = "tbl_riskimpactdet WHERE RIDD_TYPE2 = '5' AND RIDD_STAT2 = '1'";
$sqlRSKLV5C = "tbl_riskpolicydet WHERE RIDD_TYPE3 = '5' AND RIDD_STAT3 = '1'";
}
else
{
$sqlRSKLV5A = "tbl_riskdescdet WHERE EMP_ID1 = '$Emp_IDRisk' AND RIDD_TYPE1 = 5 AND RIDD_STAT1 = 1";
$sqlRSKLV5B = "tbl_riskimpactdet WHERE EMP_ID2 = '$Emp_IDRisk' AND RIDD_TYPE2 = 5 AND RIDD_STAT2 = 1";
$sqlRSKLV5C = "tbl_riskpolicydet WHERE EMP_ID3 = '$Emp_IDRisk' AND RIDD_TYPE3 = 5 AND RIDD_STAT3 = 1";
}
$resRSKLV5A = $this->db->count_all($sqlRSKLV5A);
$TOTRSKLV5A = $resRSKLV5A;
if($resRSKLV5A == '')
$TOTRSKLV5A = 0;
$resRSKLV5B = $this->db->count_all($sqlRSKLV5B);
$TOTRSKLV5B = $resRSKLV5B;
if($resRSKLV5B == '')
$TOTRSKLV5B = 0;
$resRSKLV5C = $this->db->count_all($sqlRSKLV5C);
$TOTRSKLV5C = $resRSKLV5C;
if($resRSKLV5C == '')
$TOTRSKLV5C = 0;
$GTOTRSKLV5 = $TOTRSKLV5A + $TOTRSKLV5B + $TOTRSKLV5C;
}
elseif($DS_TYPE == "PREC_NEW")
{
$PREC_NEW = 1;
$resPREC = "tbl_project_recom WHERE REC_STAT = '1'";
$TOT_RECOMM_NEW = $this->db->count_all($resPREC);
if($TOT_RECOMM_NEW == '')
$TOT_RECOMM_NEW = 0;
}
elseif($DS_TYPE == "PREC_CON")
{
$PREC_CON = 1;
$resPREC = "tbl_project_recom WHERE REC_STAT = '2'";
$TOT_RECOMM_CON = $this->db->count_all($resPREC);
if($TOT_RECOMM_CON == '')
$TOT_RECOMM_CON = 0;
}
elseif($DS_TYPE == "PREC_PRO") // UnFinished
{
$PREC_PRO = 1;
$resPREC = "tbl_project_recom WHERE REC_STAT = '2'";
$TOT_RECOMM_APP = $this->db->count_all($resPREC);
if($TOT_RECOMM_APP == '')
$TOT_RECOMM_APP = 0;
}
elseif($DS_TYPE == "PREC_COM")
{
$PREC_COM = 1;
$resPREC = "tbl_project_recom WHERE REC_STAT = '3'";
$TOT_RECOMM_FINS= $this->db->count_all($resPREC);
if($TOT_RECOMM_FINS == '')
$TOT_RECOMM_FINS = 0;
}
endforeach;
//$ISSHOWGRF = $GRF_SPP + $GRF_OC + $GRF_SB + $GRF_LC + $GRF_AC + $GRF_OUT_TRANS + $GRF_BC + $GRF_OUT_PERCEN + $GRF_SINGLE_LINE + $GRF_PRJFLUK;
$COST_PRJ = 0;
$COST_VRAP = 0;
$GTCOST_BACOST = 0;
$GTCOST_SIVAL = 0;
$GTCOST_SIAPPVAL = 0;
$GTCOST_TOTCOST = 0;
$GRF_PRJFLUK = 0;
if($GRF_PRJFLUK == 1)
{
// 1. GET PROJECT VALUE for Value Contract
$sqlPRJ = "SELECT SUM(CONTRACTVAL) AS COST_PRJ, SUM(GTCOST_LPMDT) AS GTCOST_LPMDT,
SUM(COST_RAP) AS COST_VRAP,
SUM(GTCOST_OPNDT) AS GTCOST_OPNDT, SUM(GTCOST_VOCDT) AS GTCOST_VOCDT, SUM(GTCOST_VLKDT) AS GTCOST_VLKDT
FROM tbl_project_active
WHERE
PRJCODE IN ($myPRJCODE)";
$resPRJ = $this->db->query($sqlPRJ)->result();
foreach($resPRJ as $rowPRJ) :
$COST_PRJ = round($rowPRJ->COST_PRJ);
/*if($COST_PRJ == '')
$COST_PRJ = 0;*/
$COST_VRAP = round($rowPRJ->COST_VRAP);
/*if($COST_VRAP == '')
$COST_VRAP = 0;*/
//$GTCOST_BACOST = round($rowPRJ->GTCOST_BACOST);
/*if($GTCOST_BACOST == '')
$GTCOST_BACOST = 0;*/
$GTCOST_LPMDT = round($rowPRJ->GTCOST_LPMDT);
/*if($GTCOST_LPMDT == '')
$GTCOST_LPMDT = 0;*/
$GTCOST_OPNDT = round($rowPRJ->GTCOST_OPNDT);
/*if($GTCOST_OPNDT == '')
$GTCOST_OPNDT = 0;*/
$GTCOST_VOCDT = round($rowPRJ->GTCOST_VOCDT);
/*if($GTCOST_VOCDT == '')
$GTCOST_VOCDT = 0;*/
$GTCOST_VLKDT = round($rowPRJ->GTCOST_VLKDT);
/*if($GTCOST_VLKDT == '')
$GTCOST_VLKDT = 0;*/
endforeach;
// 2. GET RAP VALUE
/*$sqlVRAP = "SELECT SUM(PRJCOST) AS PRJCOST
FROM project
WHERE
PRJCODE IN ($myPRJCODE)";
$resVRAP = $this->db->query($sqlVRAP)->result();
foreach($resVRAP as $rowVRAP) :
$COST_VRAP = round($rowVRAP->PRJCOST);
if($COST_VRAP == '')
$COST_VRAP = 0;
endforeach;*/
// 3. GET BA VALUE
/*$sqlGTBACOST = "SELECT SUM(TOTCOST_JOBCOST) AS GTCOST_BACOST
FROM vtbl_jobcost
WHERE
PRJCODE IN ($myPRJCODE)";
$resGTBACOST = $this->db->query($sqlGTBACOST)->result();
foreach($resGTBACOST as $rowBACOST) :
$GTCOST_BACOST = round($rowBACOST->GTCOST_BACOST);
if($GTCOST_BACOST == '')
$GTCOST_BACOST = 0;
endforeach;*/
$GTCOST_BACOST = 0;
/*$sqlGTBACOST = "SELECT GTOT_BA AS GTCOST_BACOST
FROM vtbl_cost
WHERE
PRJCODE IN ($myPRJCODE)";
$resGTBACOST = $this->db->query($sqlGTBACOST)->result();
foreach($resGTBACOST as $rowBACOST) :
$GTCOST_BACOST = round($rowBACOST->GTCOST_BACOST);
if($GTCOST_BACOST == '')
$GTCOST_BACOST = 0;
endforeach;*/
// 4. GET SI PROJECT (PENGAJUAN DAN APPROVED)
$sqlGTSI = "SELECT SUM(SI_VALUE) AS GTCOST_SIVAL, SUM(SI_APPVAL) AS GTCOST_SIAPPVAL
FROM tbl_siheader
WHERE
PRJCODE IN ($myPRJCODE)";
$resGTSI = $this->db->query($sqlGTSI)->result();
foreach($resGTSI as $rowSI) :
$GTCOST_SIVAL = round($rowSI->GTCOST_SIVAL);
if($GTCOST_SIVAL == '')
$GTCOST_SIVAL = 0;
$GTCOST_SIAPPVAL = round($rowSI->GTCOST_SIAPPVAL);
if($GTCOST_SIAPPVAL == '')
$GTCOST_SIAPPVAL = 0;
endforeach;
// PROJECT PROGRESS LPMDT
/*$sqlGTLPMDT = "SELECT SUM(TOTCOST_LPMDT) AS GTCOST_LPMDT
FROM VTBL_LPMDT
WHERE
PJTCODE IN ($myPRJCODE)";
$resGTLPMDT = $this->db->query($sqlGTLPMDT)->result();
foreach($resGTLPMDT as $rowLPMDT) :
$GTCOST_LPMDT = $rowLPMDT->GTCOST_LPMDT;
if($GTCOST_LPMDT == '')
$GTCOST_LPMDT = 0;
endforeach;*/
// PROJECT PROGRESS OPNDT
/*$sqlGTOPNDT = "SELECT SUM(TOTCOST_OPNDT) AS GTCOST_OPNDT
FROM VTBL_OPNDT
WHERE
PJTCODE IN ($myPRJCODE)";
$resGTOPNDT = $this->db->query($sqlGTOPNDT)->result();
foreach($resGTOPNDT as $rowOPNDT) :
$GTCOST_OPNDT = $rowOPNDT->GTCOST_OPNDT;
if($GTCOST_OPNDT == '')
$GTCOST_OPNDT = 0;
endforeach;*/
// PROJECT PROGRESS VOCDT
/*$sqlGTVOCDT = "SELECT SUM(TOTCOST_VOCDT) AS GTCOST_VOCDT
FROM VTBL_VOCDT
WHERE
PJTCODE IN ($myPRJCODE)";
$resGTVOCDT = $this->db->query($sqlGTVOCDT)->result();
foreach($resGTVOCDT as $rowVOCDT) :
$GTCOST_VOCDT = $rowVOCDT->GTCOST_VOCDT;
if($GTCOST_VOCDT == '')
$GTCOST_VOCDT = 0;
endforeach;*/
// PROJECT PROGRESS VLKDT
/*$sqlGTVLKDT = "SELECT SUM(TOTCOST_VLKDT) AS GTCOST_VLKDT
FROM VTBL_VLKDT
WHERE
PJTCODE IN ($myPRJCODE)";
$resGTVLKDT = $this->db->query($sqlGTVLKDT)->result();
foreach($resGTVLKDT as $rowVLKDT) :
$GTCOST_VLKDT = $rowVLKDT->GTCOST_VLKDT;
if($GTCOST_VLKDT == '')
$GTCOST_VLKDT = 0;
endforeach;*/
// PROJECT PROGRESS VLKDT
/*$COST_PRJ = 78406363636;
$COST_VRAP = 77400709697;
$GTCOST_BACOST = 3748828546.8;
$GTCOST_SIVAL = 12925988047;
$GTCOST_SIAPPVAL = 2626050434;
$GTCOST_TOTCOST = 101609693233;*/
$GTCOST_TOTCOST = round($GTCOST_OPNDT + $GTCOST_LPMDT + $GTCOST_VOCDT + $GTCOST_VLKDT);
}
$showAllOUT = site_url('__180c2f/prjlist/?id='.$this->url_encryption_helper->encode_url($appName));
$showAboutC = site_url('__180c2f/aboutcomp/?id='.$this->url_encryption_helper->encode_url($appName));
$GraphicTitleText = 3;
?>
<!--tambahkan custom css disini-->
<!-- iCheck -->
<link href="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/iCheck/flat/blue.css') ?>" rel="stylesheet" type="text/css" />
<!-- Morris chart -->
<link href="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/morris/morris.css') ?>" rel="stylesheet" type="text/css" />
<!-- jvectormap -->
<link href="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/jvectormap/jquery-jvectormap-1.2.2.css') ?>" rel="stylesheet" type="text/css" />
<!-- Date Picker -->
<link href="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/datepicker/datepicker3.css') ?>" rel="stylesheet" type="text/css" />
<!-- Daterange picker -->
<link href="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/daterangepicker/daterangepicker-bs3.css') ?>" rel="stylesheet" type="text/css" />
<!-- bootstrap wysihtml5 - text editor -->
<link href="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css') ?>" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="<?php echo base_url('assets/css/ilmudetil.css') ?>">
<script src="<?php echo base_url('assets/js/jquery-1.10.1.min.js') ?>" type="text/javascript"></script>
<script type="text/javascript" src="https://www.amcharts.com/lib/3/amcharts.js"></script>
<script type="text/javascript" src="https://cdn.amcharts.com/lib/3/pie.js"></script>
<script type="text/javascript" src="https://www.amcharts.com/lib/3/themes/light.js"></script>
<script src="https://code.highcharts.com/highcharts.js"></script>
<script src="https://code.highcharts.com/modules/exporting.js"></script>
<script src="http://www.chartjs.org/dist/2.7.2/Chart.bundle.js"></script>
<script src="http://www.chartjs.org/samples/latest/utils.js"></script>
<style>
canvas{
-moz-user-select: none;
-webkit-user-select: none;
-ms-user-select: none;
}
</style>
<?php
$this->load->view('template/topbar');
$this->load->view('template/sidebar');
$ISREAD = $this->session->userdata['ISREAD'];
$ISCREATE = $this->session->userdata['ISCREATE'];
$ISAPPROVE = $this->session->userdata['ISAPPROVE'];
$ISDWONL = $this->session->userdata['ISDWONL'];
$LangID = $this->session->userdata['LangID'];
$sqlTransl = "SELECT MLANG_CODE, MLANG_$LangID AS LangTransl FROM tbl_translate";
$resTransl = $this->db->query($sqlTransl)->result();
foreach($resTransl as $rowTransl) :
$TranslCode = $rowTransl->MLANG_CODE;
$Translate = $rowTransl->LangTransl;
if($TranslCode == 'Dashboard')$Dashboard = $Translate;
if($TranslCode == 'DailyNews')$DailyNews = $Translate;
endforeach;
$sql001 = "SELECT browsername FROM browser";
$res001 = $this->db->query($sql001)->result();
foreach($res001 as $row001) :
$browsername = $row001->browsername;
$trendbrowser = $browsername;
$sql002 = "SELECT total FROM browser WHERE browsername = '$trendbrowser'";
$res002 = $this->db->query($sql002)->result();
foreach($res002 as $row002) :
$total = $row002->total;
endforeach;
endforeach;
if($GRF_PROGRES == 1)
{
?>
<script>
var chart1;
$(document).ready(function() {
chart1 = new Highcharts.Chart({
chart: {
renderTo: 'projFluctuation',
type: 'column'
},
title: {
text: 'Project Fluctuation'
},
xAxis: {
categories: ['Category']
},
yAxis: {
title: {
text: 'Value'
}
},
series:
[
{
name: 'Value',
data: [<?php echo $COST_PRJ; ?>]
},
{
name: 'RAP',
data: [<?php echo $COST_VRAP; ?>]
},
{
name: 'BA Cost',
data: [<?php echo $GTCOST_BACOST; ?>]
},
{
name: 'Total SI',
data: [<?php echo $GTCOST_SIVAL; ?>]
},
{
name: 'SI Aproved',
data: [<?php echo $GTCOST_SIAPPVAL; ?>]
},
{
name: 'Total Cost',
data: [<?php echo $GTCOST_TOTCOST; ?>]
},
]
});
});
var chart2;
$(document).ready(function() {
chart2 = new Highcharts.Chart({
chart: {
renderTo: 'projProgress',
type: 'bar'
},
title: {
text: 'Project Fluctuation'
},
xAxis: {
categories: ['Category']
},
yAxis: {
title: {
text: 'Value'
}
},
series:
[
{
name: 'Value',
data: [<?php echo $COST_PRJ; ?>]
},
{
name: 'RAP',
data: [<?php echo $COST_VRAP; ?>]
},
{
name: 'BA Cost',
data: [<?php echo $GTCOST_BACOST; ?>]
},
{
name: 'Total SI',
data: [<?php echo $GTCOST_SIVAL; ?>]
},
{
name: 'SI Aproved',
data: [<?php echo $GTCOST_SIAPPVAL; ?>]
},
{
name: 'Total Cost',
data: [<?php echo $GTCOST_TOTCOST; ?>]
},
]
});
});
</script>
<?php
}
?>
<script>
function chooseProject(thisVal)
{
sssss = thisVal.value;
projCode = document.getElementById('selPRJCODE').value;
document.frmsrch.submitPRJ.click();
}
</script>
<!-- Content Header (Page header) -->
<section class="content-header">
<h1>
<?php echo $Dashboard; ?>
<small>home</small>
</h1>
<ol class="breadcrumb">
<?php
$getCount = "tbl_employee_proj WHERE Emp_ID = '$Emp_ID'";
$resGetCount = $this->db->count_all($getCount);
?>
<form name="frmsrch" id="frmsrch" action="" method=POST>
<select name="selPRJCODE" id="selPRJCODE" class="form-control" onChange="chooseProject(this)">
<option value="AllPRJ" <?php if($selPRJCODE == "AllPRJ") { ?> selected <?php } ?>> All Project</option>
<?php
if($resGetCount > 0)
{
$getData = "SELECT A.Emp_ID, A.proj_Code, B.PRJNAME
FROM tbl_employee_proj A
INNER JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.Emp_ID = '$Emp_ID'";
$resGetData = $this->db->query($getData)->result();
foreach($resGetData as $rowData) :
$Emp_ID = $rowData->Emp_ID;
$proj_Code = $rowData->proj_Code;
$proj_Name = $rowData->PRJNAME;
?>
<option value="<?php echo $proj_Code; ?>" <?php if($proj_Code == $selPRJCODE) { ?> selected <?php } ?>><?php echo "$proj_Code - $proj_Name"; ?></option>
<?php
endforeach;
}
else
{
?>
<option value="none">--- No Unit Found ---</option>
<?php
}
?>
</select>
<input type="submit" name="submitPRJ" id="submitPRJ" style="display:none">
</form>
</ol>
</section><br>
<!-- Main content -->
<section class="content">
<div class="row">
<!-- Left col -->
<section class="col-lg-7 connectedSortable">
<div class="nav-tabs-custom">
<div class="box box-solid">
<div class="box-header">
<h3 class="box-title">About Company</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-default btn-sm" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-default btn-sm" data-widget="remove"><i class="fa fa-times"></i>
</button>
</div>
</div>
<div class="box-body">
<div class="row">
<div class="col-xs-12">
<div class="box box-solid">
<div class="panel box box-primary">
<div id="collapseOne" class="panel-collapse collapse in">
<div class="box-body">
PT. MEGA SUKMA berdiri sejak tanggal 15 April 2003 di Bandung, dengan tujuan untuk melanjutkan usaha yang telah dirintis sebelumnya oleh CV. MEGA SUKMA. Seiring berjalannya waktu, PT. MEGA SUKMA perlahan-lahan mengkhususkan kepada proyek-proyek Infrastruktur yang mana memang merupakan kompetensi dari para personilnya...<a href="<?php echo $showAboutC; ?>" class="small-box-footer">More info ... <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<?php
$NewsList = site_url('c_setting/c_news/list_news_all/?id='.$this->url_encryption_helper->encode_url($appName));
?>
<form name="frmNewsList" id="frmNewsList" action="<?php echo $NewsList; ?>" method=POST>
<input type="submit" name="submitNL" id="submitNL" style="display:none">
</form>
<section class="col-lg-5 connectedSortable">
<div class="box box-solid bg-light-blue-gradient">
<div class="box box-solid">
<div class="box-header">
<h3 class="box-title"><?php echo $DailyNews; ?></h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-default btn-sm" onclick="viewAllNews();">
<i class="fa fa-list"></i>
</button>
<button type="button" class="btn btn-default btn-sm" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-default btn-sm" data-widget="remove"><i class="fa fa-times"></i>
</button>
</div>
</div>
<div class="box-body">
<div class="row">
<div class="col-xs-12" style="text-align:center">
<div class="box box-solid">
<div class="panel box box-primary">
<div id="collapseOne" class="panel-collapse collapse in">
<div class="box-body">
<marquee onmouseover="this.stop()" onmouseout="this.start()" scrollamount="2" direction="up" width="100%" height="100" align="left">
<ul class="products-list product-list-in-box">
<?php
$NEWSD_IMG = "defaultpict.jpg";
$imgNewsLoc = base_url('assets/AdminLTE-2.0.5/dist/img/news/'.$NEWSD_IMG);
$cntNews = "tbl_news_detail A
INNER JOIN tbl_news_header B ON A.NEWSD_CODE = B.NEWSH_CODE
AND B.NEWSH_STAT = '1'
WHERE NEWSD_RECEIVER IN ('All','$Emp_ID')";
$resCNews = $this->db->count_all($cntNews);
if($resCNews > 0)
{
$sqlNews= "SELECT A.NEWSD_ID, A.NEWSD_TITLE, A.NEWSD_CONTENT,
A.NEWSD_CREATED, A.NEWSD_IMG
FROM tbl_news_detail A
INNER JOIN tbl_news_header B ON A.NEWSD_CODE = B.NEWSH_CODE
AND B.NEWSH_STAT = '1'
WHERE NEWSD_RECEIVER IN ('All','$Emp_ID')";
$resNews = $this->db->query($sqlNews)->result();
foreach($resNews as $rowNews) :
$NEWSD_ID = $rowNews->NEWSD_ID;
$NEWSD_TITLE = $rowNews->NEWSD_TITLE;
$NEWSD_CONTENT1 = $rowNews->NEWSD_CONTENT;
$NEWSD_CONTENT = cut_text ("$NEWSD_CONTENT1", 50);
$NEWSD_CREATED = $rowNews->NEWSD_CREATED;
$NEWSD_IMG = $rowNews->NEWSD_IMG;
$imgNewsLoc = base_url('assets/AdminLTE-2.0.5/dist/img/news/'.$NEWSD_IMG);
//$DATED = date('F j, Y, g:i a', strtotime($NEWSD_CREATED));
$DATED = date('F j, Y', strtotime($NEWSD_CREATED));
$urlVwNews = site_url('c_setting/c_news/view_news/?id='.$this->url_encryption_helper->encode_url($NEWSD_ID));
?>
<li class="item">
<div class="product-img">
<img src="<?php echo $imgNewsLoc; ?>" alt="Product Image">
</div>
<div class="product-info">
<input type="hidden" name="secUplURL_<?php echo $NEWSD_ID; ?>" id="secUplURL_<?php echo $NEWSD_ID; ?>" value="<?php echo $urlVwNews; ?>"/>
<a href="javascript:void(0)" class="product-title" onClick="selectPICT(<?php echo $NEWSD_ID; ?>);">
<?php echo $NEWSD_TITLE; ?>
<span class="label label-warning pull-right">
<?php echo $DATED; ?>
</span>
</a>
<span class="product-description">
<?php echo $NEWSD_CONTENT; ?>
</span>
</div>
</li>
<?php
endforeach;
}
?>
</ul>
</marquee>
<script>
function selectPICT(thisVal)
{
var urlVwNews = document.getElementById('secUplURL_'+thisVal).value;
title = 'Select Item';
w = 780;
h = 550;
var left = (screen.width/2)-(w/2);
var top = (screen.height/2)-(h/2);
return window.open(urlVwNews, title, 'toolbar=yes, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
}
function viewAllNews()
{
document.forms['frmNewsList'].submit();
}
</script>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
</div>
<?php
//if($ISSHOWGRF > 0)
//{
?>
<div class="callout callout-info">
<h4>Project's Chart Compilation</h4>
<p>The bellow Charts just can be seen by Authorized User.</p>
</div>
<?php
//}
?>
</section>
<!-- START : Count All Transactions -->
<section class="content">
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">Count Transaction</h3>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse"><i class="fa fa-minus"></i></button>
<button class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
<div class="row">
<?php if($REQ_NEW == 1) { if($TOT_REQ_NEW > 20) { $COL_REQ_NEW = "red"; } else if($TOT_REQ_NEW > 10) { $COL_REQ_NEW = "red"; } else { $COL_REQ_NEW = "red";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_REQ_NEW; ?>">
<div class="inner">
<h3><?php echo $TOT_REQ_NEW; ?></h3>
New -<br />Requisition
</div>
<div class="icon">
<i class="ion ion-bag"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($REQ_CON == 1) { if($TOT_REQ_CON > 20) { $COL_REQ_CON = "yellow"; } else if($TOT_REQ_CON > 10) { $COL_REQ_CON = "yellow"; } else { $COL_REQ_CON = "yellow";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_REQ_CON; ?>">
<div class="inner">
<h3><?php echo $TOT_REQ_CON; ?></h3>
Outstanding Approve -<br />Requisition
</div>
<div class="icon">
<i class="ion ion-bag"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($REQ_APP == 1) { if($TOT_REQ_APP > 20) { $COL_REQ_APP = "green"; } else if($TOT_REQ_APP > 10) { $COL_REQ_APP = "green"; } else { $COL_REQ_APP = "green";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_REQ_APP; ?>">
<div class="inner">
<h3><?php echo $TOT_REQ_APP; ?></h3>
Approve -<br />Requisition
</div>
<div class="icon">
<i class="ion ion-bag"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($REQ_CLS == 1) { if($TOT_REQ_CLS > 20) { $COL_REQ_CLS = "primary"; } else if($TOT_REQ_CLS > 10) { $COL_REQ_CLS = "primary"; } else { $COL_REQ_CLS = "primary";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_REQ_CLS; ?>">
<div class="inner">
<h3><?php echo $TOT_REQ_CLS; ?></h3>
Close -<br />Requisition
</div>
<div class="icon">
<i class="ion ion-bag"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($PO_NEW == 1) { if($TOT_PO_NEW > 10) { $COL_PO_NEW = "red"; } else if($TOT_PO_NEW > 0) { $COL_PO_NEW = "red"; } else { $COL_PO_NEW = "red";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_PO_NEW; ?>">
<div class="inner">
<h3><?php echo $TOT_PO_NEW; ?></h3>
New -<br />Purchase Order
</div>
<div class="icon">
<i class="ion ion-ios-cart-outline"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($PO_CON == 1) { if($TOT_PO_CON > 10) { $COL_PO_CON = "yellow"; } else if($TOT_PO_CON > 0) { $COL_PO_CON = "yellow"; } else { $COL_PO_CON = "yellow";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_PO_CON; ?>">
<div class="inner">
<h3><?php echo $TOT_PO_CON; ?></h3>
Outstanding Approve -<br />Purchase Order
</div>
<div class="icon">
<i class="ion ion-ios-cart-outline"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($PO_APP == 1) { if($TOT_PO_APP > 10) { $COL_PO_APP = "green"; } else if($TOT_PO_APP > 0) { $COL_PO_APP = "green"; } else { $COL_PO_APP = "green";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_PO_APP; ?>">
<div class="inner">
<h3><?php echo $TOT_PO_APP; ?></h3>
Approve -<br />Purchase Order
</div>
<div class="icon">
<i class="ion ion-ios-cart-outline"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($PO_CLS == 1) { if($TOT_PO_CLS > 10) { $COL_PO_CLS = "primary"; } else if($TOT_PO_CLS > 0) { $COL_PO_CLS = "primary"; } else { $COL_PO_CLS = "primary";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_PO_CLS; ?>">
<div class="inner">
<h3><?php echo $TOT_PO_CLS; ?></h3>
Close -<br />Purchase Order
</div>
<div class="icon">
<i class="ion ion-ios-cart-outline"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($IR_NEW == 1) { if($TOT_IR_NEW > 10) { $COL_IR_NEW = "red"; } else if($TOT_IR_NEW > 0) { $COL_IR_NEW = "red"; } else { $COL_IR_NEW = "red";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_IR_NEW; ?>">
<div class="inner">
<h3><?php echo $TOT_IR_NEW; ?></h3>
New -<br />Item Receipt
</div>
<div class="icon">
<i class="ion ion-cube"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($IR_CON == 1) { if($TOT_IR_CON > 10) { $COL_IR_CON = "yellow"; } else if($TOT_IR_CON > 0) { $COL_IR_CON = "yellow"; } else { $COL_IR_CON = "yellow";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_IR_CON; ?>">
<div class="inner">
<h3><?php echo $TOT_IR_CON; ?></h3>
Outstanding Approve -<br />Item Receipt
</div>
<div class="icon">
<i class="ion ion-cube"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($IR_APP == 1) { if($TOT_IR_APP > 10) { $COL_IR_APP = "green"; } else if($TOT_IR_APP > 0) { $COL_IR_APP = "green"; } else { $COL_IR_APP = "green";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_IR_APP; ?>">
<div class="inner">
<h3><?php echo $TOT_IR_APP; ?></h3>
Approve -<br />Item Receipt
</div>
<div class="icon">
<i class="ion ion-cube"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($IR_CLS == 1) { if($TOT_IR_CLS > 10) { $COL_IR_CLS = "primary"; } else if($TOT_IR_CLS > 0) { $COL_IR_CLS = "primary"; } else { $COL_IR_CLS = "primary";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_IR_CLS; ?>">
<div class="inner">
<h3><?php echo $TOT_IR_CLS; ?></h3>
Close -<br />Item Receipt
</div>
<div class="icon">
<i class="ion ion-cube"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($PINV_NEW == 1) { if($TOT_PINV_NEW > 10) { $COL_PINV_NEW = "red"; } else if($TOT_PINV_NEW > 0) { $COL_PINV_NEW = "red"; } else { $COL_PINV_NEW = "red";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_PINV_NEW; ?>">
<div class="inner">
<h3><?php echo $TOT_PINV_NEW; ?></h3>
New -<br />Purchase Invoice
</div>
<div class="icon">
<i class="ion ion-cube"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($PINV_CON == 1) { if($TOT_PINV_CON > 10) { $COL_PINV_CON = "yellow"; } else if($TOT_PINV_CON > 0) { $COL_PINV_CON = "yellow"; } else { $COL_PINV_CON = "yellow";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_PINV_CON; ?>">
<div class="inner">
<h3><?php echo $TOT_PINV_CON; ?></h3>
Outstanding -<br />Purchase Invoice
</div>
<div class="icon">
<i class="ion ion-cube"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($PINV_HP == 1) { if($TOT_PINV_HP > 10){ $COL_PINV_HP = "green"; } else if($TOT_PINV_HP > 0) { $COL_PINV_HP = "green"; } else { $COL_PINV_HP = "green";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_PINV_HP; ?>">
<div class="inner">
<h3><?php echo $TOT_PINV_HP; ?></h3>
Half Paid -<br />Purchase Invoice
</div>
<div class="icon">
<i class="ion ion-cube"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($PINV_FP == 1) { if($TOT_PINV_FP > 10){ $COL_PINV_FP = "primary"; } else if($TOT_PINV_FP > 0) { $COL_PINV_FP = "primary"; } else { $COL_PINV_FP = "primary";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_PINV_FP; ?>">
<div class="inner">
<h3><?php echo $TOT_PINV_FP; ?></h3>
Full Paid -<br />Purchase Invoice
</div>
<div class="icon">
<i class="ion ion-cube"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($RISK_LEV1 == 1) { ?>
<div class="col-lg-3 col-xs-6">
<!-- TOTAL RISK MANAGEMENT FOR LEV.1 -->
<div class="small-box bg-green">
<div class="inner">
<h3><?php echo $GTOTRSKLV1; ?></h3>
Risk Scale -<br />
Kadang
</div>
<div class="icon">
<i class="ion ion-bag"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($RISK_LEV2 == 1) { ?>
<div class="col-lg-3 col-xs-6">
<!-- TOTAL RISK MANAGEMENT FOR LEV.2 -->
<div class="small-box bg-blue">
<div class="inner">
<h3><?php echo $GTOTRSKLV2; ?></h3>
Risk Scale -<br />
Jarang
</div>
<div class="icon">
<i class="ion ion-bag"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($RISK_LEV3 == 1) { ?>
<div class="col-lg-3 col-xs-6">
<!-- TOTAL RISK MANAGEMENT FOR LEV.3 -->
<div class="small-box bg-yellow">
<div class="inner">
<h3><?php echo $GTOTRSKLV3; ?></h3>
Risk Scale -<br />
Jarang Sekali
</div>
<div class="icon">
<i class="ion ion-bag"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($RISK_LEV4 == 1) { ?>
<div class="col-lg-3 col-xs-6">
<!-- TOTAL RISK MANAGEMENT FOR LEV.4 -->
<div class="small-box bg-aqua">
<div class="inner">
<h3><?php echo $GTOTRSKLV4; ?></h3>
Risk Scale -<br />
Sering
</div>
<div class="icon">
<i class="ion ion-bag"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($RISK_LEV5 == 1) { ?>
<div class="col-lg-3 col-xs-6">
<!-- TOTAL RISK MANAGEMENT FOR LEV.5 -->
<div class="small-box bg-red">
<div class="inner">
<h3><?php echo $GTOTRSKLV5; ?></h3>
Risk Scale -<br />
Sering Sekali
</div>
<div class="icon">
<i class="ion ion-bag"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($ASUS_NEW == 1) { if($TOT_ASUS_N > 30) { $COL_AUN = "red"; } else if($TOT_ASUS_N > 15) { $COL_AUN = "yellow"; } else { $COL_AUN = "green";} ?>
<div class="col-lg-3 col-xs-6">
<!-- TOTAL ASSET USAGE - NEW -->
<div class="small-box bg-<?php echo $COL_AUN; ?>">
<div class="inner">
<h3><?php echo $TOT_ASUS_N; ?></h3>
Asset Usage -<br />
New
</div>
<div class="icon">
<i class="ion ion-home"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($ASUS_PROC == 1) { if($TOT_ASUS_P > 10) { $COL_AUP = "red"; } else if($TOT_ASUS_P > 0) { $COL_AUP = "yellow"; } else { $COL_AUP = "green";} ?>
<div class="col-lg-3 col-xs-6">
<!-- TOTAL ASSET USAGE - PROCESS -->
<div class="small-box bg-<?php echo $COL_AUP; ?>">
<div class="inner">
<h3><?php echo $TOT_ASUS_P; ?></h3>
Asset Usage -<br />
Process
</div>
<div class="icon">
<i class="ion ion-home"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($ASUS_FINS == 1) { ?>
<div class="col-lg-3 col-xs-6">
<!-- TOTAL ASSET USAGE - FINISH -->
<div class="small-box bg-aqua">
<div class="inner">
<h3><?php echo $TOT_ASUS_F; ?></h3>
Asset Usage -<br />
Finish
</div>
<div class="icon">
<i class="ion ion-home"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($ASMA_NEW == 1) { if($TOT_ASMA_N > 30) { $COL_AMN = "red"; } else if($TOT_ASMA_N > 10) { $COL_AMN = "yellow"; } else { $COL_AMN = "green";} ?>
<div class="col-lg-3 col-xs-6">
<!-- TOTAL ASSET MAINTENANCE - NEW -->
<div class="small-box bg-<?php echo $COL_AMN; ?>">
<div class="inner">
<h3><?php echo $TOT_ASMA_N; ?></h3>
Asset Maintenance -<br />
New
</div>
<div class="icon">
<i class="ion ion-settings"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($ASMA_PROC == 1) { if($TOT_ASMA_P > 10) { $COL_AMP = "red"; } else if($TOT_ASMA_P > 0) { $COL_AMP = "yellow"; } else { $COL_AMP = "green";} ?>
<div class="col-lg-3 col-xs-6">
<!-- TOTAL ASSET MAINTENANCE - PROCESS -->
<div class="small-box bg-<?php echo $COL_AMP; ?>">
<div class="inner">
<h3><?php echo $TOT_ASMA_P; ?></h3>
Asset Maintenance -<br />
Process
</div>
<div class="icon">
<i class="ion ion-settings"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($ASMA_FINS == 1) { ?>
<div class="col-lg-3 col-xs-6">
<!-- TOTAL ASSET MAINTENANCE - FINISH -->
<div class="small-box bg-blue">
<div class="inner">
<h3><?php echo $TOT_ASMA_F; ?></h3>
Asset Maintenance -<br />
Finish
</div>
<div class="icon">
<i class="ion ion-settings"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($MC_NEW == 1) { if($TOT_MC_NEW > 30) { $COL_MCN = "red"; } else if($TOT_MC_NEW > 15) { $COL_MCN = "red"; } else { $COL_MCN = "red";} ?>
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-<?php echo $COL_MCN; ?>">
<div class="inner">
<h3><?php echo $TOT_MC_NEW; ?></h3>
New Document -<br /> MC
</div>
<div class="icon">
<?php /*?><i class="ion ion-pie-graph"></i><?php */?>
<i class="ion ion-compose"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($MC_CON == 1) { if($TOT_MC_CON > 10) { $COL_MCC = "yellow"; } else if($TOT_MC_CON > 0) { $COL_MCC = "yellow"; } else { $COL_MCC = "yellow";} ?>
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-<?php echo $COL_MCC; ?>">
<div class="inner">
<h3><?php echo $TOT_MC_CON; ?></h3>
Outstanding Approved -<br /> MC
</div>
<div class="icon">
<?php /*?><i class="ion ion-pie-graph"></i><?php */?>
<i class="ion ion-compose"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($MC_APP == 1) { if($TOT_MC_APP > 10) { $COL_MCC = "green"; } else if($TOT_MC_APP > 0) { $COL_MCC = "green"; } else { $COL_MCC = "green";} ?>
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-<?php echo $COL_MCC; ?>">
<div class="inner">
<h3><?php echo $TOT_MC_APP; ?></h3>
Approved -<br /> MC
</div>
<div class="icon">
<?php /*?><i class="ion ion-pie-graph"></i><?php */?>
<i class="ion ion-compose"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($MC_CLS == 1) { if($TOT_MC_CLS > 10) { $COL_MCC = "primary"; } else if($TOT_MC_CLS > 0) { $COL_MCC = "primary"; } else { $COL_MCC = "primary";} ?>
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-<?php echo $COL_MCC; ?>">
<div class="inner">
<h3><?php echo $TOT_MC_CLS; ?></h3>
Close -<br /> MC
</div>
<div class="icon">
<?php /*?><i class="ion ion-pie-graph"></i><?php */?>
<i class="ion ion-compose"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($SI_NEW == 1) { if($TOT_SI_NEW > 30) { $COL_SIN = "red"; } else if($TOT_SI_NEW > 15) { $COL_SIN = "red"; } else { $COL_SIN = "red";} ?>
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-<?php echo $COL_SIN; ?>">
<div class="inner">
<h3><?php echo $TOT_SI_NEW; ?></h3>
New Document -<br /> Site Instruction
</div>
<div class="icon">
<?php /*?><i class="ion ion-pie-graph"></i><?php */?>
<i class="ion ion-compose"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($SI_CON == 1) { if($TOT_SI_CON > 10) { $COL_SIC = "yellow"; } else if($TOT_SI_CON > 0) { $COL_SIC = "yellow"; } else { $COL_SIC = "yellow";} ?>
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-<?php echo $COL_SIC; ?>">
<div class="inner">
<h3><?php echo $TOT_SI_CON; ?></h3>
Outstanding Approved -<br /> Site Instruction
</div>
<div class="icon">
<?php /*?><i class="ion ion-pie-graph"></i><?php */?>
<i class="ion ion-document"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($SI_APP == 1) { if($TOT_SI_APP > 10) { $COL_SIC = "green"; } else if($TOT_SI_APP > 0) { $COL_SIC = "green"; } else { $COL_SIC = "green";} ?>
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-<?php echo $COL_SIC; ?>">
<div class="inner">
<h3><?php echo $TOT_SI_APP; ?></h3>
Approved -<br /> Site Instruction
</div>
<div class="icon">
<?php /*?><i class="ion ion-pie-graph"></i><?php */?>
<i class="ion ion-document"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($SI_CLS == 1) { if($TOT_SI_CLS > 10) { $COL_SIC = "primary"; } else if($TOT_SI_CLS > 0) { $COL_SIC = "primary"; } else { $COL_SIC = "primary";} ?>
<div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-<?php echo $COL_SIC; ?>">
<div class="inner">
<h3><?php echo $TOT_SI_CLS; ?></h3>
Close -<br /> Site Instruction
</div>
<div class="icon">
<?php /*?><i class="ion ion-pie-graph"></i><?php */?>
<i class="ion ion-document"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($PREC_NEW == 1) { if($TOT_RECOMM_NEW > 20) { $COL_PRECN = "red"; } else if($TOT_RECOMM_NEW > 10) { $COL_PRECN = "yellow"; } else { $COL_PRECN = "green";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_PRECN; ?>">
<div class="inner">
<h3><?php echo $TOT_RECOMM_NEW; ?></h3>
New<br />
Project Recommendation
</div>
<div class="icon">
<i class="ion ion-compose"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($PREC_CON == 1) { if($TOT_RECOMM_CON > 20) { $COL_PRECC = "red"; } else if($TOT_RECOMM_CON > 10) { $COL_PRECC = "yellow"; } else { $COL_PRECC = "green";} ?>
<div class="col-lg-3 col-xs-6" style="display:none">
<div class="small-box bg-<?php echo $COL_PRECC; ?>">
<div class="inner">
<h3><?php echo $TOT_RECOMM_CON; ?></h3>
Confirmed<br />
Project Recommendation
</div>
<div class="icon">
<i class="ion ion-document"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($PREC_PRO == 1) { if($TOT_RECOMM_APP > 20) { $COL_PRECA = "red"; } else if($TOT_RECOMM_APP > 10) { $COL_PRECA = "yellow"; } else { $COL_PRECA = "green";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-<?php echo $COL_PRECA; ?>">
<div class="inner">
<h3><?php echo $TOT_RECOMM_APP; ?></h3>
Process<br />
Project Recommendation
</div>
<div class="icon">
<i class="ion ion-loop"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } if($PREC_COM == 1) { if($TOT_RECOMM_FINS > 20) { $COL_PRECF = "red"; } else if($TOT_RECOMM_FINS > 10) { $COL_PRECF = "yellow"; } else { $COL_PRECF = "green";} ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-aqua">
<div class="inner">
<h3><?php echo $TOT_RECOMM_FINS; ?></h3>
Completed<br />
Project Recommendation
</div>
<div class="icon">
<i class="ion ion-thumbsup"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } $EMP_TOT = 1; if($EMP_TOT == 1) { ?>
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-aqua">
<div class="inner">
<h3><?php echo $DHR_TOTEMP; ?></h3>
Employe -<br />Total Employee
</div>
<div class="icon">
<i class="ion ion-android-contacts"></i>
</div>
<a href="<?php echo $showAllOUT; ?>" class="small-box-footer" style="display:none">More info <i class="fa fa-arrow-circle-right"></i></a>
</div>
</div>
<?php } ?>
</div><!-- /.row -->
</div>
</div>
</section>
<!-- END : Count All Transactions -->
<!-- START : Count All Transactions -->
<section class="content">
<div class="box box-success">
<div class="box-header with-border">
<h3 class="box-title">Project's Chart</h3>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse"><i class="fa fa-minus"></i></button>
<button class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
<div class="row">
<?php
$GRF_LC = 1; // OK on Sett
//$GRF_OUT_TRANS = 1; // OK on Sett
//$GRF_OUT_PERCEN = 1; // OK on Sett
//$GRF_LOGHIST = 1; // OK on Sett
//$GRF_CIvsCO = 1; // OK on Sett
//$GRF_PRJFLUK = 1; // OK on Sett
//$GRF_BC = 1;
?>
<?php if($GRF_LC == 1) { ?>
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header with-border">
<i class="fa fa-bar-chart-o"></i>
<h3 class="box-title">Project Progress</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
<div id="line-chart" style="height: 300px;"></div>
</div>
</div>
</div>
<?php } if($GRF_BC == 1) { ?>
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header with-border">
<i class="fa fa-bar-chart-o"></i>
<h3 class="box-title">Project Progress</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body chart-responsive">
<canvas id="canvas"></canvas>
</div>
</div>
</div>
<?php } if($GRF_OUT_TRANS == 1) { ?>
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<i class="fa fa-bar-chart-o"></i>
<h3 class="box-title">Outstanding Transaction</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body chart-responsive">
<div class="chart" id="sales-chart" style="height: 300px; position: relative;"></div>
</div>
</div>
</div>
<?php } if($GRF_OUT_PERCEN == 1) { ?>
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<i class="fa fa-bar-chart-o"></i>
<h3 class="box-title">Outstanding Percentation</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
<div id="donut-chart" style="height: 300px;"></div>
</div>
</div>
</div>
<?php } if($GRF_LOGHIST == 1) { ?>
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<i class="fa fa-bar-chart-o"></i>
<h3 class="box-title">Employee Logs</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body chart-responsive">
<div class="chart" id="login-history" style="height: 300px; position: relative;"></div>
</div>
</div>
</div>
<?php } if($GRF_CIvsCO == 1) { ?>
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<i class="fa fa-bar-chart-o"></i>
<h3 class="box-title">Cash in - Cash Out</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
<div id="cashin-cashout" style="height: 300px;"></div>
</div>
</div>
</div>
<?php } if($GRF_CIvsCO == 1) { ?>
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<i class="fa fa-bar-chart-o"></i>
<h3 class="box-title">Projection Completed</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
<div id="container" style="min-width: 310px; height: 400px; max-width: 600px; margin: 0 auto"></div>
</div>
<script>
// Radialize the colors
Highcharts.setOptions({
colors: Highcharts.map(Highcharts.getOptions().colors, function (color) {
return {
radialGradient: {
cx: 0.5,
cy: 0.3,
r: 0.7
},
stops: [
[0, color],
[1, Highcharts.Color(color).brighten(-0.3).get('rgb')] // darken
]
};
})
});
// Build the chart
Highcharts.chart('container', {
chart: {
plotBackgroundColor: null,
plotBorderWidth: null,
plotShadow: false,
type: 'pie'
},
title: {
text: ''
},
tooltip: {
pointFormat: '{series.name}: <b>{point.percentage:.1f}%</b>'
},
plotOptions: {
pie: {
allowPointSelect: true,
cursor: 'pointer',
dataLabels: {
enabled: true,
format: '<b>{point.name}</b>: {point.percentage:.1f} %',
style: {
color: (Highcharts.theme && Highcharts.theme.contrastTextColor) || 'black'
},
connectorColor: 'silver'
}
}
},
series: [{
name: 'Brands',
data: [
{ name: 'Waktu', y: 1 },
{
name: 'Biaya',
y: 1,
sliced: true,
selected: true
},
{ name: 'Progress', y: 1 }
]
}]
});
</script>
</div>
</div>
<?php } if($GRF_PRJFLUK == 1) { ?>
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<i class="fa fa-bar-chart-o"></i>
<h3 class="box-title">Project Fluctuation</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body chart-responsive">
<div class="chart" id="sales-chart1" style="height: 300px; position: relative;"></div>
</div>
</div>
</div>
<div class="col-md-6" style="display:none">
<div class="box box-primary">
<div class="box-header with-border">
<i class="fa fa-bar-chart-o"></i>
<h3 class="box-title">Project Fluctuation Bar</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body chart-responsive">
<div class="chart" id="bar-chart1" style="height: 300px; position: relative;"></div>
</div>
</div>
</div>
<div class="col-md-6" style="display:none">
<div class="box box-primary">
<div class="box-header with-border">
<i class="fa fa-bar-chart-o"></i>
<h3 class="box-title">Project Fluctuation Bar1</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body chart-responsive">
<div id ="projFluctuation" style="height: 300px; position: relative;"></div>
</div>
</div>
</div>
<?php } if($GRF_PROGRES == 1) { ?>
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header with-border">
<i class="fa fa-bar-chart-o"></i>
<h3 class="box-title">Project Progress</h3>
<div class="box-tools pull-right">
<button type="button" class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="box-body">
<div id="projProgress" style="height: 300px;"></div>
</div>
</div>
</div>
<?php } ?>
</div><!-- /.row -->
</div>
</div>
</section>
<!-- END : Count All Transactions -->
<div class="row">
</section><!-- /.content -->
<?php
$this->load->view('template/js');
?>
<!--tambahkan custom js disini-->
<!-- jQuery UI 1.11.2 -->
<script src="<?php echo base_url('assets/js/jquery-ui.min.js') ?>" type="text/javascript"></script>
<!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
<script>
$.widget.bridge('uibutton', $.ui.button);
</script>
<!-- jQuery 2.0.2 -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.2/jquery.minA.js"></script>
<!-- Bootstrap -->
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/bootstrap/js/bootstrap.minaa.js') ?>" type="text/javascript"></script>
<!-- jQuery Knob Chart -->
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/knob/jquery.knob.js') ?>" type="text/javascript"></script>
<!-- Sparkline -->
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/sparkline/jquery.sparkline.min.js') ?>" type="text/javascript"></script>
<!-- Sparkline -->
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/sparkline/jquery.sparkline.min.js') ?>" type="text/javascript"></script>
<!-- jvectormap -->
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js') ?>" type="text/javascript"></script>
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/jvectormap/jquery-jvectormap-world-mill-en.js') ?>" type="text/javascript"></script>
<!-- daterangepicker -->
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/daterangepicker/daterangepicker.js') ?>" type="text/javascript"></script>
<!-- datepicker -->
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/datepicker/bootstrap-datepicker.js') ?>" type="text/javascript"></script>
<!-- Bootstrap WYSIHTML5 -->
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js') ?>" type="text/javascript"></script>
<!-- iCheck -->
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/iCheck/icheck.min.js') ?>" type="text/javascript"></script>
<!-- AdminLTE dashboard demo (This is only for demo purposes) -->
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/dist/js/pages/dashboardxxx.js') ?>" type="text/javascript"></script>
<!-- AdminLTE for demo purposes -->
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/dist/js/demo.js') ?>" type="text/javascript"></script>
<!-- START FLOT CHARTS -->
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/flot/jquery.flot.min.js') ?>" type="text/javascript"></script>
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/flot/jquery.flot.resize.min.js') ?>" type="text/javascript"></script>
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/flot/jquery.flot.pie.min.js') ?>" type="text/javascript"></script>
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/flot/jquery.flot.categories.min.js') ?>" type="text/javascript"></script>
<!-- END FLOT CHARTS -->
<!-- START MORRIS CHARTS -->
<script src="<?php echo base_url('assets/js/raphael-min.js') ?>"></script>
<script src="<?php echo base_url('assets/AdminLTE-2.0.5/plugins/morris/morris.min.js') ?>" type="text/javascript"></script>
<!-- END MORRIS CHARTS -->
<!-- page script KNOB, SPARKLINE -->
<script type="text/javascript">
$(function() {
/* jQueryKnob */
$(".knob").knob({
/*change : function (value) {
//console.log("change : " + value);
},
release : function (value) {
console.log("release : " + value);
},
cancel : function () {
console.log("cancel : " + this.value);
},*/
draw: function() {
// "tron" case
if (this.$.data('skin') == 'tron') {
var a = this.angle(this.cv) // Angle
, sa = this.startAngle // Previous start angle
, sat = this.startAngle // Start angle
, ea // Previous end angle
, eat = sat + a // End angle
, r = true;
this.g.lineWidth = this.lineWidth;
this.o.cursor
&& (sat = eat - 0.3)
&& (eat = eat + 0.3);
if (this.o.displayPrevious) {
ea = this.startAngle + this.angle(this.value);
this.o.cursor
&& (sa = ea - 0.3)
&& (ea = ea + 0.3);
this.g.beginPath();
this.g.strokeStyle = this.previousColor;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sa, ea, false);
this.g.stroke();
}
this.g.beginPath();
this.g.strokeStyle = r ? this.o.fgColor : this.fgColor;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth, sat, eat, false);
this.g.stroke();
this.g.lineWidth = 2;
this.g.beginPath();
this.g.strokeStyle = this.o.fgColor;
this.g.arc(this.xy, this.xy, this.radius - this.lineWidth + 1 + this.lineWidth * 2 / 3, 0, 2 * Math.PI, false);
this.g.stroke();
return false;
}
}
});
/* END JQUERY KNOB */
//INITIALIZE SPARKLINE CHARTS
$(".sparkline").each(function() {
var $this = $(this);
$this.sparkline('html', $this.data());
});
/* SPARKLINE DOCUMENTAION EXAMPLES http://omnipotent.net/jquery.sparkline/#s-about */
drawDocSparklines();
drawMouseSpeedDemo();
});
function drawDocSparklines() {
// Bar + line composite charts
$('#compositebar').sparkline('html', {type: 'bar', barColor: '#aaf'});
$('#compositebar').sparkline([4, 1, 5, 7, 9, 9, 8, 7, 6, 6, 4, 7, 8, 4, 3, 2, 2, 5, 6, 7],
{composite: true, fillColor: false, lineColor: 'red'});
// Line charts taking their values from the tag
$('.sparkline-1').sparkline();
// Larger line charts for the docs
$('.largeline').sparkline('html',
{type: 'line', height: '2.5em', width: '4em'});
// Customized line chart
$('#linecustom').sparkline('html',
{height: '1.5em', width: '8em', lineColor: '#f00', fillColor: '#ffa',
minSpotColor: false, maxSpotColor: false, spotColor: '#77f', spotRadius: 3});
// Bar charts using inline values
$('.sparkbar').sparkline('html', {type: 'bar'});
$('.barformat').sparkline([1, 3, 5, 3, 8], {
type: 'bar',
tooltipFormat: '{{value:levels}} - {{value}}',
tooltipValueLookups: {
levels: $.range_map({':2': 'Low', '3:6': 'Medium', '7:': 'High'})
}
});
// Tri-state charts using inline values
$('.sparktristate').sparkline('html', {type: 'tristate'});
$('.sparktristatecols').sparkline('html',
{type: 'tristate', colorMap: {'-2': '#fa7', '2': '#44f'}});
// Composite line charts, the second using values supplied via javascript
$('#compositeline').sparkline('html', {fillColor: false, changeRangeMin: 0, chartRangeMax: 10});
$('#compositeline').sparkline([4, 1, 5, 7, 9, 9, 8, 7, 6, 6, 4, 7, 8, 4, 3, 2, 2, 5, 6, 7],
{composite: true, fillColor: false, lineColor: 'red', changeRangeMin: 0, chartRangeMax: 10});
// Line charts with normal range marker
$('#normalline').sparkline('html',
{fillColor: false, normalRangeMin: -1, normalRangeMax: 8});
$('#normalExample').sparkline('html',
{fillColor: false, normalRangeMin: 80, normalRangeMax: 95, normalRangeColor: '#4f4'});
// Discrete charts
$('.discrete1').sparkline('html',
{type: 'discrete', lineColor: 'blue', xwidth: 18});
$('#discrete2').sparkline('html',
{type: 'discrete', lineColor: 'blue', thresholdColor: 'red', thresholdValue: 4});
// Bullet charts
$('.sparkbullet').sparkline('html', {type: 'bullet'});
// Pie charts
$('.sparkpie').sparkline('html', {type: 'pie', height: '1.0em'});
// Box plots
$('.sparkboxplot').sparkline('html', {type: 'box'});
$('.sparkboxplotraw').sparkline([1, 3, 5, 8, 10, 15, 18],
{type: 'box', raw: true, showOutliers: true, target: 6});
// Box plot with specific field order
$('.boxfieldorder').sparkline('html', {
type: 'box',
tooltipFormatFieldlist: ['med', 'lq', 'uq'],
tooltipFormatFieldlistKey: 'field'
});
// click event demo sparkline
$('.clickdemo').sparkline();
$('.clickdemo').bind('sparklineClick', function(ev) {
var sparkline = ev.sparklines[0],
region = sparkline.getCurrentRegionFields();
value = region.y;
alert("Clicked on x=" + region.x + " y=" + region.y);
});
// mouseover event demo sparkline
$('.mouseoverdemo').sparkline();
$('.mouseoverdemo').bind('sparklineRegionChange', function(ev) {
var sparkline = ev.sparklines[0],
region = sparkline.getCurrentRegionFields();
value = region.y;
$('.mouseoverregion').text("x=" + region.x + " y=" + region.y);
}).bind('mouseleave', function() {
$('.mouseoverregion').text('');
});
}
function drawMouseSpeedDemo() {
var mrefreshinterval = 500; // update display every 500ms
var lastmousex = -1;
var lastmousey = -1;
var lastmousetime;
var mousetravel = 0;
var mpoints = [];
var mpoints_max = 30;
$('html').mousemove(function(e) {
var mousex = e.pageX;
var mousey = e.pageY;
if (lastmousex > -1) {
mousetravel += Math.max(Math.abs(mousex - lastmousex), Math.abs(mousey - lastmousey));
}
lastmousex = mousex;
lastmousey = mousey;
});
var mdraw = function() {
var md = new Date();
var timenow = md.getTime();
if (lastmousetime && lastmousetime != timenow) {
var pps = Math.round(mousetravel / (timenow - lastmousetime) * 1000);
mpoints.push(pps);
if (mpoints.length > mpoints_max)
mpoints.splice(0, 1);
mousetravel = 0;
$('#mousespeed').sparkline(mpoints, {width: mpoints.length * 2, tooltipSuffix: ' pixels per second'});
}
lastmousetime = timenow;
setTimeout(mdraw, mrefreshinterval);
}
// We could use setInterval instead, but I prefer to do it this way
setTimeout(mdraw, mrefreshinterval);
}
function labelFormatter(label, series) {
return "<div style='font-size:13px; text-align:center; padding:2px; color: #fff; font-weight: 600;'>"
+ label
+ "<br/>"
+ Math.round(series.percent) + "%</div>";
}
$(function() {
"use strict";
<?php
$GRF_LC = 1; // OK on Sett
//$GRF_OUT_TRANS = 1; // OK on Sett
//$GRF_OUT_PERCEN = 1; // OK on Sett
//$GRF_LOGHIST = 1; // OK on Sett
//$GRF_CIvsCO = 1; // OK on Sett
//$GRF_PRJFLUK = 1; // OK on Sett
//$GRF_BC = 1;
if($GRF_LC == 1) // Project Progress : line-chart
{
?>
var data = [];
/*
* LINE CHART
* ----------
*/
//LINE randomly generated data
var arr1 = [], arr2 = [], arr3 = [];
<?php
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$sqla = "SELECT A.proj_Code, B.PRJNAME
FROM tbl_projprogres A
INNER JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText
GROUP BY proj_Code";
$ressqla = $this->db->query($sqla)->result();
foreach($ressqla as $rowa) :
$proj_Code = $rowa->proj_Code;
$projName = $rowa->PRJNAME;
$proj_Name = "Project : $proj_Code";
$getCountx = "tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1";
$resGetCountx = $this->db->count_all($getCountx);
$NoU = 0;
$sql0 = "SELECT MAX(day(Prg_Date1)) AS myDay, MAX(MONTH(Prg_Date1)) AS myMonth, MAX(YEAR(Prg_Date1)) AS myYear, MAX(Prg_Date1) AS myDate,
MAX(Prg_PlanAkum) AS Prg_PlanAkum, MAX(Prg_RealAkum) AS Prg_RealAkum, isShow, isShowRA, isShowDev
FROM tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1
GROUP BY month(Prg_Date1), year(Prg_Date1) ORDER BY Prg_Date1";
$ressql0 = $this->db->query($sql0)->result();
foreach($ressql0 as $row0) :
$NoU = $NoU + 1;
$DayAx = $row0->myDay;
$myDate = $row0->myDate;
$Prg_PlanAkum = $row0->Prg_PlanAkum;
$Prg_RealAkum = $row0->Prg_RealAkum;
$Prg_Dev2 = $Prg_PlanAkum - $Prg_RealAkum;
$isShow = $row0->isShow;
$isShowRA = $row0->isShowRA;
$isShowDev = $row0->isShowDev;
if($isShow == 1)
{
?>
arr1.push([<?php echo $NoU; ?>, <?php echo $Prg_PlanAkum; ?>]);
<?php
}
if($isShowRA == 1)
{
?>
arr2.push([<?php echo $NoU; ?>, <?php echo $Prg_RealAkum; ?>]);
<?php
}
if($isShowDev == 1)
{
?>
arr3.push([<?php echo $NoU; ?>, <?php echo $Prg_Dev2; ?>]);
<?php
}
endforeach;
endforeach;
?>
var line_data1 = {
label: "Plan",
data: arr1,
color: "#3c8dbc"
};
var line_data2 = {
label: "Real",
data: arr2,
color: "#00c0ef"
};
var line_data3 = {
label: "Deviation",
data: arr3,
color: "#f56954"
};
$.plot("#line-chart", [line_data1, line_data2, line_data3], {
grid: {
hoverable: true,
borderColor: "#f3f3f3",
borderWidth: 1,
tickColor: "#f3f3f3"
},
series: {
shadowSize: 0,
lines: {
show: true
},
points: {
show: true
}
},
lines: {
fill: false,
color: ["#3c8dbc", "#f56954"]
},
yaxis: {
show: true,
},
xaxis: {
show: true
}
});
//Initialize tooltip on hover
$("<div class='tooltip-inner' id='line-chart-tooltip'></div>").css({
position: "absolute",
display: "none",
//opacity: 0.8
}).appendTo("body");
$("#line-chart").bind("plothover", function(event, pos, item) {
if (item) {
var x = item.datapoint[0].toFixed(2),
y = item.datapoint[1].toFixed(2);
$("#line-chart-tooltip").html(item.series.label + " of " + x + " = " + y)
.css({top: item.pageY + 10, left: item.pageX + 10})
.fadeIn(200);
} else {
$("#line-chart-tooltip").hide();
}
});
<?php
}
if($GRF_OUT_TRANS == 1) // Outstanding Transaction : Donut Chart Value
{
$TOT_REQ_CON = 40;
$TOT_PO_CON = 30;
$TOT_IR_CON = 10;
$TOT_PINV_CON = 20;
?>
var donut = new Morris.Donut({
element: 'sales-chart',
resize: true,
colors: ["#3c8dbc", "#f56954", "#00a65a", "#CC9933", "#CC3333", "#666600", "#0066FF", "#FF9900", "#003366"],
data: [
{label: "Request", value: <?php echo $TOT_REQ_CON; ?>},
{label: "Purch. Order", value: <?php echo $TOT_PO_CON; ?>},
{label: "Receipt", value: <?php echo $TOT_IR_CON; ?>},
{label: "Invoice", value: <?php echo $TOT_PINV_CON; ?>}
],
hideHover: 'auto'
});
<?php
}
if($GRF_OUT_PERCEN == 1) // Outstanding Transaction : Donut Chart Percent
{
?>
var donutData = [
{label: "Request", data: <?php echo $TOT_REQ_CON; ?>, color: "#3c8dbc"},
{label: "PO", data: <?php echo $TOT_PO_CON; ?>, color: "#f56954"},
{label: "Receipt", data: <?php echo $TOT_IR_CON; ?>, color: "#00a65a"},
{label: "Invoice", data: <?php echo $TOT_PINV_CON; ?>, color: "#CC9933"}
];
$.plot("#donut-chart", donutData, {
series: {
pie: {
show: true,
radius: 1,
innerRadius: 0.5,
label: {
show: true,
radius: 2 / 3,
formatter: labelFormatter,
threshold: 0.1
}
}
},
legend: {
show: false
}
});
<?php
}
if($GRF_LOGHIST == 1) // Log History : Donut Chart Value
{
?>
var donut = new Morris.Donut({
element: 'login-history',
resize: true,
colors: ["#3c8dbc", "#f56954", "#00a65a", "#CC9933", "#CC3333", "#666600", "#0066FF", "#FF9900", "#003366"],
data: [
{label: "Never", value: <?php echo $LCONC_NEVER; ?>},
{label: "Sometimes", value: <?php echo $LCONC_SOMET; ?>},
{label: "Often", value: <?php echo $LCONC_OFTEN; ?>},
{label: "Excellent", value: <?php echo $LCONC_FANT; ?>}
],
hideHover: 'auto'
});
<?php
}
if($GRF_CIvsCO == 1) // Cash In and Cash Out : Donut Chart Percent
{
?>
var donutData = [
{label: "Cash", data: <?php echo $FT_CASH; ?>, color: "#f56954"},
{label: "AR", data: <?php echo $FT_AR; ?>, color: "#00a65a"},
{label: "CO Plan", data: <?php echo $FT_COP; ?>, color: "#CC9933"},
{label: "AP", data: <?php echo $FT_AP; ?>, color: "#CC3333"}
];
$.plot("#cashin-cashout", donutData, {
series: {
pie: {
show: true,
radius: 1,
innerRadius: 0.5,
label: {
show: true,
radius: 2 / 3,
formatter: labelFormatter,
threshold: 0.1
}
}
},
legend: {
show: true
}
});
<?php
}
if($GRF_SINGLE_LINE == 1) // line-chart1
{
?>
var line = new Morris.Line({
element: 'line-chart1',
resize: true,
data: [
{y: '2011 Q1', item1: 2666},
{y: '2011 Q2', item1: 2778},
{y: '2011 Q3', item1: 4912},
{y: '2011 Q4', item1: 3767},
{y: '2012 Q1', item1: 6810},
{y: '2012 Q2', item1: 5670},
{y: '2012 Q3', item1: 4820},
{y: '2012 Q4', item1: 15073},
{y: '2013 Q1', item1: 10687},
{y: '2013 Q2', item1: 8432}
],
xkey: 'y',
ykeys: ['item1'],
labels: ['Item 1'],
lineColors: ['#3c8dbc'],
hideHover: 'auto'
});
<?php
}
if($GRF_AC == 1) // AREA CHART - revenue-chart
{
?>
var area = new Morris.Area({
element: 'revenue-chart',
resize: true,
data: [
<?php
$i=0;
$sqlPRJPROG = "SELECT proj_Code, PRG_YEAR, PRG_MONTH, SUM(PRG_PLAN) AS PROG_PLAN, Prg_PlanAkum
FROM tbl_projprogres GROUP BY PRG_YEAR, PRG_MONTH";
$resPRJPROG = $this->db->query($sqlPRJPROG)->result();
foreach($resPRJPROG as $rowPP) :
$i=$i+1;
$proj_Code = $rowPP->proj_Code;
$PRG_YEAR = $rowPP->PRG_YEAR;
$PRG_MONTH = $rowPP->PRG_MONTH;
$PROG_PLAN = $rowPP->PROG_PLAN;
$Prg_PlanAkum = $rowPP->Prg_PlanAkum;
?>
{y: '<?php echo $PRG_YEAR; ?> Q<?php echo $PRG_MONTH; ?>', item1: <?php echo "$PROG_PLAN"; ?>, item2: <?php echo "$Prg_PlanAkum"; ?>},
<?php
endforeach;
?>
/*{y: '2011 Q1', item1: 0.59, item2: 0.11},
{y: '2011 Q2', item1: 24, item2: 0.72},
{y: '2011 Q3', item1: 47, item2: 25},
{y: '2011 Q4', item1: 28, item2: 72},*/
],
xkey: 'y',
ykeys: ['item1', 'item2'],
labels: ['Item 1', 'Item 2'],
lineColors: ['#a0d0e0', '#3c8dbc'],
hideHover: 'auto'
});
<?php
}
if($GRF_PRJFLUK == 1) //SALES CHART 1
{
?>
var donut = new Morris.Donut({
element: 'sales-chart1',
resize: true,
colors: ["#3c8dbc", "#f56954", "#00a65a", "#CC9933", "#CC3333", "#666600"],
data: [
{label: "Project Value", value: <?php echo $COST_PRJ; ?>},
{label: "RAP Value", value: <?php echo $COST_VRAP; ?>},
{label: "Added (BA) Cost", value: <?php echo $GTCOST_BACOST; ?>},
{label: "Total SI", value: <?php echo $GTCOST_SIVAL; ?>},
{label: "SI Approved", value: <?php echo $GTCOST_SIAPPVAL; ?>},
{label: "Total Cost", value: <?php echo $GTCOST_TOTCOST; ?>}
],
hideHover: 'auto'
});
<?php
}
/*$FT_PRJCOST = $rowFINT->FT_PRJCOST;
$FT_CASH = $rowFINT->FT_CASH;
$FT_AR = $rowFINT->FT_AR;
$FT_COP = $rowFINT->FT_COP;
$FT_AP = $rowFINT->FT_AP;
$FT_CO = $rowFINT->FT_CO;
$FT_PROG = $rowFINT->FT_PROG;
$FT_PROGAM = $rowFINT->FT_PROGAM;*/
if($GRF_BC == 1) // BAR CHART
{
?>
var MONTHS = [<?php
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$sqla = "SELECT A.proj_Code, B.PRJNAME
FROM tbl_projprogres A
INNER JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText
GROUP BY proj_Code";
$ressqla = $this->db->query($sqla)->result();
foreach($ressqla as $rowa) :
$proj_Code = $rowa->proj_Code;
$projName = $rowa->PRJNAME;
$proj_Name = "Project : $proj_Code";
$getCountx = "tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1";
$resGetCountx = $this->db->count_all($getCountx);
$NoU = 0;
$sql0 = "SELECT MAX(day(Prg_Date1)) AS myDay, MAX(MONTH(Prg_Date1)) AS myMonth, MAX(YEAR(Prg_Date1)) AS myYear, MAX(Prg_Date1) AS myDate,
MAX(Prg_PlanAkum) AS Prg_PlanAkum, MAX(Prg_RealAkum) AS Prg_RealAkum, isShow, isShowRA, isShowDev
FROM tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1
GROUP BY month(Prg_Date1), year(Prg_Date1) ORDER BY Prg_Date1";
$ressql0 = $this->db->query($sql0)->result();
foreach($ressql0 as $row0) :
$NoU = $NoU + 1;
$DayAx = $row0->myDay;
$myDate = $row0->myDate;
$Prg_PlanAkum = $row0->Prg_PlanAkum;
$Prg_RealAkum = $row0->Prg_RealAkum;
$Prg_Dev2 = $Prg_PlanAkum - $Prg_RealAkum;
$isShow = $row0->isShow;
$isShowRA = $row0->isShowRA;
$isShowDev = $row0->isShowDev;
if($isShow == 1)
{
echo "$NoU,";
}
endforeach;
endforeach;
?>];
var config = {
type: 'line',
data: {
labels: [<?php
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$sqla = "SELECT A.proj_Code, B.PRJNAME
FROM tbl_projprogres A
INNER JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText
GROUP BY proj_Code";
$ressqla = $this->db->query($sqla)->result();
foreach($ressqla as $rowa) :
$proj_Code = $rowa->proj_Code;
$projName = $rowa->PRJNAME;
$proj_Name = "Project : $proj_Code";
$getCountx = "tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1";
$resGetCountx = $this->db->count_all($getCountx);
$NoU = 0;
$sql0 = "SELECT MAX(MONTH(Prg_Date1)) AS myMonth, MAX(YEAR(Prg_Date1)) AS myYear,
MAX(Prg_PlanAkum) AS Prg_PlanAkum, MAX(Prg_RealAkum) AS Prg_RealAkum, isShow, isShowRA, isShowDev
FROM tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1
GROUP BY month(Prg_Date1), year(Prg_Date1) ORDER BY Prg_Date1";
$ressql0 = $this->db->query($sql0)->result();
foreach($ressql0 as $row0) :
$NoU = $NoU + 1;
$Prg_PlanAkum = $row0->Prg_PlanAkum;
$Prg_RealAkum = $row0->Prg_RealAkum;
$Prg_Dev2 = $Prg_PlanAkum - $Prg_RealAkum;
$isShow = $row0->isShow;
$isShowRA = $row0->isShowRA;
$isShowDev = $row0->isShowDev;
if($isShow == 1)
{
echo "$NoU,";
}
endforeach;
endforeach;
?>],
datasets: [{
label: 'Plan',
backgroundColor: window.chartColors.yellow,
borderColor: window.chartColors.yellow,
data: [<?php
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$sqla = "SELECT A.proj_Code, B.PRJNAME
FROM tbl_projprogres A
INNER JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText
GROUP BY proj_Code";
$ressqla = $this->db->query($sqla)->result();
foreach($ressqla as $rowa) :
$proj_Code = $rowa->proj_Code;
$projName = $rowa->PRJNAME;
$proj_Name = "Project : $proj_Code";
$getCountx = "tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1";
$resGetCountx = $this->db->count_all($getCountx);
$NoU = 0;
$sql0 = "SELECT MAX(MONTH(Prg_Date1)) AS myMonth, MAX(YEAR(Prg_Date1)) AS myYear,
MAX(Prg_PlanAkum) AS Prg_PlanAkum, MAX(Prg_RealAkum) AS Prg_RealAkum, isShow, isShowRA, isShowDev
FROM tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1
GROUP BY month(Prg_Date1), year(Prg_Date1) ORDER BY Prg_Date1";
$ressql0 = $this->db->query($sql0)->result();
foreach($ressql0 as $row0) :
$NoU = $NoU + 1;
$Prg_PlanAkum = $row0->Prg_PlanAkum;
$Prg_RealAkum = $row0->Prg_RealAkum;
$Prg_Dev2 = $Prg_PlanAkum - $Prg_RealAkum;
$isShow = $row0->isShow;
$isShowRA = $row0->isShowRA;
$isShowDev = $row0->isShowDev;
if($isShow == 1)
{
echo "$Prg_PlanAkum,";
}
endforeach;
endforeach;
?>],
fill: false,
},
{
label: 'Realization',
fill: false,
backgroundColor: window.chartColors.blue,
borderColor: window.chartColors.blue,
data: [<?php
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$sqla = "SELECT A.proj_Code, B.PRJNAME
FROM tbl_projprogres A
INNER JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText
GROUP BY proj_Code";
$ressqla = $this->db->query($sqla)->result();
foreach($ressqla as $rowa) :
$proj_Code = $rowa->proj_Code;
$projName = $rowa->PRJNAME;
$proj_Name = "Project : $proj_Code";
$getCountx = "tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1";
$resGetCountx = $this->db->count_all($getCountx);
$NoU = 0;
$sql0 = "SELECT MAX(MONTH(Prg_Date1)) AS myMonth, MAX(YEAR(Prg_Date1)) AS myYear,
MAX(Prg_PlanAkum) AS Prg_PlanAkum, MAX(Prg_RealAkum) AS Prg_RealAkum, isShow, isShowRA, isShowDev
FROM tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1
GROUP BY month(Prg_Date1), year(Prg_Date1) ORDER BY Prg_Date1";
$ressql0 = $this->db->query($sql0)->result();
foreach($ressql0 as $row0) :
$NoU = $NoU + 1;
$Prg_PlanAkum = $row0->Prg_PlanAkum;
$Prg_RealAkum = $row0->Prg_RealAkum;
$Prg_Dev2 = $Prg_PlanAkum - $Prg_RealAkum;
$isShow = $row0->isShow;
$isShowRA = $row0->isShowRA;
$isShowDev = $row0->isShowDev;
if($isShowRA == 1)
{
echo "$Prg_RealAkum,";
}
endforeach;
endforeach;
?>],
},
{
label: 'Deviation',
fill: false,
backgroundColor: window.chartColors.red,
borderColor: window.chartColors.red,
data: [<?php
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$sqla = "SELECT A.proj_Code, B.PRJNAME
FROM tbl_projprogres A
INNER JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText
GROUP BY proj_Code";
$ressqla = $this->db->query($sqla)->result();
foreach($ressqla as $rowa) :
$proj_Code = $rowa->proj_Code;
$projName = $rowa->PRJNAME;
$proj_Name = "Project : $proj_Code";
$getCountx = "tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1";
$resGetCountx = $this->db->count_all($getCountx);
$NoU = 0;
$sql0 = "SELECT MAX(MONTH(Prg_Date1)) AS myMonth, MAX(YEAR(Prg_Date1)) AS myYear,
MAX(Prg_PlanAkum) AS Prg_PlanAkum, MAX(Prg_RealAkum) AS Prg_RealAkum, isShow, isShowRA, isShowDev
FROM tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1
GROUP BY month(Prg_Date1), year(Prg_Date1) ORDER BY Prg_Date1";
$ressql0 = $this->db->query($sql0)->result();
foreach($ressql0 as $row0) :
$NoU = $NoU + 1;
$Prg_PlanAkum = $row0->Prg_PlanAkum;
$Prg_RealAkum = $row0->Prg_RealAkum;
$Prg_Dev2 = $Prg_PlanAkum - $Prg_RealAkum;
$isShow = $row0->isShow;
$isShowRA = $row0->isShowRA;
$isShowDev = $row0->isShowDev;
if($isShowDev == 1)
{
echo "$Prg_Dev2,";
}
endforeach;
endforeach;
?>],
}]
},
options: {
responsive: true,
title: {
display: true,
text: 'Project Progress'
},
tooltips: {
mode: 'index',
intersect: false,
},
hover: {
mode: 'nearest',
intersect: true
},
scales: {
xAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'Month'
}
}],
yAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'Value'
}
}]
}
}
};
window.onload = function() {
var ctx = document.getElementById('canvas').getContext('2d');
window.myLine = new Chart(ctx, config);
};
document.getElementById('randomizeData').addEventListener('click', function() {
config.data.datasets.forEach(function(dataset) {
dataset.data = dataset.data.map(function() {
return randomScalingFactor();
});
});
window.myLine.update();
});
var colorNames = Object.keys(window.chartColors);
document.getElementById('addDataset').addEventListener('click', function() {
var colorName = colorNames[config.data.datasets.length % colorNames.length];
var newColor = window.chartColors[colorName];
var newDataset = {
label: 'Dataset ' + config.data.datasets.length,
backgroundColor: newColor,
borderColor: newColor,
data: [],
fill: false
};
for (var index = 0; index < config.data.labels.length; ++index) {
newDataset.data.push(randomScalingFactor());
}
config.data.datasets.push(newDataset);
window.myLine.update();
});
document.getElementById('addData').addEventListener('click', function() {
if (config.data.datasets.length > 0) {
var month = MONTHS[config.data.labels.length % MONTHS.length];
config.data.labels.push(month);
config.data.datasets.forEach(function(dataset) {
dataset.data.push(randomScalingFactor());
});
window.myLine.update();
}
});
document.getElementById('removeDataset').addEventListener('click', function() {
config.data.datasets.splice(0, 1);
window.myLine.update();
});
document.getElementById('removeData').addEventListener('click', function() {
config.data.labels.splice(-1, 1); // remove the label first
config.data.datasets.forEach(function(dataset) {
dataset.data.pop();
});
window.myLine.update();
});
<?php
}
if($GRF_BC == 1) // BAR CHART
{
?>
var MONTHS = [<?php
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$sqla = "SELECT A.proj_Code, B.PRJNAME
FROM tbl_projprogres A
INNER JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText
GROUP BY proj_Code";
$ressqla = $this->db->query($sqla)->result();
foreach($ressqla as $rowa) :
$proj_Code = $rowa->proj_Code;
$projName = $rowa->PRJNAME;
$proj_Name = "Project : $proj_Code";
$getCountx = "tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1";
$resGetCountx = $this->db->count_all($getCountx);
$NoU = 0;
$sql0 = "SELECT MAX(day(Prg_Date1)) AS myDay, MAX(MONTH(Prg_Date1)) AS myMonth, MAX(YEAR(Prg_Date1)) AS myYear, MAX(Prg_Date1) AS myDate,
MAX(Prg_PlanAkum) AS Prg_PlanAkum, MAX(Prg_RealAkum) AS Prg_RealAkum, isShow, isShowRA, isShowDev
FROM tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1
GROUP BY month(Prg_Date1), year(Prg_Date1) ORDER BY Prg_Date1";
$ressql0 = $this->db->query($sql0)->result();
foreach($ressql0 as $row0) :
$NoU = $NoU + 1;
$DayAx = $row0->myDay;
$myDate = $row0->myDate;
$Prg_PlanAkum = $row0->Prg_PlanAkum;
$Prg_RealAkum = $row0->Prg_RealAkum;
$Prg_Dev2 = $Prg_PlanAkum - $Prg_RealAkum;
$isShow = $row0->isShow;
$isShowRA = $row0->isShowRA;
$isShowDev = $row0->isShowDev;
if($isShow == 1)
{
echo "$NoU,";
}
endforeach;
endforeach;
?>];
var config = {
type: 'line',
data: {
labels: [<?php
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$sqla = "SELECT A.proj_Code, B.PRJNAME
FROM tbl_projprogres A
INNER JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText
GROUP BY proj_Code";
$ressqla = $this->db->query($sqla)->result();
foreach($ressqla as $rowa) :
$proj_Code = $rowa->proj_Code;
$projName = $rowa->PRJNAME;
$proj_Name = "Project : $proj_Code";
$getCountx = "tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1";
$resGetCountx = $this->db->count_all($getCountx);
$NoU = 0;
$sql0 = "SELECT MAX(MONTH(Prg_Date1)) AS myMonth, MAX(YEAR(Prg_Date1)) AS myYear,
MAX(Prg_PlanAkum) AS Prg_PlanAkum, MAX(Prg_RealAkum) AS Prg_RealAkum, isShow, isShowRA, isShowDev
FROM tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1
GROUP BY month(Prg_Date1), year(Prg_Date1) ORDER BY Prg_Date1";
$ressql0 = $this->db->query($sql0)->result();
foreach($ressql0 as $row0) :
$NoU = $NoU + 1;
$Prg_PlanAkum = $row0->Prg_PlanAkum;
$Prg_RealAkum = $row0->Prg_RealAkum;
$Prg_Dev2 = $Prg_PlanAkum - $Prg_RealAkum;
$isShow = $row0->isShow;
$isShowRA = $row0->isShowRA;
$isShowDev = $row0->isShowDev;
if($isShow == 1)
{
echo "$NoU,";
}
endforeach;
endforeach;
?>],
datasets: [{
label: 'Plan',
backgroundColor: window.chartColors.yellow,
borderColor: window.chartColors.yellow,
data: [<?php
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$sqla = "SELECT A.proj_Code, B.PRJNAME
FROM tbl_projprogres A
INNER JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText
GROUP BY proj_Code";
$ressqla = $this->db->query($sqla)->result();
foreach($ressqla as $rowa) :
$proj_Code = $rowa->proj_Code;
$projName = $rowa->PRJNAME;
$proj_Name = "Project : $proj_Code";
$getCountx = "tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1";
$resGetCountx = $this->db->count_all($getCountx);
$NoU = 0;
$sql0 = "SELECT MAX(MONTH(Prg_Date1)) AS myMonth, MAX(YEAR(Prg_Date1)) AS myYear,
MAX(Prg_PlanAkum) AS Prg_PlanAkum, MAX(Prg_RealAkum) AS Prg_RealAkum, isShow, isShowRA, isShowDev
FROM tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1
GROUP BY month(Prg_Date1), year(Prg_Date1) ORDER BY Prg_Date1";
$ressql0 = $this->db->query($sql0)->result();
foreach($ressql0 as $row0) :
$NoU = $NoU + 1;
$Prg_PlanAkum = $row0->Prg_PlanAkum;
$Prg_RealAkum = $row0->Prg_RealAkum;
$Prg_Dev2 = $Prg_PlanAkum - $Prg_RealAkum;
$isShow = $row0->isShow;
$isShowRA = $row0->isShowRA;
$isShowDev = $row0->isShowDev;
if($isShow == 1)
{
echo "$Prg_PlanAkum,";
}
endforeach;
endforeach;
?>],
fill: false,
},
{
label: 'Realization',
fill: false,
backgroundColor: window.chartColors.blue,
borderColor: window.chartColors.blue,
data: [<?php
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$sqla = "SELECT A.proj_Code, B.PRJNAME
FROM tbl_projprogres A
INNER JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText
GROUP BY proj_Code";
$ressqla = $this->db->query($sqla)->result();
foreach($ressqla as $rowa) :
$proj_Code = $rowa->proj_Code;
$projName = $rowa->PRJNAME;
$proj_Name = "Project : $proj_Code";
$getCountx = "tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1";
$resGetCountx = $this->db->count_all($getCountx);
$NoU = 0;
$sql0 = "SELECT MAX(MONTH(Prg_Date1)) AS myMonth, MAX(YEAR(Prg_Date1)) AS myYear,
MAX(Prg_PlanAkum) AS Prg_PlanAkum, MAX(Prg_RealAkum) AS Prg_RealAkum, isShow, isShowRA, isShowDev
FROM tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1
GROUP BY month(Prg_Date1), year(Prg_Date1) ORDER BY Prg_Date1";
$ressql0 = $this->db->query($sql0)->result();
foreach($ressql0 as $row0) :
$NoU = $NoU + 1;
$Prg_PlanAkum = $row0->Prg_PlanAkum;
$Prg_RealAkum = $row0->Prg_RealAkum;
$Prg_Dev2 = $Prg_PlanAkum - $Prg_RealAkum;
$isShow = $row0->isShow;
$isShowRA = $row0->isShowRA;
$isShowDev = $row0->isShowDev;
if($isShowRA == 1)
{
echo "$Prg_RealAkum,";
}
endforeach;
endforeach;
?>],
},
{
label: 'Deviation',
fill: false,
backgroundColor: window.chartColors.red,
borderColor: window.chartColors.red,
data: [<?php
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$sqla = "SELECT A.proj_Code, B.PRJNAME
FROM tbl_projprogres A
INNER JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText
GROUP BY proj_Code";
$ressqla = $this->db->query($sqla)->result();
foreach($ressqla as $rowa) :
$proj_Code = $rowa->proj_Code;
$projName = $rowa->PRJNAME;
$proj_Name = "Project : $proj_Code";
$getCountx = "tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1";
$resGetCountx = $this->db->count_all($getCountx);
$NoU = 0;
$sql0 = "SELECT MAX(MONTH(Prg_Date1)) AS myMonth, MAX(YEAR(Prg_Date1)) AS myYear,
MAX(Prg_PlanAkum) AS Prg_PlanAkum, MAX(Prg_RealAkum) AS Prg_RealAkum, isShow, isShowRA, isShowDev
FROM tbl_projprogres WHERE proj_Code IN ($myPRJCODE) AND progress_Type = $GraphicTitleText AND isShow = 1
GROUP BY month(Prg_Date1), year(Prg_Date1) ORDER BY Prg_Date1";
$ressql0 = $this->db->query($sql0)->result();
foreach($ressql0 as $row0) :
$NoU = $NoU + 1;
$Prg_PlanAkum = $row0->Prg_PlanAkum;
$Prg_RealAkum = $row0->Prg_RealAkum;
$Prg_Dev2 = $Prg_PlanAkum - $Prg_RealAkum;
$isShow = $row0->isShow;
$isShowRA = $row0->isShowRA;
$isShowDev = $row0->isShowDev;
if($isShowDev == 1)
{
echo "$Prg_Dev2,";
}
endforeach;
endforeach;
?>],
}]
},
options: {
responsive: true,
title: {
display: true,
text: 'Project Progress'
},
tooltips: {
mode: 'index',
intersect: false,
},
hover: {
mode: 'nearest',
intersect: true
},
scales: {
xAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'Month'
}
}],
yAxes: [{
display: true,
scaleLabel: {
display: true,
labelString: 'Value'
}
}]
}
}
};
window.onload = function() {
var ctx = document.getElementById('canvas').getContext('2d');
window.myLine = new Chart(ctx, config);
};
document.getElementById('randomizeData').addEventListener('click', function() {
config.data.datasets.forEach(function(dataset) {
dataset.data = dataset.data.map(function() {
return randomScalingFactor();
});
});
window.myLine.update();
});
var colorNames = Object.keys(window.chartColors);
document.getElementById('addDataset').addEventListener('click', function() {
var colorName = colorNames[config.data.datasets.length % colorNames.length];
var newColor = window.chartColors[colorName];
var newDataset = {
label: 'Dataset ' + config.data.datasets.length,
backgroundColor: newColor,
borderColor: newColor,
data: [],
fill: false
};
for (var index = 0; index < config.data.labels.length; ++index) {
newDataset.data.push(randomScalingFactor());
}
config.data.datasets.push(newDataset);
window.myLine.update();
});
document.getElementById('addData').addEventListener('click', function() {
if (config.data.datasets.length > 0) {
var month = MONTHS[config.data.labels.length % MONTHS.length];
config.data.labels.push(month);
config.data.datasets.forEach(function(dataset) {
dataset.data.push(randomScalingFactor());
});
window.myLine.update();
}
});
document.getElementById('removeDataset').addEventListener('click', function() {
config.data.datasets.splice(0, 1);
window.myLine.update();
});
document.getElementById('removeData').addEventListener('click', function() {
config.data.labels.splice(-1, 1); // remove the label first
config.data.datasets.forEach(function(dataset) {
dataset.data.pop();
});
window.myLine.update();
});
<?php
}
if($GRF_PRJFLUK == 1) // BAR CHART 1
{
?>
var bar_data = {
data: [["Project Value", <?php echo $COST_PRJ; ?>, "#f56954"], ["RAP Value", <?php echo $COST_VRAP; ?>], ["Added (BA) Cost", <?php echo $GTCOST_BACOST; ?>, "#00a65a"], ["Total SI", <?php echo $GTCOST_SIVAL; ?>, "#00a65a"], ["SI Approved", <?php echo $GTCOST_SIAPPVAL; ?>], ["Total Cost", <?php echo $GTCOST_TOTCOST; ?>]],
color: "#f56954"
};
$.plot("#bar-chart1", [bar_data], {
grid: {
borderWidth: 1,
borderColor: "#CC9933",
tickColor: "#CC9933"
},
series: {
bars: {
show: true,
barWidth: 0.5,
align: "center"
}
},
xaxis: {
mode: "categories",
tickLength: 0
}
});
<?php
}
?>
});
</script>
<?php
$this->load->view('template/foot');
?>
// _global function
$this->db->select('Display_Rows,decFormat');
$resGlobal = $this->db->get('tglobalsetting')->result();
foreach($resGlobal as $row) :
$Display_Rows = $row->Display_Rows;
$decFormat = $row->decFormat;
endforeach;
$decFormat = 2;
date_default_timezone_set("Asia/Jakarta");
$myPRJCODE = '';
// Menampilkan Grafik Project Plan Akumulate
$jumTotPlanAkuma = '';
$GraphicTitleText = 3;
$this->load->view('template/head');
$appName = $this->session->userdata('appName');
$FlagUSER = $this->session->userdata['FlagUSER'];
$DefEmp_ID = $this->session->userdata['Emp_ID'];
//$this->load->view('template/topbar');
//$this->load->view('template/sidebar');
$selPRJCODE = "AllPRJ";
if(isset($_POST['submitPRJ']))
{
$selPRJCODE = $_POST['selPRJCODE'];
}
$appName = $this->session->userdata('appName');
$Emp_ID = $this->session->userdata('Emp_ID');
$myPRJCODE = '';
if($selPRJCODE == "AllPRJ")
{
$myrow = 0;
$sql = "SELECT A.proj_Code
FROM tbl_employee_proj A
LEFT JOIN tbl_project B ON B.PRJCODE = A.proj_Code
WHERE A.Emp_ID = '$Emp_ID'";
$result = $this->db->query($sql)->result();
foreach($result as $row) :
$myrow = $myrow + 1;
$PRJCODED = $row ->proj_Code;
if($myrow == 1)
{
$myPRJCODE = "'$PRJCODED'";
$myPRJCODE1 = "'$PRJCODED'";
}
if($myrow > 1)
{
$myPRJCODE1 = "$myPRJCODE1, '$PRJCODED'";
$myPRJCODE = "$myPRJCODE1";
}
endforeach;
}
else
{
$myPRJCODE = "'$selPRJCODE'";
}
// ----------------------- PROJECT
$PRJ_CODE = '';
$PRJ_VALUE = 0;
$PRJ_RAP = 0;
$PRJ_RAB = 0;
$TOT_BA = 0;
$TOT_BA_A = 0;
// ----------------------- REQUEST
$REQ_NEW = 0;
$REQ_CON = 0;
$REQ_APP = 0;
$REQ_REV = 0;
$REQ_REJ = 0;
$REQ_CLS = 0;
$TOT_REQ_NEW = 0;
$TOT_REQ_CON = 0;
$TOT_REQ_APP = 0;
$TOT_REQ_REV = 0;
$TOT_REQ_REJ = 0;
$TOT_REQ_CLS = 0;
// ----------------------- PURCHASE ORDER
$PO_NEW = 0;
$PO_CON = 0;
$PO_APP = 0;
$PO_REV = 0;
$PO_REJ = 0;
$PO_CLS = 0;
$TOT_PO_NEW = 0;
$TOT_PO_CON = 0;
$TOT_PO_APP = 0;
$TOT_PO_REV = 0;
$TOT_PO_REJ = 0;
$TOT_PO_CLS = 0;
// ----------------------- ITEM RECEIPT
$IR_NEW = 0;