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 {
checkUpload() {
api.create().checkUploadMonthlyReportTP(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload));
// console.log(this.state.payload)
// console.log(response)
console.log(this.state.payload)
console.log(response)
if (response.data) {
if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleTP: false, loading: true })
......@@ -448,7 +448,7 @@ export default class TaxPlanningMR extends Component {
})
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
editAble = true
} else {
......@@ -1207,7 +1207,7 @@ export default class TaxPlanningMR extends Component {
customBodyRender: (value, tableMeta, updateValue) => {
return (
<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
:
this.state.get_for == 'view'?
......@@ -1240,46 +1240,46 @@ export default class TaxPlanningMR extends Component {
/>
</span>
:
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(value).toFixed(1) >= Number(this.state.minValue) && Number(value).toFixed(1) <= Number(this.state.maxValue)) ?
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'black'
}}
type="text"
placeholder=""
disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 3)).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>
<NumberFormat
thousandSeparator={true}
style={{
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text"
placeholder=""
disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
value={Number(value).toFixed(1)}
/>
</LightTooltip>
:
// 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(value).toFixed(1) >= Number(this.state.minValue) && Number(value).toFixed(1) <= Number(this.state.maxValue)) ?
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'black'
// }}
// type="text"
// placeholder=""
// disabled={true}
// // value={Number(handleValueFormula(value, tableMeta, 3)).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>
// <NumberFormat
// thousandSeparator={true}
// style={{
// fontSize: 12,
// textAlign: 'right',
// borderColor: 'transparent',
// margin: 0,
// width: 96,
// backgroundColor: 'transparent',
// color: 'red'
// }}
// type="text"
// placeholder=""
// disabled={true}
// // value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)}
// value={Number(value).toFixed(1)}
// />
// </LightTooltip>
// :
<div style={{ flex: 1 }}>
<FormControlLabel
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