Commit d00492c1 authored by Riri Novita's avatar Riri Novita

dah

parent e833bebb
......@@ -427,7 +427,7 @@ export default class CashFlowMR extends Component {
<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' }}>Period : {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.month.month_value} {this.props.periode} (rev.{this.props.revision})</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ width: '50%' }}>
......
......@@ -255,9 +255,27 @@ export default class ProfitLossMR extends Component {
}
}
})
this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true })
this.setState({ dataTable, loading: false, buttonError: true, saveDraft: true, bebas: true })
}
console.log(dataTable);
let err = false
dataTable.map((item, index) => {
if (item[19] == "" && Number(item[14]) < this.state.minValue || Number(item[14]) > this.state.maxValue) {
err = true
}
if (item[20] == "" && Number(item[16]) < this.state.minValue || Number(item[16]) > this.state.maxValue) {
err = true
}
if (item[21] == "" && Number(item[18]) < this.state.minValue || Number(item[18]) > this.state.maxValue) {
err = true
}
})
if (err === true) {
this.setState({ bebas: true })
}
})
}
......@@ -524,17 +542,17 @@ export default class ProfitLossMR extends Component {
"mtd_vs_rb": i[21]
})
})
// console.log(JSON.stringify(data));
console.log(data);
data.map(i => {
if (i.mtd_vs_previous_month === "" && (Number(i.percent_act_vs_previous_month) < this.state.minValue || Number(i.percent_act_vs_previous_month) > this.state.maxValue)) {
console.log('msk 1');
console.log(i);
// console.log('msk 1');
// console.log(i);
err = true
} else if (i.mtd_vs_mb === "" && (Number(i.percent_act_vs_mb) < this.state.minValue || Number(i.percent_act_vs_mb) > this.state.maxValue)) {
console.log('msk 2');
// console.log('msk 2');
err = true
} else if (i.mtd_vs_rb === "" && (Number(i.percent_act_vs_rb) < this.state.minValue || Number(i.percent_act_vs_rb) > this.state.maxValue)) {
console.log('msk 3');
// console.log('msk 3');
err = true
}
})
......@@ -608,7 +626,7 @@ export default class ProfitLossMR extends Component {
const handleText = (value, tableMeta, type) => {
// dataTable2[tableMeta.rowIndex][type] = value
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex + type] = value
console.log(dataTable2);
// console.log(dataTable2);
// console.log(dataTable2[tableMeta.rowIndex]);
}
const handleChange = (value, tableMeta, type) => {
......@@ -1602,7 +1620,7 @@ export default class ProfitLossMR extends Component {
type="text"
placeholder=""
disabled={false}
value={tableMeta.rowData[19]}
// value={tableMeta.rowData[19]}
defaultValue={tableMeta.rowData[19]}
inputProps={{
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