Commit 3caa93ad authored by Rifka Kurnia's avatar Rifka Kurnia

Merge branch 'rifka' into 'master'

hapus control di actual ytd

See merge request !907
parents c943395d b55d3543
...@@ -340,8 +340,8 @@ export default class TaxPlanningMR extends Component { ...@@ -340,8 +340,8 @@ export default class TaxPlanningMR extends Component {
checkUpload() { checkUpload() {
api.create().checkUploadMonthlyReportTP(this.state.payload).then(response => { api.create().checkUploadMonthlyReportTP(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload)); // console.log(JSON.stringify(this.state.payload));
// console.log(this.state.payload) console.log(this.state.payload)
// console.log(response) console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleTP: false, loading: true }) this.setState({ visibleUpload: false, visibleTP: false, loading: true })
...@@ -448,7 +448,7 @@ export default class TaxPlanningMR extends Component { ...@@ -448,7 +448,7 @@ export default class TaxPlanningMR extends Component {
}) })
if (String(i[8]) == "Control (should be nil)") { if (String(i[8]) == "Control (should be nil)") {
if (i[9].tbf < this.state.minValue || i[9].tbf > this.state.maxValue || i[10] < this.state.minValue || i[10] > this.state.maxValue) { if (i[9].tbf < this.state.minValue || i[9].tbf > this.state.maxValue) {
errorContrl = true errorContrl = true
editAble = true editAble = true
} else { } else {
...@@ -1207,7 +1207,7 @@ export default class TaxPlanningMR extends Component { ...@@ -1207,7 +1207,7 @@ export default class TaxPlanningMR extends Component {
customBodyRender: (value, tableMeta, updateValue) => { customBodyRender: (value, tableMeta, updateValue) => {
return ( return (
<div style={{ textAlign: 'right', width: 90 }}> <div style={{ textAlign: 'right', width: 90 }}>
{tableMeta.rowData[3] === 4 || tableMeta.rowData[3] === 1 ? {tableMeta.rowData[3] === 4 || tableMeta.rowData[3] === 1 || tableMeta.rowData[3] === 7?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -1240,46 +1240,46 @@ export default class TaxPlanningMR extends Component { ...@@ -1240,46 +1240,46 @@ export default class TaxPlanningMR extends Component {
/> />
</span> </span>
: :
tableMeta.rowData[3] === 7 ? // tableMeta.rowData[3] === 7 ?
(Number(handleValueFormula(value, tableMeta, 4)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(value, tableMeta, 4)).toFixed(1) <= Number(this.state.maxValue)) ? // (Number(handleValueFormula(value, tableMeta, 4)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(value, tableMeta, 4)).toFixed(1) <= Number(this.state.maxValue)) ?
// (Number(value).toFixed(1) >= Number(this.state.minValue) && Number(value).toFixed(1) <= Number(this.state.maxValue)) ? // // (Number(value).toFixed(1) >= Number(this.state.minValue) && Number(value).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ // style={{
fontSize: 12, // fontSize: 12,
textAlign: 'right', // textAlign: 'right',
borderColor: 'transparent', // borderColor: 'transparent',
margin: 0, // margin: 0,
width: 96, // width: 96,
backgroundColor: 'transparent', // backgroundColor: 'transparent',
color: 'black' // color: 'black'
}} // }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} // // value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
value={Number(value).toFixed(1)} // value={Number(value).toFixed(1)}
/> : // /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[14].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> // <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[14].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat // <NumberFormat
thousandSeparator={true} // thousandSeparator={true}
style={{ // style={{
fontSize: 12, // fontSize: 12,
textAlign: 'right', // textAlign: 'right',
borderColor: 'transparent', // borderColor: 'transparent',
margin: 0, // margin: 0,
width: 96, // width: 96,
backgroundColor: 'transparent', // backgroundColor: 'transparent',
color: 'red' // color: 'red'
}} // }}
type="text" // type="text"
placeholder="" // placeholder=""
disabled={true} // disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)} // // value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
value={Number(value).toFixed(1)} // value={Number(value).toFixed(1)}
/> // />
</LightTooltip> // </LightTooltip>
: // :
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
style={{ margin: 0 }} style={{ margin: 0 }}
......
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