Commit 60a89358 authored by Rifka Kurnia Irfiana's avatar Rifka Kurnia Irfiana

issue taxplan

parent fc4a97ba
......@@ -93,7 +93,7 @@ export default class TaxPlanning extends Component {
"submission_id": this.props.submissionID
}
api.create().getDetailReportMB(payload).then(response => {
console.log(payload);
// console.log(response);
let dataTable = []
if (response.data) {
let res = response.data.data
......@@ -815,12 +815,8 @@ export default class TaxPlanning extends Component {
if (dataTable2[indexID][24] == tableMeta.rowData[24]) {
anjay.push(0)
} else {
// console.log(dataTable2[indexID][tableMeta.columnIndex]);
let data = dex == 1 ? dataTable2[indexID][tableMeta.columnIndex].tbc : dex == 2 ? dataTable2[indexID][tableMeta.columnIndex].fcp : dataTable2[indexID][tableMeta.columnIndex].tbf
let valuezz = data.value == undefined ? data : data.value
// console.log(data);
// console.log(data.value);
// console.log(valuezz);
anjay.push(valuezz == "" ? 0 : valuezz)
}
......@@ -1010,23 +1006,32 @@ export default class TaxPlanning extends Component {
}
const handleTotal = (tableMeta, dex) => {
let total = 0
dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index >= 9 && index <= 20) {
if ( tableMeta.rowData[3] === 5 || tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 7 ) {
let valItem = item.tbf.value == undefined || item.tbf.value == "" || item.tbf.value == "undefined" ? 0.0 : item.tbf.value
total += Number(valItem)
} else {
if (tableMeta.rowData[8] === "Fiscal Correction positive / (negative) Year To Date"){
let totalfcp = 0
if (String(tableMeta.rowData[8]).toLowerCase() === "fiscal correction positive / (negative) year to date"){
dataTable2[tableMeta.rowIndex -2].map((item, index) => {
if (index >= 9 && index <= 20) {
if ( dataTable2[tableMeta.rowIndex -2][2] === 5 || dataTable2[tableMeta.rowIndex -2][2] === 6 || dataTable2[tableMeta.rowIndex -2][2] === 7 ) {
let valItem = item.fcp.value == undefined || item.fcp.value == "" || item.fcp.value == "undefined" ? 0.0 : item.fcp.value
total += Number(valItem)
} else {
let valItem = item.fcp == undefined || item.fcp == "" || item.fcp == "undefined" ? 0.0 : item.fcp
total += Number(valItem)
}
}
})
} else {
dataTable2[tableMeta.rowIndex].map((item, index) => {
if (index >= 9 && index <= 20) {
if ( tableMeta.rowData[3] === 5 || tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 7 ) {
let valItem = item.tbf.value == undefined || item.tbf.value == "" || item.tbf.value == "undefined" ? 0.0 : item.tbf.value
total += Number(valItem)
} else {
let valItem = item.tbf == undefined || item.tbf == "" || item.tbf == "undefined" ? 0.0 : item.tbf
total += Number(valItem)
}
}
}
})
})
}
dataTable2[tableMeta.rowIndex][21] = Number(total).toFixed(1)
return total
}
......@@ -1150,20 +1155,6 @@ export default class TaxPlanning extends Component {
let total = 0
dataTable2.map((item, index) => {
if (item[5] == tableMeta.rowData[4]) {
// if (type == 1) {
// console.log(item[tableMeta.columnIndex].tbc.value)
// console.log(item[tableMeta.columnIndex].tbc)
// } else
// if (type == 2) {
// console.log(item[tableMeta.columnIndex].fcp.value)
// console.log(item[tableMeta.columnIndex].fcp)}
// console.log(type)
// if (type == 3) {
// console.log(item[tableMeta.columnIndex].tbf.value)
// console.log(item[tableMeta.columnIndex].tbf)
// }
// console.log(item[4])
// console.log(tableMeta.rowData[5])
total += Number(type == 1 ?
item[tableMeta.columnIndex].tbc.value == undefined ? Number(item[tableMeta.columnIndex].tbc == "" || item[tableMeta.columnIndex].tbc == "0.0" ? 0 : item[tableMeta.columnIndex].tbc) : Number(item[tableMeta.columnIndex].tbc.value == "" || item[tableMeta.columnIndex].tbc.value == "0.0" ? 0 : item[tableMeta.columnIndex].tbc.value)
:
......@@ -1310,7 +1301,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 0)
// console.log(dataTable2)
// // console.log(dataTable2)
}}
/>
}
......@@ -2714,7 +2705,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 1)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
}
......@@ -3140,7 +3131,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 1)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
......@@ -3272,7 +3263,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 2)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
}
......@@ -3567,7 +3558,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 1)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
......@@ -3699,7 +3690,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 2)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
}
......@@ -3994,7 +3985,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 1)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
......@@ -4126,7 +4117,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 2)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
}
......@@ -4421,7 +4412,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 1)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
......@@ -4553,7 +4544,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 2)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
}
......@@ -4848,7 +4839,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 1)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
......@@ -4980,7 +4971,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 2)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
}
......@@ -5275,7 +5266,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 1)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
......@@ -5407,7 +5398,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 2)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
}
......@@ -5702,7 +5693,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 1)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
......@@ -5834,7 +5825,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 2)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
}
......@@ -6129,7 +6120,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 1)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
......@@ -6261,7 +6252,7 @@ export default class TaxPlanning extends Component {
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta, 2)
console.log(dataTable2)
// console.log(dataTable2)
}}
/>
}
......
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