Commit f694c608 authored by d.arizona's avatar d.arizona

update

parent 7f33f985
......@@ -276,10 +276,12 @@ export default class SubHolding extends Component {
// console.log(data)
// console.log(yearNow)
// console.log(periode)
let index = data.sort((a, b) => a - b).findIndex((val) => val.periode == (String(this.state.report.label).toLocaleLowerCase().includes('summary') ? yearNow : periode))
// console.log(index)
this.setState({periode: data[index]})
if (String(this.state.report.label).toLocaleLowerCase().includes('summary')) {
let index = data.sort((a, b) => a - b).findIndex((val) => val.periode == yearNow)
// console.log(index)
this.setState({periode: data[index]})
}
let payload = {
"company_id": this.state.company.company_id,
"periode": this.state.periode.periode,
......
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