Commit 4faf9bbd authored by Deni Rinaldi's avatar Deni Rinaldi

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

PL

See merge request !281
parents 04b283c5 b90c9b5c
......@@ -697,7 +697,7 @@ export default class ProfitLoss extends Component {
])
}
})
console.log(dataTable);
// console.log(dataTable);
this.setState({ dataTable, loading: false })
}
} else {
......@@ -792,6 +792,16 @@ export default class ProfitLoss extends Component {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
}
}
const handleNotes = (value, tableMeta) => {
let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2])
if (indexParent > 0) {
// console.log(indexParent)
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value
} else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value
}
}
const handleValue = (data) => {
let total = 0
dataTable2.map((item, index) => {
......@@ -865,6 +875,7 @@ export default class ProfitLoss extends Component {
return (
<div style={{ textAlign: 'right' }}>
<div style={{ flex: 1 }}>
{tableMeta.rowData[4] !== 0 || tableMeta.rowData[4] !== 1 ?
<FormControlLabel
style={{ margin: 0 }}
value={value}
......@@ -877,12 +888,12 @@ export default class ProfitLoss extends Component {
value={value}
onBlur={(event) => {
// updateValue(event.target.value)
handleChange(event.target.value, tableMeta)
handleNotes(event.target.value, tableMeta)
console.log(dataTable2)
}}
/>
}
/>
/> : null}
</div>
</div>
)
......@@ -2065,14 +2076,14 @@ export default class ProfitLoss extends Component {
<Typography style={{ fontSize: '12px', color: '#4b4b4b', margin: 10 }}>Budget Tahunan - Profit & Loss</Typography>
</div>
<div style={{ padding: 20 }}>
<div style={{ display: 'flex', justifyContent: 'space-between'}}>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Periode : {this.props.periode}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%'}}>
<div style={{justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<div style={{ width: '50%' }}>
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
<a data-tip={'Download Template'} data-for="template">
<button
style={{
......
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