Commit 1c09e297 authored by rifkaki's avatar rifkaki

ngisue tp

parent 9db201f5
...@@ -882,7 +882,22 @@ export default class TaxPlanningMR extends Component { ...@@ -882,7 +882,22 @@ export default class TaxPlanningMR extends Component {
{tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1 ? {tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1 ?
null : null :
this.state.get_for == 'view'? this.state.get_for == 'view'?
Number(value.tbc).toFixed(1) <div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value.tbc}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value.tbc).toFixed(2) : Number(value.tbc).toFixed(1)}
/>
}
/>
</div>
: :
tableMeta.rowData[1] === 2 ? tableMeta.rowData[1] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
...@@ -947,7 +962,22 @@ export default class TaxPlanningMR extends Component { ...@@ -947,7 +962,22 @@ export default class TaxPlanningMR extends Component {
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
Number(value.fcp).toFixed(1) <div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value.fcp}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value.fcp).toFixed(2) : Number(value.fcp).toFixed(1)}
/>
}
/>
</div>
: :
tableMeta.rowData[2] === 2 ? tableMeta.rowData[2] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
...@@ -1010,7 +1040,22 @@ export default class TaxPlanningMR extends Component { ...@@ -1010,7 +1040,22 @@ export default class TaxPlanningMR extends Component {
{tableMeta.rowData[3] === 4 || tableMeta.rowData[3] === 1 ? {tableMeta.rowData[3] === 4 || tableMeta.rowData[3] === 1 ?
null : null :
this.state.get_for == 'view'? this.state.get_for == 'view'?
Number(value.tbf).toFixed(1) <div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value.tbf}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value.tbf).toFixed(2) : Number(value.tbf).toFixed(1)}
/>
}
/>
</div>
: :
tableMeta.rowData[3] === 2 ? tableMeta.rowData[3] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
...@@ -1140,7 +1185,22 @@ export default class TaxPlanningMR extends Component { ...@@ -1140,7 +1185,22 @@ export default class TaxPlanningMR extends Component {
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
Number(value).toFixed(1) <div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value).toFixed(2) : Number(value).toFixed(1)}
/>
}
/>
</div>
: :
tableMeta.rowData[3] === 2 ? tableMeta.rowData[3] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
...@@ -1233,11 +1293,27 @@ export default class TaxPlanningMR extends Component { ...@@ -1233,11 +1293,27 @@ 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'?
Number(value).toFixed(1) // Number(value).toFixed(1)
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value).toFixed(2) : Number(value).toFixed(1)}
/>
}
/>
</div>
: :
tableMeta.rowData[3] === 2 ? tableMeta.rowData[3] === 2 ?
<span style={{ fontSize: 12, textAlign: 'right' }}> <span style={{ fontSize: 12, textAlign: 'right' }}>
...@@ -1251,62 +1327,22 @@ export default class TaxPlanningMR extends Component { ...@@ -1251,62 +1327,22 @@ export default class TaxPlanningMR extends Component {
/> />
</span> </span>
: :
tableMeta.rowData[3] === 7 ? <div style={{ flex: 1 }}>
// (Number(handleValueFormula(value, tableMeta, 3)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(value, tableMeta, 3)).toFixed(1) <= Number(this.state.maxValue)) ? <FormControlLabel
(Number(value).toFixed(1) >= Number(this.state.minValue) && Number(value).toFixed(1) <= Number(this.state.maxValue)) ? style={{ margin: 0 }}
<NumberFormat value={value}
thousandSeparator={true} control={
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 <NumberFormat
thousandSeparator={true} thousandSeparator={true}
style={{ style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
fontSize: 12,
textAlign: 'right',
borderColor: 'transparent',
margin: 0,
width: 96,
backgroundColor: 'transparent',
color: 'red'
}}
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 4)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value).toFixed(2) : Number(value).toFixed(1)}
value={Number(value).toFixed(1)}
/>
</LightTooltip>
:
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value).toFixed(2) : Number(value).toFixed(1)}
/>
}
/> />
</div> }
/>
</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