Commit 1beb8772 authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

FAM

See merge request !866
parents 11172745 f7da2c07
...@@ -365,12 +365,12 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -365,12 +365,12 @@ export default class FixedAssetsMovementMR extends Component {
"mtd_rb": i[7], "mtd_rb": i[7],
"mtd_actual": i[8], "mtd_actual": i[8],
"act_previous_month": i[9], "act_previous_month": i[9],
"act_vs_prev_month_amount": i[10], "act_vs_prev_month_amount": String(i[10]) === 'NaN' || String(i[10]) === 'Infinity' || String(i[10]) === '-Infinity' ? '0.0' : String(i[10]) ,
"act_vs_prev_month_percent": i[11], "act_vs_prev_month_percent": String(i[11]) === 'NaN' || String(i[11]) === 'Infinity' || String(i[11]) === '-Infinity' ? '0.0' : String(i[11]),
"act_vs_mb_amount": i[12], "act_vs_mb_amount": String(i[12]) === 'NaN' || String(i[12]) === 'Infinity' || String(i[12]) === '-Infinity' ? '0.0' : String(i[12]),
"act_vs_mb_percent": i[13], "act_vs_mb_percent": String(i[13]) === 'NaN' || String(i[13]) === 'Infinity' || String(i[13]) === '-Infinity' ? '0.0' : String(i[13]),
"act_vs_rb_amount": i[14], "act_vs_rb_amount": String(i[14]) === 'NaN' || String(i[14]) === 'Infinity' || String(i[14]) === '-Infinity' ? '0.0' : String(i[14]),
"act_vs_rb_percent": i[15] "act_vs_rb_percent": String(i[15]) === 'NaN' || String(i[15]) === 'Infinity' || String(i[15]) === '-Infinity' ? '0.0' : String(i[15])
}) })
}) })
let payload = { let payload = {
...@@ -439,17 +439,20 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -439,17 +439,20 @@ export default class FixedAssetsMovementMR extends Component {
}) })
// console.log(baru); // console.log(baru);
let tambahan = false
let opet = ""
baru.map((item, index) => { baru.map((item, index) => {
if (item == '-' || item == '+' || item == '/' || item == '*' || item == '(' || item == ')') { if (item == 'X') {
tambahan = true
} else if (item == '-' || item == '+' || item == '/' || item == '*' || item == '(' || item == ')') {
anjay.push(item) anjay.push(item)
} else { } else {
if (String(item).includes('#')) { if (String(item).includes('#')) {
if (String(item).includes('[M-1]')) { if (String(item).includes('[M-1]')) {
let tst = String(item).replace('[M-1]', '[M1]') let tst = '@' + String(item).replace('[M-1]', '[M1]')
// console.log(dataTable2[tableMeta.rowIndex]); // console.log(dataTable2[tableMeta.rowIndex]);
// console.log(tableMeta); // console.log(tableMeta);
// console.log(tst); console.log(tst);
let indexID = dataTable2[tableMeta.rowIndex][16].findIndex((val) => val.item_formula == tst) let indexID = dataTable2[tableMeta.rowIndex][16].findIndex((val) => val.item_formula == tst)
// console.log(indexID); // console.log(indexID);
...@@ -476,6 +479,17 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -476,6 +479,17 @@ export default class FixedAssetsMovementMR extends Component {
} }
} else { } else {
let indexID = dataTable2.findIndex((val) => val[17] == item) let indexID = dataTable2.findIndex((val) => val[17] == item)
if (item == 'X-1') {
anjay.push(-1)
} else if (tambahan) {
if (item == '-' || item == '+' || item == '/' || item == '*') {
opet = item
} else {
anjay.push(opet == ''? Number(item) : Number(String(opet + String(item))))
tambahan = false
opet = ""
}
} else {
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = dataTable2[indexID][colIdx] let valuezz = dataTable2[indexID][colIdx]
if (item == dataTable2[tableMeta.rowIndex][28]) { if (item == dataTable2[tableMeta.rowIndex][28]) {
...@@ -491,6 +505,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -491,6 +505,7 @@ export default class FixedAssetsMovementMR extends Component {
} }
} }
} }
}
}) })
let anjay2 = [] let anjay2 = []
...@@ -1042,7 +1057,7 @@ export default class FixedAssetsMovementMR extends Component { ...@@ -1042,7 +1057,7 @@ export default class FixedAssetsMovementMR extends Component {
<div className="grid grid-2x content-center"> <div className="grid grid-2x content-center">
<div className="column-1"> <div className="column-1">
<div style={{ textAlign: 'right', width: 120 }}> <div style={{ textAlign: 'right', width: 120 }}>
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1 || tableMeta.rowData[0] === 2 ?
null : null :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
......
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