Commit 7d7aba89 authored by d.arizona's avatar d.arizona

apddd

parent b34c9bfc
...@@ -476,6 +476,10 @@ export default class FixedAssetsMovement extends Component { ...@@ -476,6 +476,10 @@ export default class FixedAssetsMovement extends Component {
} }
}) })
// if (tableMeta.columnIndex == 18) {
// console.log(splitFormula)
// console.log(baru)
// }
// console.log(baru) // console.log(baru)
baru.map((item,index) => { baru.map((item,index) => {
if (item == '-' || item == '+' || item == '/' || item == '*') { if (item == '-' || item == '+' || item == '/' || item == '*') {
...@@ -490,7 +494,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -490,7 +494,7 @@ export default class FixedAssetsMovement extends Component {
let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period) let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
// console.log(indexID) // console.log(indexID)
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = tableMeta.rowData[18].formula[indexID].value let valuezz = tableMeta.rowData[data].formula[indexID].value
// baru.push(valuezz) // baru.push(valuezz)
anjay.push(valuezz == ""? 0 : valuezz) anjay.push(valuezz == ""? 0 : valuezz)
// console.log(valuezz) // console.log(valuezz)
...@@ -544,9 +548,11 @@ export default class FixedAssetsMovement extends Component { ...@@ -544,9 +548,11 @@ export default class FixedAssetsMovement extends Component {
}) })
// console.log(dataTable2[tableMeta.rowIndex][22]) // console.log(dataTable2[tableMeta.rowIndex][22])
// console.log(tableMeta.rowData[5]) // console.log(tableMeta.rowData[5])
// if (tableMeta.rowData[5] == 'Beginning Balance') {
// console.log(baru) // console.log(baru)
// console.log(anjay) // console.log(anjay)
// console.log(total) // console.log(total)
// }
if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value == undefined) { if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value == undefined) {
// console.log([tableMeta.rowIndex][tableMeta.columnIndex]) // console.log([tableMeta.rowIndex][tableMeta.columnIndex])
...@@ -576,9 +582,12 @@ export default class FixedAssetsMovement extends Component { ...@@ -576,9 +582,12 @@ export default class FixedAssetsMovement extends Component {
} }
const handleTotal = (tableMeta) => { const handleTotal = (tableMeta) => {
let total = 0 let total = 0
// if (tableMeta.rowData[5] == 'Beginning balance') {
// console.log(tableMeta.rowData)
// }
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 == undefined || item == "" ? 0 : item let valItem = item.value == undefined? item == undefined || item == "" ? 0 : item : item.value == "" ? 0 : item.value
total += Number(valItem) total += Number(valItem)
} }
}) })
...@@ -1837,7 +1846,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1837,7 +1846,7 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleFormula(value, tableMeta, 12)).toFixed(1)} value={Number(handleValueFormula(value, tableMeta)).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
...@@ -1964,19 +1973,18 @@ export default class FixedAssetsMovement extends Component { ...@@ -1964,19 +1973,18 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleFormula(value, tableMeta, 12)).toFixed(1)} value={Number(value).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
// <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={handleFormula(value, tableMeta)} value={Number(value).toFixed(1)}
// /> />
null
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
// value === "" ? // value === "" ?
...@@ -2053,19 +2061,18 @@ export default class FixedAssetsMovement extends Component { ...@@ -2053,19 +2061,18 @@ export default class FixedAssetsMovement extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleFormula(value, tableMeta, 12)).toFixed(1)} value={Number(value).toFixed(1)}
/> />
: :
tableMeta.rowData[0] === 5 ? tableMeta.rowData[0] === 5 ?
// <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={handleFormula(value, tableMeta)} value={Number(value).toFixed(1)}
// /> />
null
: :
tableMeta.rowData[0] === 1 ? tableMeta.rowData[0] === 1 ?
// value === "" ? // value === "" ?
......
...@@ -754,10 +754,10 @@ export default class TaxPlanning extends Component { ...@@ -754,10 +754,10 @@ export default class TaxPlanning extends Component {
let tst = String(item).replace('[M-1]', '') let tst = String(item).replace('[M-1]', '')
let data = tableMeta.columnIndex == 9 ? 20 : tableMeta.columnIndex - 1 let data = tableMeta.columnIndex == 9 ? 20 : tableMeta.columnIndex - 1
let dataSub = dex == 1 ? tableMeta.rowData[data].tbc : dex == 2 ? tableMeta.rowData[data].fcp : tableMeta.rowData[data].tbf let dataSub = dex == 1 ? tableMeta.rowData[data].tbc : dex == 2 ? tableMeta.rowData[data].fcp : tableMeta.rowData[data].tbf
let period = data == 18 ? Number(this.props.periode) - 1 : this.props.periode let period = data == 20 ? Number(this.props.periode) - 1 : this.props.periode
let indexID = dataSub.formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period) let indexID = dataSub.formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = tableMeta.rowData[18].formula[indexID].value let valuezz = tableMeta.rowData[data].formula[indexID].value
anjay.push(valuezz == "" ? 0 : valuezz) anjay.push(valuezz == "" ? 0 : valuezz)
} }
} else { } else {
......
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