Commit 48e3f306 authored by Deni Rinaldi's avatar Deni Rinaldi

Merge branch 'deni-dev(pc)' into 'master'

fix pl

See merge request !284
parents b6c52c49 022a9d82
......@@ -73,7 +73,7 @@ export default class ProfitLoss extends Component {
item.formula,
item.level,
item.description,
item.profit_loss.notes,
item.profit_loss.notes === "" ? null : item.profit_loss.notes,
item.profit_loss.total_actual_before,
item.profit_loss.january,
item.profit_loss.february,
......@@ -101,7 +101,7 @@ export default class ProfitLoss extends Component {
i.formula,
i.level,
i.description,
i.profit_loss.notes,
i.profit_loss.notes === "" ? null : item.profit_loss.notes,
i.profit_loss.total_actual_before,
i.profit_loss.january,
i.profit_loss.february,
......@@ -128,7 +128,7 @@ export default class ProfitLoss extends Component {
val.formula,
val.level,
val.description,
val.profit_loss.notes,
val.profit_loss.notes === "" ? null : item.profit_loss.notes,
val.profit_loss.total_actual_before,
val.profit_loss.january,
val.profit_loss.february,
......@@ -155,7 +155,7 @@ export default class ProfitLoss extends Component {
items.formula,
items.level,
items.description,
items.profit_loss.notes,
items.profit_loss.notes === "" ? null : item.profit_loss.notes,
items.profit_loss.total_actual_before,
items.profit_loss.january,
items.profit_loss.february,
......@@ -182,7 +182,7 @@ export default class ProfitLoss extends Component {
itemss.formula,
itemss.level,
itemss.description,
itemss.profit_loss.notes,
itemss.profit_loss.notes === "" ? null : item.profit_loss.notes,
itemss.profit_loss.total_actual_before,
itemss.profit_loss.january,
itemss.profit_loss.february,
......@@ -209,7 +209,7 @@ export default class ProfitLoss extends Component {
item1.formula,
item1.level,
item1.description,
item1.profit_loss.notes,
item1.profit_loss.notes === "" ? null : item.profit_loss.notes,
item1.profit_loss.total_actual_before,
item1.profit_loss.january,
item1.profit_loss.february,
......@@ -236,7 +236,7 @@ export default class ProfitLoss extends Component {
item2.formula,
item2.level,
item2.description,
item2.profit_loss.notes,
item2.profit_loss.notes === "" ? null : item.profit_loss.notes,
item2.profit_loss.total_actual_before,
item2.profit_loss.january,
item2.profit_loss.february,
......@@ -263,7 +263,7 @@ export default class ProfitLoss extends Component {
item3.formula,
item3.level,
item3.description,
item3.profit_loss.notes,
item3.profit_loss.notes === "" ? null : item.profit_loss.notes,
item3.profit_loss.total_actual_before,
item3.profit_loss.january,
item3.profit_loss.february,
......@@ -290,7 +290,7 @@ export default class ProfitLoss extends Component {
item4.formula,
item4.level,
item4.description,
item4.profit_loss.notes,
item4.profit_loss.notes === "" ? null : item.profit_loss.notes,
item4.profit_loss.total_actual_before,
item4.profit_loss.january,
item4.profit_loss.february,
......@@ -317,7 +317,7 @@ export default class ProfitLoss extends Component {
item5.formula,
item5.level,
item5.description,
item5.profit_loss.notes,
item5.profit_loss.notes === "" ? null : item.profit_loss.notes,
item5.profit_loss.total_actual_before,
item5.profit_loss.january,
item5.profit_loss.february,
......@@ -344,7 +344,7 @@ export default class ProfitLoss extends Component {
item6.formula,
item6.level,
item6.description,
item6.profit_loss.notes,
item6.profit_loss.notes === "" ? null : item.profit_loss.notes,
item6.profit_loss.total_actual_before,
item6.profit_loss.january,
item6.profit_loss.february,
......@@ -370,7 +370,7 @@ export default class ProfitLoss extends Component {
item6.formula,
item6.level,
item6.description,
item6.profit_loss.notes,
item6.profit_loss.notes === "" ? null : item.profit_loss.notes,
item6.profit_loss.total_actual_before,
item6.profit_loss.january,
item6.profit_loss.february,
......@@ -398,7 +398,7 @@ export default class ProfitLoss extends Component {
item5.formula,
item5.level,
item5.description,
item5.profit_loss.notes,
item5.profit_loss.notes === "" ? null : item.profit_loss.notes,
item5.profit_loss.total_actual_before,
item5.profit_loss.january,
item5.profit_loss.february,
......@@ -426,7 +426,7 @@ export default class ProfitLoss extends Component {
item4.formula,
item4.level,
item4.description,
item4.profit_loss.notes,
item4.profit_loss.notes === "" ? null : item.profit_loss.notes,
item4.profit_loss.total_actual_before,
item4.profit_loss.january,
item4.profit_loss.february,
......@@ -454,7 +454,7 @@ export default class ProfitLoss extends Component {
item3.formula,
item3.level,
item3.description,
item3.profit_loss.notes,
item3.profit_loss.notes === "" ? null : item.profit_loss.notes,
item3.profit_loss.total_actual_before,
item3.profit_loss.january,
item3.profit_loss.february,
......@@ -482,7 +482,7 @@ export default class ProfitLoss extends Component {
item2.formula,
item2.level,
item2.description,
item2.profit_loss.notes,
item2.profit_loss.notes === "" ? null : item.profit_loss.notes,
item2.profit_loss.total_actual_before,
item2.profit_loss.january,
item2.profit_loss.february,
......@@ -510,7 +510,7 @@ export default class ProfitLoss extends Component {
item1.formula,
item1.level,
item1.description,
item1.profit_loss.notes,
item1.profit_loss.notes === "" ? null : item.profit_loss.notes,
item1.profit_loss.total_actual_before,
item1.profit_loss.january,
item1.profit_loss.february,
......@@ -538,7 +538,7 @@ export default class ProfitLoss extends Component {
itemss.formula,
itemss.level,
itemss.description,
itemss.profit_loss.notes,
itemss.profit_loss.notes === "" ? null : item.profit_loss.notes,
itemss.profit_loss.total_actual_before,
itemss.profit_loss.january,
itemss.profit_loss.february,
......@@ -566,7 +566,7 @@ export default class ProfitLoss extends Component {
items.formula,
items.level,
items.description,
items.profit_loss.notes,
items.profit_loss.notes === "" ? null : item.profit_loss.notes,
items.profit_loss.total_actual_before,
items.profit_loss.january,
items.profit_loss.february,
......@@ -594,7 +594,7 @@ export default class ProfitLoss extends Component {
val.formula,
val.level,
val.description,
val.profit_loss.notes,
val.profit_loss.notes === "" ? null : item.profit_loss.notes,
val.profit_loss.total_actual_before,
val.profit_loss.january,
val.profit_loss.february,
......@@ -622,7 +622,7 @@ export default class ProfitLoss extends Component {
i.formula,
i.level,
i.description,
i.profit_loss.notes,
i.profit_loss.notes === "" ? null : item.profit_loss.notes,
i.profit_loss.total_actual_before,
i.profit_loss.january,
i.profit_loss.february,
......@@ -649,7 +649,7 @@ export default class ProfitLoss extends Component {
i.formula,
i.level,
i.description,
i.profit_loss.notes,
i.profit_loss.notes === "" ? null : item.profit_loss.notes,
i.profit_loss.total_actual_before,
i.profit_loss.january,
i.profit_loss.february,
......@@ -677,7 +677,7 @@ export default class ProfitLoss extends Component {
item.formula,
item.level,
item.description,
item.profit_loss.notes,
item.profit_loss.notes === "" ? null : item.profit_loss.notes,
item.profit_loss.total_actual_before,
item.profit_loss.january,
item.profit_loss.february,
......@@ -698,7 +698,7 @@ export default class ProfitLoss extends Component {
}
})
// console.log(dataTable);
this.setState({ dataTable, loading: false })
this.setState({ loading: false, dataTable })
}
} else {
this.setState({ loading: false })
......@@ -794,14 +794,11 @@ export default class ProfitLoss extends Component {
}
const handleNotes = (value, tableMeta) => {
let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2])
if (indexParent > 0) {
// console.log(indexParent)
console.log(value)
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value
}
console.log(dataTable2[tableMeta.rowIndex]);
}
const handleValue = (data) => {
let total = 0
dataTable2.map((item, index) => {
......@@ -875,7 +872,7 @@ export default class ProfitLoss extends Component {
return (
<div style={{ textAlign: 'right' }}>
<div style={{ flex: 1 }}>
{tableMeta.rowData[4] !== 0 || tableMeta.rowData[4] !== 1 ?
{tableMeta.rowData[4] === 0 ? null : tableMeta.rowData[4] === 1 ? null :
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -893,7 +890,7 @@ export default class ProfitLoss extends Component {
}}
/>
}
/> : null}
/>}
</div>
</div>
)
......@@ -2210,7 +2207,7 @@ export default class ProfitLoss extends Component {
</div>
</Paper>
</div>
</div>
</div >
);
}
}
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