Commit 3243f5e9 authored by Riri Novita's avatar Riri Novita

Merge branch 'riri' into 'master'

ropl

See merge request !1251
parents fe33d0dd 90515b1d
...@@ -279,7 +279,6 @@ export default class ProfitLossRO extends Component { ...@@ -279,7 +279,6 @@ export default class ProfitLossRO extends Component {
} }
const handleValue = (value, data) => { const handleValue = (value, data) => {
console.log(data);
let total = 0 let total = 0
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
if (data.rowData[1] == item[2]) { if (data.rowData[1] == item[2]) {
...@@ -523,8 +522,8 @@ export default class ProfitLossRO extends Component { ...@@ -523,8 +522,8 @@ export default class ProfitLossRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(val).toFixed(1)} // value={Number(val).toFixed(1)}
// value={Number(handleValue(tableMeta, 0)).toFixed(1)} value={Number(handleValue(val, tableMeta)).toFixed(1)}
/> />
</span> </span>
: :
...@@ -548,7 +547,8 @@ export default class ProfitLossRO extends Component { ...@@ -548,7 +547,8 @@ export default class ProfitLossRO extends Component {
/> />
} }
/> />
</div> : </div>
:
tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ? tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -561,11 +561,12 @@ export default class ProfitLossRO extends Component { ...@@ -561,11 +561,12 @@ export default class ProfitLossRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleFormula(tableMeta, 6)).toFixed(1)} value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/> />
} }
/> />
</div> : </div>
:
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
...@@ -611,22 +612,75 @@ export default class ProfitLossRO extends Component { ...@@ -611,22 +612,75 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
} </div>
/> :
</div> tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
...@@ -656,22 +710,75 @@ export default class ProfitLossRO extends Component { ...@@ -656,22 +710,75 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
} </div>
/> :
</div> tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
...@@ -701,22 +808,75 @@ export default class ProfitLossRO extends Component { ...@@ -701,22 +808,75 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
} </div>
/> :
</div> tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
...@@ -746,29 +906,82 @@ export default class ProfitLossRO extends Component { ...@@ -746,29 +906,82 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
} </div>
/> :
</div> tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
} <div style={{ flex: 1 }}>
</div> <FormControlLabel
) style={{ margin: 0 }}
} value={val}
} control={
}, { <NumberFormat
name: `May ${this.props.periode}`, thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
}
</div>
)
}
}
}, {
name: `May ${this.props.periode}`,
options: { options: {
customHeadRender: (columnMeta) => ( customHeadRender: (columnMeta) => (
<TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}> <TableCell style={{ ...style2, top: 0, zIndex: 99, backgroundColor: '#1c71b8', width: 96, borderRight: '1px #fff solid' }}>
...@@ -791,22 +1004,75 @@ export default class ProfitLossRO extends Component { ...@@ -791,22 +1004,75 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
} </div>
/> :
</div> tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
...@@ -836,22 +1102,75 @@ export default class ProfitLossRO extends Component { ...@@ -836,22 +1102,75 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
} </div>
/> :
</div> tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
...@@ -881,22 +1200,75 @@ export default class ProfitLossRO extends Component { ...@@ -881,22 +1200,75 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
} </div>
/> :
</div> tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
...@@ -926,22 +1298,75 @@ export default class ProfitLossRO extends Component { ...@@ -926,22 +1298,75 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
/> :
} tableMeta.rowData[0] === 3 ?
/> <div style={{ flex: 1 }}>
</div> <FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/>
</div>
:
tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
...@@ -971,22 +1396,75 @@ export default class ProfitLossRO extends Component { ...@@ -971,22 +1396,75 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
} </div>
/> :
</div> tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
...@@ -1016,22 +1494,75 @@ export default class ProfitLossRO extends Component { ...@@ -1016,22 +1494,75 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
} </div>
/> :
</div> tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
...@@ -1061,22 +1592,75 @@ export default class ProfitLossRO extends Component { ...@@ -1061,22 +1592,75 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
} </div>
/> :
</div> tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
...@@ -1106,22 +1690,75 @@ export default class ProfitLossRO extends Component { ...@@ -1106,22 +1690,75 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
} </div>
/> :
</div> tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</div>
} }
</div> </div>
) )
...@@ -1151,22 +1788,75 @@ export default class ProfitLossRO extends Component { ...@@ -1151,22 +1788,75 @@ export default class ProfitLossRO extends Component {
value={Number(val).toFixed(1)} value={Number(val).toFixed(1)}
/> />
: :
<div style={{ flex: 1 }}> tableMeta.rowData[0] === 2 ?
<FormControlLabel <span style={{ fontSize: 12, textAlign: 'right' }}>
style={{ margin: 0 }} <NumberFormat
value={val} thousandSeparator={true}
control={ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
<NumberFormat type="text"
thousandSeparator={true} placeholder=""
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} disabled={true}
type="text" // value={Number(val).toFixed(1)}
placeholder="" value={Number(handleValue(val, tableMeta)).toFixed(1)}
disabled={true} />
value={Number(val).toFixed(1)} </span>
:
tableMeta.rowData[0] === 3 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={false}
value={Number(val).toFixed(1)}
onBlur={(event) => {
handleChange(event.target.value, tableMeta)
}}
/>
}
/> />
} </div>
/> :
</div> tableMeta.rowData[0] === 5 || tableMeta.rowData[0] === 6 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(handleFormula(val, tableMeta, 1)).toFixed(1)}
/>
}
/>
</div>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={val}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={Number(val).toFixed(1)}
/>
}
/>
</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