Commit 85a8846d authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'didam' into 'master'

apdet

See merge request !533
parents b315698d 642294f6
...@@ -591,11 +591,26 @@ export default class FixedAssetsMovement extends Component { ...@@ -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) => { 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)
// } // }
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) => { dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index >= 7 && index <= 18) { if (index >= 7 && index <= 18) {
let valItem = item.value == undefined ? item == undefined || item == "" ? 0 : item : item.value == "" ? 0 : item.value 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 { ...@@ -603,6 +618,7 @@ export default class FixedAssetsMovement extends Component {
} }
}) })
dataTable2[tableMeta.rowIndex][19] = total 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,17 +2000,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1984,17 +2000,7 @@ 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 ?
......
...@@ -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