Commit c67cd0ec authored by faisalhamdi's avatar faisalhamdi

ca pa!

parent e034b0c6
......@@ -3016,54 +3016,6 @@ export default class SubHolding extends Component {
let parentTrue = item.parent_name == 'INTERNAL BUSINESS PROCESS PERSPECTIVE' || item.parent_name == 'CUSTOMER PERSPECTIVE'
let weight = String(item.corporate_annual_target.weight).substr(0, String(item.corporate_annual_target.weight).length - 1)
// let achivementYtd = 0
// if (item.formula_ytd == 'HIB') {
// let actual = item.corporate_annual_target.actual_ytd == "" ? 0 : Number(item.corporate_annual_target.actual_ytd)
// let target = item.corporate_annual_target.target_ytd == "" ? 0 : Number(item.corporate_annual_target.target_ytd)
// if (target < 0) {
// if (actual > target) {
// achivementYtd = (actual / target) - 1
// } else {
// achivementYtd = (actual / target)
// }
// } else if (target == 0) {
// if (target >= actual) {
// achivementYtd = 1.26
// } else {
// achivementYtd = 0
// }
// } else {
// if (actual == target) {
// achivementYtd = (actual / target)
// } else {
// achivementYtd = 2 - (actual / target)
// }
// }
// } else {
// let actual = item.corporate_annual_target.actual_ytd == "" ? 0 : Number(item.corporate_annual_target.actual_ytd)
// let target = item.corporate_annual_target.target_ytd == "" ? 0 : Number(item.corporate_annual_target.target_ytd)
// if (target < 0) {
// if (actual >= target) {
// achivementYtd = ((target - actual) / target) + 1
// } else {
// achivementYtd = (target - actual) / target
// }
// } else if (target == 0) {
// if (target <= actual) {
// achivementYtd = 1.26
// } else {
// achivementYtd = 0
// }
// } else {
// // if (actual <= target) {
// achivementYtd = (actual / target)
// // } else {
// // achivementYtd = 1 - (actual / target)
// // }
// }
// }
// total = String(total) == 'NaN' || String(total) == 'Infinity' || String(total) == '-Infinity' ? 0 : total
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(total) * 100
dbCATPA.push([
item.type_report_id,
item.id,
......@@ -3072,19 +3024,13 @@ export default class SubHolding extends Component {
item.level,
item.description,
item.corporate_annual_target.weight == "" ? Number(0).toFixed(1) : Number(weight).toFixed(1),
// item.uom,
// item.kpi_type,
// item.max_ach,
// item.formula_ytd,
parentTrue ? item.corporate_annual_target.uom : item.uom,
parentTrue ? item.corporate_annual_target.jenis_kpi == "" ? null : item.corporate_annual_target.jenis_kpi : item.jenis_kpi == "" ? null : item.kpi_type,
parentTrue ? item.corporate_annual_target.max_ach == "" ? null : titleCase(item.corporate_annual_target.max_ach) : item.max_ach == "" ? null : titleCase(item.max_ach),
item.corporate_annual_target.formula_ytd == "" ? null : item.corporate_annual_target.formula_ytd,
item.corporate_annual_target.actual_ytd,
item.corporate_annual_target.target_ytd,
item.corporate_annual_target.achivement_ytd,
// isNaN(achivementYtd) || achivementYtd == 'Infinity' || achivementYtd == '-Infinity'? 0 : (Number(achivementYtd) * 100),
item.corporate_annual_target.score,
item.corporate_annual_target.score_x_weight,
item.order
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment