Commit 1d40c17f authored by d.arizona's avatar d.arizona

update bs RO

parent 520b3fdd
...@@ -218,6 +218,7 @@ export default class BalanceSheetRO extends Component { ...@@ -218,6 +218,7 @@ export default class BalanceSheetRO extends Component {
this.props.status === 'CLOSED' ? Number(item.balance_sheet.october).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), this.props.status === 'CLOSED' ? Number(item.balance_sheet.october).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),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.november).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), this.props.status === 'CLOSED' ? Number(item.balance_sheet.november).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),
this.props.status === 'CLOSED' ? Number(item.balance_sheet.december).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), this.props.status === 'CLOSED' ? Number(item.balance_sheet.december).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),
item.balance_sheet.total_current_year === "" ? "0" : item.balance_sheet.total_current_year,
item.order, item.order,
item.condition_it_should_be, item.condition_it_should_be,
item.condition_if_wrong, item.condition_if_wrong,
...@@ -341,18 +342,18 @@ export default class BalanceSheetRO extends Component { ...@@ -341,18 +342,18 @@ export default class BalanceSheetRO extends Component {
data.push({ data.push({
"item_report_id": i[1], "item_report_id": i[1],
"total_december_last_year": String(Number(i[6]).toFixed(1)), "total_december_last_year": String(Number(i[6]).toFixed(1)),
"january": i[7].value !== undefined ? String(Number(i[7].value).toFixed(1)) : String(Number(i[7]).toFixed(1)), "january": i[7].value !== undefined ? String(Number(i[7].value).toFixed(1)) : String(Number(i[7]).toFixed(1)),
"february": i[8].value !== undefined ? String(Number(i[8].value).toFixed(1)) : String(Number(i[8]).toFixed(1)), "february": i[8].value !== undefined ? String(Number(i[8].value).toFixed(1)) : String(Number(i[8]).toFixed(1)),
"march": i[9].value !== undefined ? String(Number(i[9].value).toFixed(1)) : String(Number(i[9]).toFixed(1)), "march": i[9].value !== undefined ? String(Number(i[9].value).toFixed(1)) : String(Number(i[9]).toFixed(1)),
"april": i[10].value !== undefined ? String(Number(i[10].value).toFixed(1)) : String(Number(i[10]).toFixed(1)), "april": i[10].value !== undefined ? String(Number(i[10].value).toFixed(1)) : String(Number(i[10]).toFixed(1)),
"may": i[11].value !== undefined ? String(Number(i[11].value).toFixed(1)) : String(Number(i[11]).toFixed(1)), "may": i[11].value !== undefined ? String(Number(i[11].value).toFixed(1)) : String(Number(i[11]).toFixed(1)),
"june": i[12].value !== undefined ? String(Number(i[12].value).toFixed(1)) : String(Number(i[12]).toFixed(1)), "june": i[12].value !== undefined ? String(Number(i[12].value).toFixed(1)) : String(Number(i[12]).toFixed(1)),
"july": i[13].value !== undefined ? String(Number(i[13].value).toFixed(1)) : String(Number(i[13]).toFixed(1)), "july": i[13].value !== undefined ? String(Number(i[13].value).toFixed(1)) : String(Number(i[13]).toFixed(1)),
"august": i[14].value !== undefined ? String(Number(i[14].value).toFixed(1)) : String(Number(i[14]).toFixed(1)), "august": i[14].value !== undefined ? String(Number(i[14].value).toFixed(1)) : String(Number(i[14]).toFixed(1)),
"september": i[15].value !== undefined ? String(Number(i[15].value).toFixed(1)) : String(Number(i[15]).toFixed(1)), "september": i[15].value !== undefined ? String(Number(i[15].value).toFixed(1)) : String(Number(i[15]).toFixed(1)),
"october": i[16].value !== undefined ? String(Number(i[16].value).toFixed(1)) : String(Number(i[16]).toFixed(1)), "october": i[16].value !== undefined ? String(Number(i[16].value).toFixed(1)) : String(Number(i[16]).toFixed(1)),
"november": i[17].value !== undefined ? String(Number(i[17].value).toFixed(1)) : String(Number(i[17]).toFixed(1)), "november": i[17].value !== undefined ? String(Number(i[17].value).toFixed(1)) : String(Number(i[17]).toFixed(1)),
"december": i[18].value !== undefined ? String(Number(i[18].value).toFixed(1)) : String(Number(i[18]).toFixed(1)), "december": i[18].value !== undefined ? String(Number(i[18].value).toFixed(1)) : String(Number(i[18]).toFixed(1)),
"total_december_year": String(Number(i[19]).toFixed(1)) "total_december_year": String(Number(i[19]).toFixed(1))
}) })
}) })
...@@ -550,18 +551,18 @@ export default class BalanceSheetRO extends Component { ...@@ -550,18 +551,18 @@ export default class BalanceSheetRO extends Component {
data.push({ data.push({
"item_report_id": i[1], "item_report_id": i[1],
"total_december_last_year": String(Number(i[6]).toFixed(1)), "total_december_last_year": String(Number(i[6]).toFixed(1)),
"january": i[7].value !== undefined ? String(Number(i[7].value).toFixed(1)) : String(Number(i[7]).toFixed(1)), "january": i[7].value !== undefined ? String(Number(i[7].value).toFixed(1)) : String(Number(i[7]).toFixed(1)),
"february": i[8].value !== undefined ? String(Number(i[8].value).toFixed(1)) : String(Number(i[8]).toFixed(1)), "february": i[8].value !== undefined ? String(Number(i[8].value).toFixed(1)) : String(Number(i[8]).toFixed(1)),
"march": i[9].value !== undefined ? String(Number(i[9].value).toFixed(1)) : String(Number(i[9]).toFixed(1)), "march": i[9].value !== undefined ? String(Number(i[9].value).toFixed(1)) : String(Number(i[9]).toFixed(1)),
"april": i[10].value !== undefined ? String(Number(i[10].value).toFixed(1)) : String(Number(i[10]).toFixed(1)), "april": i[10].value !== undefined ? String(Number(i[10].value).toFixed(1)) : String(Number(i[10]).toFixed(1)),
"may": i[11].value !== undefined ? String(Number(i[11].value).toFixed(1)) : String(Number(i[11]).toFixed(1)), "may": i[11].value !== undefined ? String(Number(i[11].value).toFixed(1)) : String(Number(i[11]).toFixed(1)),
"june": i[12].value !== undefined ? String(Number(i[12].value).toFixed(1)) : String(Number(i[12]).toFixed(1)), "june": i[12].value !== undefined ? String(Number(i[12].value).toFixed(1)) : String(Number(i[12]).toFixed(1)),
"july": i[13].value !== undefined ? String(Number(i[13].value).toFixed(1)) : String(Number(i[13]).toFixed(1)), "july": i[13].value !== undefined ? String(Number(i[13].value).toFixed(1)) : String(Number(i[13]).toFixed(1)),
"august": i[14].value !== undefined ? String(Number(i[14].value).toFixed(1)) : String(Number(i[14]).toFixed(1)), "august": i[14].value !== undefined ? String(Number(i[14].value).toFixed(1)) : String(Number(i[14]).toFixed(1)),
"september": i[15].value !== undefined ? String(Number(i[15].value).toFixed(1)) : String(Number(i[15]).toFixed(1)), "september": i[15].value !== undefined ? String(Number(i[15].value).toFixed(1)) : String(Number(i[15]).toFixed(1)),
"october": i[16].value !== undefined ? String(Number(i[16].value).toFixed(1)) : String(Number(i[16]).toFixed(1)), "october": i[16].value !== undefined ? String(Number(i[16].value).toFixed(1)) : String(Number(i[16]).toFixed(1)),
"november": i[17].value !== undefined ? String(Number(i[17].value).toFixed(1)) : String(Number(i[17]).toFixed(1)), "november": i[17].value !== undefined ? String(Number(i[17].value).toFixed(1)) : String(Number(i[17]).toFixed(1)),
"december": i[18].value !== undefined ? String(Number(i[18].value).toFixed(1)) : String(Number(i[18]).toFixed(1)), "december": i[18].value !== undefined ? String(Number(i[18].value).toFixed(1)) : String(Number(i[18]).toFixed(1)),
"total_december_year": String(Number(i[19]).toFixed(1)) "total_december_year": String(Number(i[19]).toFixed(1))
}) })
}) })
...@@ -633,19 +634,11 @@ export default class BalanceSheetRO extends Component { ...@@ -633,19 +634,11 @@ export default class BalanceSheetRO extends Component {
const handleValue = (data) => { const handleValue = (data) => {
let total = 0 let total = 0
if (data.rowData[5] == "Cash and cash equivalent" && data.columnIndex == 19) {
console.log(data.rowData[19]);
}
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
// if (data.rowData[5] == 'Retained Earnings') { // if (data.rowData[5] == 'Retained Earnings') {
// console.log(item[data.columnIndex].value) // console.log(item[data.columnIndex].value)
// } // }
if (data.rowData[1] === item[2]) { if (data.rowData[1] === item[2]) {
if(item[data.columnIndex] == undefined ) {
console.log(item);
}
let itemVal = item[data.columnIndex].value !== undefined ? Number(item[data.columnIndex].value) : Number(item[data.columnIndex]) 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 total = item[data.columnIndex] === undefined ? Number(total) + 0 : Number(total) + itemVal
} }
...@@ -662,13 +655,13 @@ export default class BalanceSheetRO extends Component { ...@@ -662,13 +655,13 @@ export default class BalanceSheetRO extends Component {
} }
const handleTotal = (tableMeta) => { const handleTotal = (tableMeta) => {
let total = 0 let total = 0
tableMeta.rowData.map((item,index) => { tableMeta.rowData.map((item, index) => {
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)") { if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)") {
total = String(Number(tableMeta.rowData[7]).toFixed(1)) total = String(Number(tableMeta.rowData[7]).toFixed(1))
dataTable2[tableMeta.rowIndex][19] = total dataTable2[tableMeta.rowIndex][19] = total
} else if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd") { } else if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd") {
if (index >=7 && index <= 18) { if (index >= 7 && index <= 18) {
total += Number(item.value) total += Number(item.value)
} }
} else if (index == 18) { } else if (index == 18) {
...@@ -961,7 +954,7 @@ export default class BalanceSheetRO extends Component { ...@@ -961,7 +954,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} value={Number(val.value == undefined ? val : val.value).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -974,7 +967,8 @@ export default class BalanceSheetRO extends Component { ...@@ -974,7 +967,8 @@ export default class BalanceSheetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
disabled={true} disabled={true}
/> />
} }
...@@ -1006,7 +1000,8 @@ export default class BalanceSheetRO extends Component { ...@@ -1006,7 +1000,8 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -1019,7 +1014,8 @@ export default class BalanceSheetRO extends Component { ...@@ -1019,7 +1014,8 @@ export default class BalanceSheetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
disabled={true} disabled={true}
/> />
} }
...@@ -1051,7 +1047,8 @@ export default class BalanceSheetRO extends Component { ...@@ -1051,7 +1047,8 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -1064,7 +1061,8 @@ export default class BalanceSheetRO extends Component { ...@@ -1064,7 +1061,8 @@ export default class BalanceSheetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
disabled={true} disabled={true}
/> />
} }
...@@ -1096,7 +1094,8 @@ export default class BalanceSheetRO extends Component { ...@@ -1096,7 +1094,8 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -1228,7 +1227,8 @@ export default class BalanceSheetRO extends Component { ...@@ -1228,7 +1227,8 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -1360,7 +1360,8 @@ export default class BalanceSheetRO extends Component { ...@@ -1360,7 +1360,8 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -1492,7 +1493,8 @@ export default class BalanceSheetRO extends Component { ...@@ -1492,7 +1493,8 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -1624,7 +1626,8 @@ export default class BalanceSheetRO extends Component { ...@@ -1624,7 +1626,8 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -1756,7 +1759,8 @@ export default class BalanceSheetRO extends Component { ...@@ -1756,7 +1759,8 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -1888,7 +1892,8 @@ export default class BalanceSheetRO extends Component { ...@@ -1888,7 +1892,8 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -2019,7 +2024,8 @@ export default class BalanceSheetRO extends Component { ...@@ -2019,7 +2024,8 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -2150,7 +2156,8 @@ export default class BalanceSheetRO extends Component { ...@@ -2150,7 +2156,8 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)} // value={String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd" ? Number(val.value).toFixed(1) : Number(val).toFixed(1)}
value={Number(val.value == undefined ? val : val.value).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
...@@ -2285,39 +2292,18 @@ export default class BalanceSheetRO extends Component { ...@@ -2285,39 +2292,18 @@ export default class BalanceSheetRO extends Component {
/> />
: :
tableMeta.rowData[0] === 2 ? tableMeta.rowData[0] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValue(tableMeta)).toFixed(1)} value={Number(handleValue(tableMeta)).toFixed(1)}
/>
</span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", 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={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
</div> : </span>
tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? :
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -2325,33 +2311,39 @@ export default class BalanceSheetRO extends Component { ...@@ -2325,33 +2311,39 @@ export default class BalanceSheetRO extends Component {
control={ control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)} disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/> />
} }
/> />
</div> : </div> :
tableMeta.rowData[0] === 7 ? tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ? <div style={{ flex: 1 }}>
<NumberFormat <FormControlLabel
thousandSeparator={true} style={{ margin: 0 }}
style={{ value={val}
fontSize: 12, control={
textAlign: 'right', <NumberFormat
borderColor: 'transparent', thousandSeparator={true}
margin: 0, style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
width: 96, type="text"
backgroundColor: 'transparent' placeholder=""
}} disabled={true}
type="text" // value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
placeholder="" value={Number(val).toFixed(1)}
disabled={true} />
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> </div> :
tableMeta.rowData[0] === 7 ?
(Number(handleValidation(val, tableMeta)).toFixed(1) >= Number(this.state.minValue) && Number(handleValidation(val, tableMeta)).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{
...@@ -2360,32 +2352,48 @@ export default class BalanceSheetRO extends Component { ...@@ -2360,32 +2352,48 @@ export default class BalanceSheetRO extends Component {
borderColor: 'transparent', borderColor: 'transparent',
margin: 0, margin: 0,
width: 96, width: 96,
backgroundColor: 'transparent', backgroundColor: 'transparent'
color: 'red'
}} }}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValidation(val, tableMeta)).toFixed(1)} value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/> /> :
</LightTooltip> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(val).toFixed(1)} value={Number(handleValidation(val, tableMeta)).toFixed(1)}
/> />
} </LightTooltip>
/> :
</div> <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(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
......
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