Commit 587e96a8 authored by Riri Novita's avatar Riri Novita

bikin puyeng

parent 66de34a7
...@@ -192,7 +192,7 @@ export default class ProfitLossMR extends Component { ...@@ -192,7 +192,7 @@ export default class ProfitLossMR extends Component {
let res = response.data.data let res = response.data.data
const handlePushChild = (item) => { const handlePushChild = (item) => {
let indexIDzz = dataTable.findIndex((val) => val[1] === item.id) let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
if (item.type_report_id === 3) { if (item.type_report_id === 3 && item.level === 2) {
if (item.profit_loss.mtd_vs_previous_month == "" && Number(item.profit_loss.percent_act_vs_previous_month) < this.state.minValue || Number(item.profit_loss.percent_act_vs_previous_month) > this.state.maxValue) { if (item.profit_loss.mtd_vs_previous_month == "" && Number(item.profit_loss.percent_act_vs_previous_month) < this.state.minValue || Number(item.profit_loss.percent_act_vs_previous_month) > this.state.maxValue) {
err = true err = true
...@@ -241,7 +241,7 @@ export default class ProfitLossMR extends Component { ...@@ -241,7 +241,7 @@ export default class ProfitLossMR extends Component {
} }
} }
res.map((item, index) => { res.map((item, index) => {
if (item.type_report_id === 3) { if (item.type_report_id === 3 && item.level === 2) {
if (item.profit_loss.mtd_vs_previous_month == "" && Number(item.profit_loss.percent_act_vs_previous_month) < this.state.minValue || Number(item.profit_loss.percent_act_vs_previous_month) > this.state.maxValue) { if (item.profit_loss.mtd_vs_previous_month == "" && Number(item.profit_loss.percent_act_vs_previous_month) < this.state.minValue || Number(item.profit_loss.percent_act_vs_previous_month) > this.state.maxValue) {
err = true err = true
...@@ -551,8 +551,8 @@ export default class ProfitLossMR extends Component { ...@@ -551,8 +551,8 @@ export default class ProfitLossMR extends Component {
let data = [] let data = []
let err = false let err = false
this.state.dataTable.map((i, index) => { this.state.dataTable.map((i, index) => {
if(i[0] === 3) { if(i[0] === 3 && i[4] === 2) {
// console.log(i); console.log(i);
if ( i[19] === "" && (Number(i[14]) < this.state.minValue || Number(i[14]) > this.state.maxValue)) { if ( i[19] === "" && (Number(i[14]) < this.state.minValue || Number(i[14]) > this.state.maxValue)) {
console.log('msk 1'); console.log('msk 1');
// console.log(i); // console.log(i);
......
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