Commit 626f8d81 authored by Riri Novita's avatar Riri Novita

olpa

parent a2c2d7a6
......@@ -327,7 +327,7 @@ export default class ProfitLossOLPA extends Component {
fileHandler = (event) => {
let fileObj = event
ExcelRenderer(fileObj, (err, resp) => {
// console.log(resp)
console.log(resp)
if (err) {
console.log(err);
}
......@@ -355,7 +355,9 @@ export default class ProfitLossOLPA extends Component {
october: i[13] === undefined ? "0" : reg.test(String(i[13])) === false ? "0" : String(i[13]).trim(),
november: i[14] === undefined ? "0" : reg.test(String(i[14])) === false ? "0" : String(i[14]).trim(),
december: i[15] === undefined ? "0" : reg.test(String(i[15])) === false ? "0" : String(i[15]).trim(),
total_current_year: i[16] === undefined ? "0" : reg.test(String(i[16])) === false ? "0" : String(i[16]).trim()
total_current_year: i[16] === undefined ? "0" : reg.test(String(i[16])) === false ? "0" : String(i[16]).trim(),
ytd_october: i[17] === undefined ? "0" : reg.test(String(i[17])) === false ? "0" : String(i[17]).trim(),
nov_dec: i[18] === undefined ? "0" : reg.test(String(i[18])) === false ? "0" : String(i[18]).trim()
})
}
})
......@@ -401,13 +403,15 @@ export default class ProfitLossOLPA extends Component {
item.november,
item.december,
item.total_current_year,
item.ytd_october,
item.nov_dec,
item.orders,
item.error
]
})
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
this.state.dataTable.map(item => {
if (item[21].length > 0) {
if (item[23].length > 0) {
console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true })
}
......@@ -438,7 +442,9 @@ export default class ProfitLossOLPA extends Component {
october: String(Number(i[17]).toFixed(1)),
november: String(Number(i[18]).toFixed(1)),
december: String(Number(i[19]).toFixed(1)),
total_current_year: String(Number(i[20]).toFixed(1))
total_current_year: String(Number(i[20]).toFixed(1)),
ytd_october: String(Number(i[21]).toFixed(1)),
nov_dec: String(Number(i[22]).toFixed(1))
})
})
let body = {
......@@ -1720,6 +1726,16 @@ export default class ProfitLossOLPA extends Component {
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}, {
name: "",
options: {
display: false
}
}
]
......
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