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

apdet

parent b315698d
...@@ -591,18 +591,34 @@ export default class FixedAssetsMovement extends Component { ...@@ -591,18 +591,34 @@ 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) => { const handleTotal = (tableMeta) => {
let total = 0 let total = 0
// if (tableMeta.rowData[5] == 'Beginning balance') { // if (tableMeta.rowData[5] == 'Beginning balance') {
// console.log(tableMeta.rowData) // console.log(tableMeta.rowData)
// } // }
dataTable2[tableMeta.rowIndex].map((item, index) => { if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'ending balance') {
if (index >= 7 && index <= 18) { total = dataTable2[tableMeta.rowIndex][18].value
let valItem = item.value == undefined ? item == undefined || item == "" ? 0 : item : item.value == "" ? 0 : item.value dataTable2[tableMeta.rowIndex][19] = total
total += Number(valItem) } else if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
} total = dataTable2[tableMeta.rowIndex][7].value
}) dataTable2[tableMeta.rowIndex][19] = total
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
total += Number(valItem)
}
})
dataTable2[tableMeta.rowIndex][19] = total
}
return total return total
// console.log(total); // console.log(total);
} }
...@@ -799,7 +815,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -799,7 +815,7 @@ export default class FixedAssetsMovement extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{tableMeta.rowData[0] === 4 ? {tableMeta.rowData[0] === 4 || tableMeta.rowData[0] === 1?
null null
: :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
...@@ -1984,18 +2000,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -1984,18 +2000,8 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(value).toFixed(1)} value={Number(handleForecast(tableMeta)).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)}
/>
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
// value === "" ? // value === "" ?
......
...@@ -2,8 +2,11 @@ const Constant = { ...@@ -2,8 +2,11 @@ const Constant = {
TOKEN: null, TOKEN: null,
USER: 0, USER: 0,
EMAIL: 'TOKEN', 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; 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