Commit 56a8fab8 authored by faisalhamdi's avatar faisalhamdi

issue ro bs!

parent f6420b1c
......@@ -205,18 +205,18 @@ export default class BalanceSheetRO extends Component {
item.level,
item.description,
item.balance_sheet.total_last_year === "" ? "0" : item.balance_sheet.total_last_year,
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.january, formula: item.balance_sheet.january_formula } : Number(item.balance_sheet.january).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.february, formula: item.balance_sheet.february_formula } : Number(item.balance_sheet.february).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.march, formula: item.balance_sheet.march_formula } : Number(item.balance_sheet.march).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.april, formula: item.balance_sheet.april_formula } : Number(item.balance_sheet.april).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.may, formula: item.balance_sheet.may_formula } : Number(item.balance_sheet.may).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.june, formula: item.balance_sheet.june_formula } : Number(item.balance_sheet.june).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.july, formula: item.balance_sheet.july_formula } : Number(item.balance_sheet.july).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.august, formula: item.balance_sheet.august_formula } : Number(item.balance_sheet.august).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.september, formula: item.balance_sheet.september_formula } : Number(item.balance_sheet.september).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.october, formula: item.balance_sheet.october_formula } : Number(item.balance_sheet.october).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.november, formula: item.balance_sheet.november_formula } : Number(item.balance_sheet.november).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.december, formula: item.balance_sheet.december_formula } : Number(item.balance_sheet.december).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.january, formula: item.balance_sheet.january_formula } : Number(item.balance_sheet.january).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.february, formula: item.balance_sheet.february_formula } : Number(item.balance_sheet.february).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.march, formula: item.balance_sheet.march_formula } : Number(item.balance_sheet.march).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.april, formula: item.balance_sheet.april_formula } : Number(item.balance_sheet.april).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.may, formula: item.balance_sheet.may_formula } : Number(item.balance_sheet.may).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.june, formula: item.balance_sheet.june_formula } : Number(item.balance_sheet.june).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.july, formula: item.balance_sheet.july_formula } : Number(item.balance_sheet.july).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.august, formula: item.balance_sheet.august_formula } : Number(item.balance_sheet.august).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.september, formula: item.balance_sheet.september_formula } : Number(item.balance_sheet.september).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.october, formula: item.balance_sheet.october_formula } : Number(item.balance_sheet.october).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.november, formula: item.balance_sheet.november_formula } : Number(item.balance_sheet.november).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.december, formula: item.balance_sheet.december_formula } : Number(item.balance_sheet.december).toFixed(1),
item.balance_sheet.total_current_year === "" ? "0" : item.balance_sheet.total_current_year,
item.order,
item.condition_it_should_be,
......@@ -240,18 +240,18 @@ export default class BalanceSheetRO extends Component {
item.level,
item.description,
item.balance_sheet.total_last_year === "" ? "0" : item.balance_sheet.total_last_year,
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.january, formula: item.balance_sheet.january_formula } : Number(item.balance_sheet.january).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.february, formula: item.balance_sheet.february_formula } : Number(item.balance_sheet.february).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.march, formula: item.balance_sheet.march_formula } : Number(item.balance_sheet.march).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.april, formula: item.balance_sheet.april_formula } : Number(item.balance_sheet.april).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.may, formula: item.balance_sheet.may_formula } : Number(item.balance_sheet.may).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.june, formula: item.balance_sheet.june_formula } : Number(item.balance_sheet.june).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.july, formula: item.balance_sheet.july_formula } : Number(item.balance_sheet.july).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.august, formula: item.balance_sheet.august_formula } : Number(item.balance_sheet.august).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.september, formula: item.balance_sheet.september_formula } : Number(item.balance_sheet.september).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.october, formula: item.balance_sheet.october_formula } : Number(item.balance_sheet.october).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.november, formula: item.balance_sheet.november_formula } : Number(item.balance_sheet.november).toFixed(1),
item.type_report_id == 5 || item.type_report_id == 6 ? { value: item.balance_sheet.december, formula: item.balance_sheet.december_formula } : Number(item.balance_sheet.december).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.january, formula: item.balance_sheet.january_formula } : Number(item.balance_sheet.january).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.february, formula: item.balance_sheet.february_formula } : Number(item.balance_sheet.february).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.march, formula: item.balance_sheet.march_formula } : Number(item.balance_sheet.march).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.april, formula: item.balance_sheet.april_formula } : Number(item.balance_sheet.april).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.may, formula: item.balance_sheet.may_formula } : Number(item.balance_sheet.may).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.june, formula: item.balance_sheet.june_formula } : Number(item.balance_sheet.june).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.july, formula: item.balance_sheet.july_formula } : Number(item.balance_sheet.july).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.august, formula: item.balance_sheet.august_formula } : Number(item.balance_sheet.august).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.september, formula: item.balance_sheet.september_formula } : Number(item.balance_sheet.september).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.october, formula: item.balance_sheet.october_formula } : Number(item.balance_sheet.october).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.november, formula: item.balance_sheet.november_formula } : Number(item.balance_sheet.november).toFixed(1),
String(item.description).toLocaleLowerCase() == "profit (loss) mtd" ? { value: item.balance_sheet.december, formula: item.balance_sheet.december_formula } : Number(item.balance_sheet.december).toFixed(1),
item.balance_sheet.total_current_year === "" ? "0" : item.balance_sheet.total_current_year,
item.order,
item.condition_it_should_be,
......@@ -672,240 +672,131 @@ export default class BalanceSheetRO extends Component {
}
}
const handleValue = (data, type) => {
const handleValue = (data) => {
let total = 0
dataTable2.map((item, index) => {
// if (item[2] !== null) {
// if (data.rowData[5] == 'Retained Earnings') {
// console.log(item[data.columnIndex].value)
// }
if (data.rowData[1] === item[2]) {
// let itemVal = item[data.columnIndex + type].value !== undefined ? Number(item[data.columnIndex + type].value) : Number(item[data.columnIndex + type])
let itemVal = Number(item[data.columnIndex + type])
total = item[data.columnIndex + type] === undefined ? Number(total) + 0 : Number(total) + itemVal
let itemVal = item[data.columnIndex].value !== undefined ? Number(item[data.columnIndex].value) : Number(item[data.columnIndex])
total = item[data.columnIndex] === undefined ? Number(total) + 0 : Number(total) + itemVal
}
// }
})
let indexParent = dataTable2.findIndex((val) => val[1] === dataTable2[data.rowIndex][2])
dataTable2[data.rowIndex][data.columnIndex + type] = Number(total).toFixed(1)
let a = dataTable2[data.rowIndex][data.columnIndex] = Number(total).toFixed(1)
// console.log(indexParent);
return total
return a
}
const handleValidation = (data, tableMeta) => {
let a = handleValueFormula(data, tableMeta)
return a
}
const handleValueFormula = (tableMeta, colIdx) => {
// loading = true
const handleValueFormula = (value, tableMeta, colIdx) => {
let splitFormula = String(tableMeta.rowData[3]).split(/([()@])/)
let baru = []
let anjay = []
splitFormula.map((item, index) => {
let items = String(item).substr(Number(String(item).length) - 1, 1)
let subForm = String(item).substr(0, Number(String(item).length) - 1)
let re = /^[a-zA-Z0-9_]+$/;
if (item !== "") {
if (items == ']') {
if (!re.test(items)) {
if (String(item).substr(Number(String(item).length) - 1, 1) === ']') {
baru.push(String(item))
} else if (!re.test(items)) {
baru.push(subForm)
baru.push(items)
} else {
baru.push(String(item).substr(0, Number(String(item).length) - 1))
baru.push(String(item).substr(Number(String(item).length) - 1, 1))
}
} else {
baru.push(String(item))
}
}
})
// if (tableMeta.columnIndex == 7) {
// console.log(splitFormula)
// console.log(baru)
// }
// console.log(baru)
baru.map((item, index) => {
if (item == '-' || item == '+' || item == '/' || item == '*' || item == '(' || item == ')') {
if (item == '-' || item == '+' || item == '/' || item == '*') {
anjay.push(item)
} else {
if (String(item).includes('#')) {
if (String(item).includes('[M-1]')) {
let tst = String(item).replace('[M-1]', '')
// let indexID = dataTable2.findIndex((val) => val[21] == tst)
let data = tableMeta.rowData[20] == null? [] : tableMeta.rowData[20]
let indexID = data.findIndex((val) => val.item_formula == String(`${item}`))
let data = tableMeta.columnIndex == 7 ? 18 : tableMeta.columnIndex - 1
let period = data == 18 ? Number(this.props.periode) - 1 : this.props.periode
// console.log(tableMeta.columnIndex)
let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
// console.log(indexID)
if (indexID !== -1) {
let valuezz = data[indexID].value
let valuezz = tableMeta.rowData[data].formula[indexID].value
// baru.push(valuezz)
anjay.push(valuezz == "" ? 0 : valuezz)
// console.log(valuezz)
}
} else {
let data = tableMeta.rowData[20] == null? [] : tableMeta.rowData[20]
let indexID = data.findIndex((val) => val.item_formula == String(`@${item}`))
let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode))
// console.log(indexID)
if (indexID !== -1) {
// console.log(tableMeta)
let valuezz = data[indexID].value
// console.log(value.formula[indexID].value)
let valuezz = value.formula[indexID].value
anjay.push(valuezz == "" ? 0 : valuezz)
}
}
} else {
if (String(item).includes('[M-1]')) {
} else if (String(item).includes('[M-1]')) {
let tst = String(item).replace('[M-1]', '')
let indexID = dataTable2.findIndex((val) => val[21] == tst)
if (tableMeta.columnIndex === 7) {
let indexID = dataTable2.findIndex((val) => val[20] == tst)
if (indexID !== -1) {
let valuezz = dataTable2[indexID][10]
if (item == dataTable2[tableMeta.rowIndex][21]) {
anjay.push(0)
let valuezz = dataTable2[indexID][6]
anjay.push(valuezz == "" ? 0 : valuezz)
}
} else {
let data = tableMeta.columnIndex - 1
let indexID = dataTable2.findIndex((val) => val[20] == tst)
if (indexID !== -1) {
let valuezz = dataTable2[indexID][data].value !== undefined ? dataTable2[indexID][data].formula[0].value : dataTable2[indexID][data]
anjay.push(valuezz == "" ? 0 : valuezz)
}
// console.log(tst, data, tableMeta.rowData[data]);
}
} else {
let indexID = dataTable2.findIndex((val) => val[20] == item)
// console.log(dataTable2[indexID])
if (indexID !== -1) {
let valuezz = dataTable2[indexID][colIdx]
if (item == dataTable2[tableMeta.rowIndex][20]) {
anjay.push(0)
} else {
let valuezz = dataTable2[indexID][tableMeta.columnIndex].value == undefined ? dataTable2[indexID][tableMeta.columnIndex] : dataTable2[indexID][tableMeta.columnIndex].value
anjay.push(valuezz == "" ? 0 : valuezz)
}
} else {
if (item === '(-1)') {
anjay.push(-1)
}
}
}
}
}
})
// console.log(item);
let anjay2 = []
let kurung = false
let item1 = []
anjay.map((item, index) => {
if (item == "(") {
kurung = true
} else if (item == ")") {
kurung = false
anjay2.push(item1)
item1 = []
} else {
if (kurung) {
item1.push(item)
} else {
anjay2.push(item)
}
}
}
})
// console.log(anjay)
let total = 0
let opt = ""
let totalPrio = 0
let optPrio = ""
let prio = false
let optPrev = ""
anjay2.map((item, index) => {
if (Array.isArray(item)) {
prio = true
optPrev = opt
item.map((items, indexs) => {
if (items == "+") {
optPrio = "tambah"
} else if (items == "-") {
optPrio = "kurang"
} else if (items == "*") {
optPrio = "kali"
} else if (items == "/") {
optPrio = "bagi"
} else {
if (optPrio == "tambah") {
totalPrio = Number(totalPrio) + Number(items)
} else if (optPrio == "kurang") {
totalPrio = Number(totalPrio) - Number(items)
} else if (optPrio == "kali") {
totalPrio = Number(totalPrio) * Number(items)
} else if (optPrio == "bagi") {
totalPrio = Number(totalPrio) / Number(items) == NaN ? 0 : Number(totalPrio) / Number(items)
} else {
totalPrio += Number(items)
}
}
})
if (index == anjay2.length - 1) {
if (opt == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (opt == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (opt == "kali") {
total = Number(total) * Number(totalPrio)
} else if (opt == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
}
} else {
anjay.map((item, index) => {
if (item == "+") {
opt = "tambah"
if (prio) {
if (optPrev == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (optPrev == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (optPrev == "kali") {
total = Number(total) * Number(totalPrio)
} else if (optPrev == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
prio = false
totalPrio = 0
optPrio = ""
}
} else if (item == "-") {
opt = "kurang"
if (prio) {
if (optPrev == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (optPrev == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (optPrev == "kali") {
total = Number(total) * Number(totalPrio)
} else if (optPrev == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
prio = false
totalPrio = 0
optPrio = ""
}
} else if (item == "*") {
opt = "kali"
if (prio) {
if (optPrev == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (optPrev == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (optPrev == "kali") {
total = Number(total) * Number(totalPrio)
} else if (optPrev == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
prio = false
totalPrio = 0
optPrio = ""
}
} else if (item == "/") {
opt = "bagi"
if (prio) {
if (optPrev == "tambah") {
total = Number(total) + Number(totalPrio)
} else if (optPrev == "kurang") {
total = Number(total) - Number(totalPrio)
} else if (optPrev == "kali") {
total = Number(total) * Number(totalPrio)
} else if (optPrev == "bagi") {
total = Number(total) / Number(totalPrio) == NaN ? 0 : Number(total) / Number(totalPrio)
} else {
total += Number(totalPrio)
}
prio = false
totalPrio = 0
optPrio = ""
}
} else {
item = item == "" ? 0 : item
if (opt == "tambah") {
total = Number(total) + Number(item)
} else if (opt == "kurang") {
......@@ -918,12 +809,23 @@ export default class BalanceSheetRO extends Component {
total += Number(item)
}
}
}
})
total = R.equals(total, NaN) ? "0.0" : total
// console.log(dataTable2[tableMeta.rowIndex][22])
// console.log(tableMeta.rowData[5])
// if (tableMeta.rowData[5] == 'Beginning Balance') {
// console.log(baru)
// console.log(anjay)
// console.log(total)
// }
if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value == undefined) {
// console.log([tableMeta.rowIndex][tableMeta.columnIndex])
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = total
}
dataTable2[tableMeta.rowIndex][colIdx] = total
return total
}
let columns = [
......@@ -1015,19 +917,6 @@ export default class BalanceSheetRO extends Component {
value={Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
/>
</span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
......@@ -1038,82 +927,8 @@ export default class BalanceSheetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={true}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/>
</div> :
tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 6)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q1' || this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 6)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 6)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent'
}}
type="text"
placeholder=""
disabled={true}
value={val == 0 ? "" : Number(handleValueFormula(tableMeta, 6)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
value={val == 0 ? "" : Number(handleValueFormula(tableMeta, 6)).toFixed(1)}
/>
</LightTooltip>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={val == 0 ? "" : Number(val).toFixed(1)}
/>
}
/>
......@@ -1144,7 +959,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -1155,7 +970,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={val === "0" ? "" : Number(handleValue(tableMeta, 0)).toFixed(1)}
value={val === "0" ? "" : Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -1192,14 +1007,14 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={val === "0" ? "" : Number(handleValueFormula(tableMeta, 7)).toFixed(1)}
value={val === "0" ? "" : Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q1' || this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 7)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 7)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1213,7 +1028,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={val == 0 ? "" : Number(handleValueFormula(tableMeta, 7)).toFixed(1)}
value={val == 0 ? "" : Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1230,7 +1045,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={val == 0 ? "" : Number(handleValueFormula(tableMeta, 7)).toFixed(1)}
value={val == 0 ? "" : Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -1276,7 +1091,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -1287,7 +1102,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={val === "0" ? "" : Number(handleValue(tableMeta, 0)).toFixed(1)}
value={val === "0" ? "" : Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -1324,14 +1139,14 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={val === "0" ? "" : Number(handleValueFormula(tableMeta, 8)).toFixed(1)}
value={val === "0" ? "" : Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q1' || this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 8)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 8)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1345,7 +1160,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={val == 0 ? "" : Number(handleValueFormula(tableMeta, 8)).toFixed(1)}
value={val == 0 ? "" : Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1362,7 +1177,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={val == 0 ? "" : Number(handleValueFormula(tableMeta, 8)).toFixed(1)}
value={val == 0 ? "" : Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -1408,7 +1223,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -1419,7 +1234,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={val === "0" ? "" : Number(handleValue(tableMeta, 0)).toFixed(1)}
value={val === "0" ? "" : Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -1456,14 +1271,14 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={val === "0" ? "" : Number(handleValueFormula(tableMeta, 9)).toFixed(1)}
value={val === "0" ? "" : Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q1' || this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 9)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 9)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1477,7 +1292,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={val == 0 ? "" : Number(handleValueFormula(tableMeta, 9)).toFixed(1)}
value={val == 0 ? "" : Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1494,7 +1309,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={val == 0 ? "" : Number(handleValueFormula(tableMeta, 9)).toFixed(1)}
value={val == 0 ? "" : Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -1540,7 +1355,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -1551,7 +1366,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
value={Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -1588,14 +1403,14 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={this.props.quarter == 'q2' || this.props.quarter == 'q3'? (val == ""? "" : Number(handleValueFormula(tableMeta, 10)).toFixed(1)) : Number(handleValueFormula(tableMeta, 10)).toFixed(1)}
value={this.props.quarter == 'q2' || this.props.quarter == 'q3'? (val == ""? "" : Number(handleValueFormula(val, tableMeta)).toFixed(1)) : Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 10)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 10)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1609,7 +1424,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 10)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1626,7 +1441,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 10)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -1672,7 +1487,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -1683,7 +1498,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
value={Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -1720,14 +1535,14 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 11)).toFixed(1)}
value={Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 11)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 11)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1741,7 +1556,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 11)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1758,7 +1573,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 11)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -1804,7 +1619,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -1815,7 +1630,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
value={Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -1852,14 +1667,14 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 12)).toFixed(1)}
value={Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q2' || this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 12)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 12)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -1873,7 +1688,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 12)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -1890,7 +1705,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 12)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -1936,7 +1751,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -1947,7 +1762,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
value={Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -1984,14 +1799,14 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 13)).toFixed(1)}
value={Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 13)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 13)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2005,7 +1820,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 13)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2022,7 +1837,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 13)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -2068,7 +1883,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -2079,7 +1894,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
value={Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -2116,14 +1931,14 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 14)).toFixed(1)}
value={Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 14)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 14)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2137,7 +1952,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 14)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2154,7 +1969,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 14)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -2200,7 +2015,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -2211,7 +2026,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
value={Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -2248,14 +2063,14 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 15)).toFixed(1)}
value={Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
this.props.quarter === 'q3' ? null :
(Number(handleValueFormula(tableMeta, 15)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 15)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2269,7 +2084,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 15)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2286,7 +2101,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 15)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -2332,7 +2147,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -2343,7 +2158,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
value={Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -2380,13 +2195,13 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 16)).toFixed(1)}
value={Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
(Number(handleValueFormula(tableMeta, 16)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 16)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2400,7 +2215,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 16)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2417,7 +2232,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 16)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -2463,7 +2278,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -2474,7 +2289,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
value={Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -2511,13 +2326,13 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 17)).toFixed(1)}
value={Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
(Number(handleValueFormula(tableMeta, 17)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 17)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2531,7 +2346,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 17)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2548,7 +2363,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 17)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -2594,7 +2409,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
/>
:
tableMeta.rowData[0] === 2 ?
......@@ -2605,7 +2420,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
value={Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -2642,13 +2457,13 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 18)).toFixed(1)}
value={Number(handleValueFormula(val, tableMeta)).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
(Number(handleValueFormula(tableMeta, 18)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 18)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2662,7 +2477,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 18)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2679,7 +2494,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 18)).toFixed(1)}
value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/>
</LightTooltip>
:
......@@ -2705,7 +2520,7 @@ export default class BalanceSheetRO extends Component {
}
}
}, {
name: `${this.props.periode} Outlook`,
name: `${this.props.periode} Total Outlook`,
options: {
customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
......@@ -2736,7 +2551,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)}
value={Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
......@@ -2773,13 +2588,14 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 19)).toFixed(1)}
// value={Number(handleValueFormula(val, tableMeta)).toFixed(1)}
value={Number(val).toFixed(1)}
/>
}
/>
</div> :
tableMeta.rowData[0] === 7 ?
(Number(handleValueFormula(tableMeta, 19)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(tableMeta, 19)).toFixed(1) <= Number(this.state.maxValue)) ?
(Number(val).toFixed(1) >= Number(this.state.minValue) && Number(val).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
......@@ -2793,7 +2609,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 19)).toFixed(1)}
value={Number(val).toFixed(1)}
/> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat
......@@ -2810,7 +2626,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleValueFormula(tableMeta, 19)).toFixed(1)}
value={Number(val).toFixed(1)}
/>
</LightTooltip>
:
......@@ -2836,6 +2652,24 @@ export default class BalanceSheetRO extends Component {
}
}
},
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
display: false
}
},
{
name: "",
options: {
display: false
}
}
]
const loadingComponent = (
......
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