Commit 642294f6 authored by d.arizona's avatar d.arizona

apdet

parent b315698d
......@@ -591,11 +591,26 @@ export default class FixedAssetsMovement extends Component {
}
}
}
const handleForecast = (tableMeta) => {
let total = 0
// if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
// total = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex - 1]
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
// }
return total
}
const handleTotal = (tableMeta) => {
let total = 0
// if (tableMeta.rowData[5] == 'Beginning balance') {
// console.log(tableMeta.rowData)
// }
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'ending balance') {
total = dataTable2[tableMeta.rowIndex][18].value
dataTable2[tableMeta.rowIndex][19] = total
} else if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
total = dataTable2[tableMeta.rowIndex][7].value
dataTable2[tableMeta.rowIndex][19] = total
} else {
dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index >= 7 && index <= 18) {
let valItem = item.value == undefined ? item == undefined || item == "" ? 0 : item : item.value == "" ? 0 : item.value
......@@ -603,6 +618,7 @@ export default class FixedAssetsMovement extends Component {
}
})
dataTable2[tableMeta.rowIndex][19] = total
}
return total
// console.log(total);
}
......@@ -799,7 +815,7 @@ export default class FixedAssetsMovement extends Component {
customBodyRender: (value, tableMeta, updateValue) => {
return (
<div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 ?
{tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1?
null
:
<div style={{ flex: 1 }}>
......@@ -1984,17 +2000,7 @@ export default class FixedAssetsMovement extends Component {
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
/>
:
tableMeta.rowData[0] === 5 ?
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(value).toFixed(1)}
value={Number(handleForecast(tableMeta)).toFixed(1)}
/>
:
tableMeta.rowData[0] === 1 ?
......
......@@ -2,8 +2,11 @@ const Constant = {
TOKEN: null,
USER: 0,
EMAIL: 'TOKEN',
PASSWORD: 'PASSWORD'
PASSWORD: 'PASSWORD',
URL_BE_DEFAULT: 'https://tia.eksad.com/tia-reporting-dev',
URL_FE_DEFAULT: 'https://tia.eksad.com/tia-web-dev',
URL_BE_DEMO: 'https://tia.eksad.com/tia-reporting-demo',
URL_FE_DEMO: 'https://tia.eksad.com/tia-web-demo',
}
export default Constant;
\ No newline at end of file
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