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 {
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.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.condition_it_should_be,
item.condition_if_wrong,
......@@ -633,19 +634,11 @@ export default class BalanceSheetRO extends Component {
const handleValue = (data) => {
let total = 0
if (data.rowData[5] == "Cash and cash equivalent" && data.columnIndex == 19) {
console.log(data.rowData[19]);
}
dataTable2.map((item, index) => {
// if (data.rowData[5] == 'Retained Earnings') {
// console.log(item[data.columnIndex].value)
// }
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])
total = item[data.columnIndex] === undefined ? Number(total) + 0 : Number(total) + itemVal
}
......@@ -663,12 +656,12 @@ export default class BalanceSheetRO extends Component {
const handleTotal = (tableMeta) => {
let total = 0
tableMeta.rowData.map((item,index) => {
tableMeta.rowData.map((item, index) => {
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "r/e (cummulative)") {
total = String(Number(tableMeta.rowData[7]).toFixed(1))
dataTable2[tableMeta.rowIndex][19] = total
} else if (String(tableMeta.rowData[5]).toLocaleLowerCase() == "profit (loss) mtd") {
if (index >=7 && index <= 18) {
if (index >= 7 && index <= 18) {
total += Number(item.value)
}
} else if (index == 18) {
......@@ -961,7 +954,7 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
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 }}>
......@@ -974,7 +967,8 @@ export default class BalanceSheetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
/>
}
......@@ -1006,7 +1000,8 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
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 }}>
......@@ -1019,7 +1014,8 @@ export default class BalanceSheetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
/>
}
......@@ -1051,7 +1047,8 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
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 }}>
......@@ -1064,7 +1061,8 @@ export default class BalanceSheetRO extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
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}
/>
}
......@@ -1096,7 +1094,8 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
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 ?
......@@ -1228,7 +1227,8 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
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 ?
......@@ -1360,7 +1360,8 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
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 ?
......@@ -1492,7 +1493,8 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
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 ?
......@@ -1624,7 +1626,8 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
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 ?
......@@ -1756,7 +1759,8 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
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 ?
......@@ -1888,7 +1892,8 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
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 ?
......@@ -2019,7 +2024,8 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
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 ?
......@@ -2150,7 +2156,8 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
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 ?
......@@ -2329,7 +2336,8 @@ export default class BalanceSheetRO extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode)}`, 19)).toFixed(1)}
value={Number(val).toFixed(1)}
/>
}
/>
......
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