Commit 115b3b35 authored by Rifka Kurnia's avatar Rifka Kurnia

Merge branch 'rifka' into 'master'

RO : tp cf

See merge request !1342
parents 22de988c fb50741a
...@@ -17,6 +17,7 @@ import BalanceSheetRO from './RollingOutlook/BalanceSheetRO'; ...@@ -17,6 +17,7 @@ import BalanceSheetRO from './RollingOutlook/BalanceSheetRO';
import ProfitLossRO from './RollingOutlook/ProfitLossRO'; import ProfitLossRO from './RollingOutlook/ProfitLossRO';
import TaxPlanningRO from './RollingOutlook/TaxPlanningRO'; import TaxPlanningRO from './RollingOutlook/TaxPlanningRO';
import CatRevision from './RollingOutlook/CatRevision'; import CatRevision from './RollingOutlook/CatRevision';
import CashFlowRO from './RollingOutlook/CashFlowRO';
var ct = require("../library/CustomTable"); var ct = require("../library/CustomTable");
const getMuiTheme = () => createMuiTheme(ct.customTable()); const getMuiTheme = () => createMuiTheme(ct.customTable());
...@@ -41,6 +42,7 @@ export default class RollingOutlook extends Component { ...@@ -41,6 +42,7 @@ export default class RollingOutlook extends Component {
visiblePL: false, visiblePL: false,
visibleTP: false, visibleTP: false,
visibleCAT: false, visibleCAT: false,
visibleCF: false,
listAttachment: [], listAttachment: [],
visibleUpload: false, visibleUpload: false,
revisionTable: null, revisionTable: null,
...@@ -647,6 +649,7 @@ export default class RollingOutlook extends Component { ...@@ -647,6 +649,7 @@ export default class RollingOutlook extends Component {
visiblePL: false, visiblePL: false,
visibleCAT: false, visibleCAT: false,
visibleTP: false, visibleTP: false,
visibleCF: false,
}) })
} else if (item === 'Profit Loss') { } else if (item === 'Profit Loss') {
this.setState({ this.setState({
...@@ -655,6 +658,16 @@ export default class RollingOutlook extends Component { ...@@ -655,6 +658,16 @@ export default class RollingOutlook extends Component {
visiblePL: true, visiblePL: true,
visibleCAT: false, visibleCAT: false,
visibleTP: false, visibleTP: false,
visibleCF: false,
})
} else if (item === 'Cash Flow') {
this.setState({
visibleRollingOutlook: false,
visibleBS: false,
visiblePL: false,
visibleCAT: false,
visibleTP: false,
visibleCF: true,
}) })
} else if (item === 'Tax Planning') { } else if (item === 'Tax Planning') {
this.setState({ this.setState({
...@@ -663,6 +676,7 @@ export default class RollingOutlook extends Component { ...@@ -663,6 +676,7 @@ export default class RollingOutlook extends Component {
visiblePL: false, visiblePL: false,
visibleCAT: false, visibleCAT: false,
visibleTP: true, visibleTP: true,
visibleCF: false,
}) })
} else if (item === 'CAT') { } else if (item === 'CAT') {
this.setState({ this.setState({
...@@ -671,6 +685,7 @@ export default class RollingOutlook extends Component { ...@@ -671,6 +685,7 @@ export default class RollingOutlook extends Component {
visiblePL: false, visiblePL: false,
visibleCAT: true, visibleCAT: true,
visibleTP: false, visibleTP: false,
visibleCF: false,
}) })
} }
}) })
...@@ -1480,6 +1495,26 @@ export default class RollingOutlook extends Component { ...@@ -1480,6 +1495,26 @@ export default class RollingOutlook extends Component {
/> />
)} )}
{this.state.visibleCF && (
<CashFlowRO
width={this.props.width}
height={this.props.height}
open={this.props.open}
report_id={this.state.report_id}
company={this.state.company}
revision={this.state.revisionTable}
periode={this.state.periode.periode}
rollingOutlookID={this.state.rollingOutlookID}
onClickClose={() => this.setState({ visibleCF: false, visibleRollingOutlook: true })}
refresh={this.getRollingOutlookID.bind(this)}
status={this.state.status}
lastStatus={this.state.lastStatus}
quarter={this.state.quarter.value}
isApprover={this.state.isApprover}
prevRevision={this.state.isSubmit ? this.state.prevRevision : true}
/>
)}
{this.state.visibleCAT && ( {this.state.visibleCAT && (
<CatRevision <CatRevision
width={this.props.width} width={this.props.width}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -744,7 +744,7 @@ export default class TaxPlanning extends Component { ...@@ -744,7 +744,7 @@ export default class TaxPlanning extends Component {
// let data = [] // let data = []
let errorContrl = this.state.buttonError let errorContrl = this.state.buttonError
let editAble = this.state.editAble let editAble = this.state.editAble
console.log(this.state.dataTable) // console.log(this.state.dataTable)
this.state.dataTable.map((i, index) => { this.state.dataTable.map((i, index) => {
if (String(i[8]) == "Control (should be nil)") { if (String(i[8]) == "Control (should be nil)") {
this.setState({ loading: true }) this.setState({ loading: true })
...@@ -762,24 +762,6 @@ export default class TaxPlanning extends Component { ...@@ -762,24 +762,6 @@ export default class TaxPlanning extends Component {
} }
} }
}) })
// this.state.dataTable[tableMeta.rowIndex].map((i, index) => {
// if (String(i[8]) == "Control (should be nil)") {
// this.setState({ loading: true })
// let n = 0
// if (index >= 9 && index <=20) {
// if ((Number(i[index].tbf.value) < Number(this.state.minValue) || Number(i[index].tbf.value) > Number(this.state.maxValue))) {
// errorContrl = true
// editAble = true
// }
// else {
// errorContrl = false
// editAble = false
// }
// }
// }
// })
// api.create().validateSubmitReport(payload).then((response) => {
console.log(errorContrl) console.log(errorContrl)
console.log(editAble) console.log(editAble)
if (errorContrl === false && editAble === false ) { if (errorContrl === false && editAble === false ) {
...@@ -1279,105 +1261,6 @@ export default class TaxPlanning extends Component { ...@@ -1279,105 +1261,6 @@ export default class TaxPlanning extends Component {
} }
/> />
</div> </div>
// :
// tableMeta.rowData[3] === 3 ?
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value.tbf}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder="input"
// disabled={this.props.isApprover == true ? true : false}
// value={Number(value.tbf).toFixed(1)}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, 2)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
// :
// tableMeta.rowData[3] === 2 ?
// <span style={{ fontSize: 12, textAlign: 'right' }}>
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleParent(tableMeta, 3)).toFixed(1)}
// />
// </span>
// :
// tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 5 ?
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
// />
// :
// tableMeta.rowData[3] === 7 ?
// (Number(handleValueFormula(value, tableMeta, 3)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(value, tableMeta, 3)).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)}
// /> :
// <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].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, 3)).toFixed(1)}
// />
// </LightTooltip>
// :
// <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={Number(value.tbf).toFixed(1)}
// />
// }
// />
// </div>
} }
</div> </div>
</div> </div>
...@@ -1449,105 +1332,6 @@ export default class TaxPlanning extends Component { ...@@ -1449,105 +1332,6 @@ export default class TaxPlanning extends Component {
} }
/> />
</div> </div>
// :
// tableMeta.rowData[3] === 3 ?
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value.tbf}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder="input"
// disabled={this.props.isApprover == true ? true : false}
// value={Number(value.tbf).toFixed(1)}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, 2)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
// :
// tableMeta.rowData[3] === 2 ?
// <span style={{ fontSize: 12, textAlign: 'right' }}>
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleParent(tableMeta, 3)).toFixed(1)}
// />
// </span>
// :
// tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 5 ?
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
// />
// :
// tableMeta.rowData[3] === 7 ?
// (Number(handleValueFormula(value, tableMeta, 3)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(value, tableMeta, 3)).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)}
// /> :
// <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].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, 3)).toFixed(1)}
// />
// </LightTooltip>
// :
// <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={Number(value.tbf).toFixed(1)}
// />
// }
// />
// </div>
} }
</div> </div>
</div> </div>
...@@ -1619,105 +1403,6 @@ export default class TaxPlanning extends Component { ...@@ -1619,105 +1403,6 @@ export default class TaxPlanning extends Component {
} }
/> />
</div> </div>
// :
// tableMeta.rowData[3] === 3 ?
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value.tbf}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder="input"
// disabled={this.props.isApprover == true ? true : false}
// value={Number(value.tbf).toFixed(1)}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, 2)
// // console.log(dataTable2)
// }}
// />
// }
// />
// </div>
// :
// tableMeta.rowData[3] === 2 ?
// <span style={{ fontSize: 12, textAlign: 'right' }}>
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleParent(tableMeta, 3)).toFixed(1)}
// />
// </span>
// :
// tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 5 ?
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
// />
// :
// tableMeta.rowData[3] === 7 ?
// (Number(handleValueFormula(value, tableMeta, 3)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(value, tableMeta, 3)).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)}
// /> :
// <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].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, 3)).toFixed(1)}
// />
// </LightTooltip>
// :
// <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={Number(value.tbf).toFixed(1)}
// />
// }
// />
// </div>
} }
</div> </div>
</div> </div>
...@@ -2085,7 +1770,7 @@ export default class TaxPlanning extends Component { ...@@ -2085,7 +1770,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(444).toFixed(2) : Number(444).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(value.tbf).toFixed(2) : Number(value.tbf).toFixed(1)}
/> />
} }
/> />
...@@ -2169,7 +1854,7 @@ export default class TaxPlanning extends Component { ...@@ -2169,7 +1854,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 7 ? tableMeta.rowData[3] === 7 ?
...@@ -2188,7 +1873,7 @@ export default class TaxPlanning extends Component { ...@@ -2188,7 +1873,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -2205,7 +1890,7 @@ export default class TaxPlanning extends Component { ...@@ -2205,7 +1890,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -2657,7 +2342,7 @@ export default class TaxPlanning extends Component { ...@@ -2657,7 +2342,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 7 ? tableMeta.rowData[3] === 7 ?
...@@ -2676,7 +2361,7 @@ export default class TaxPlanning extends Component { ...@@ -2676,7 +2361,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -2693,7 +2378,7 @@ export default class TaxPlanning extends Component { ...@@ -2693,7 +2378,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -3145,7 +2830,7 @@ export default class TaxPlanning extends Component { ...@@ -3145,7 +2830,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 7 ? tableMeta.rowData[3] === 7 ?
...@@ -3164,7 +2849,7 @@ export default class TaxPlanning extends Component { ...@@ -3164,7 +2849,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -3181,7 +2866,7 @@ export default class TaxPlanning extends Component { ...@@ -3181,7 +2866,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -3633,7 +3318,7 @@ export default class TaxPlanning extends Component { ...@@ -3633,7 +3318,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 7 ? tableMeta.rowData[3] === 7 ?
...@@ -3652,7 +3337,7 @@ export default class TaxPlanning extends Component { ...@@ -3652,7 +3337,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -3669,7 +3354,7 @@ export default class TaxPlanning extends Component { ...@@ -3669,7 +3354,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -4121,7 +3806,7 @@ export default class TaxPlanning extends Component { ...@@ -4121,7 +3806,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 7 ? tableMeta.rowData[3] === 7 ?
...@@ -4140,7 +3825,7 @@ export default class TaxPlanning extends Component { ...@@ -4140,7 +3825,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -4157,7 +3842,7 @@ export default class TaxPlanning extends Component { ...@@ -4157,7 +3842,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -4609,7 +4294,7 @@ export default class TaxPlanning extends Component { ...@@ -4609,7 +4294,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 7 ? tableMeta.rowData[3] === 7 ?
...@@ -4628,7 +4313,7 @@ export default class TaxPlanning extends Component { ...@@ -4628,7 +4313,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -4645,7 +4330,7 @@ export default class TaxPlanning extends Component { ...@@ -4645,7 +4330,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -5053,7 +4738,7 @@ export default class TaxPlanning extends Component { ...@@ -5053,7 +4738,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 7 ? tableMeta.rowData[3] === 7 ?
...@@ -5072,7 +4757,7 @@ export default class TaxPlanning extends Component { ...@@ -5072,7 +4757,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -5089,7 +4774,7 @@ export default class TaxPlanning extends Component { ...@@ -5089,7 +4774,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -5497,7 +5182,7 @@ export default class TaxPlanning extends Component { ...@@ -5497,7 +5182,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 7 ? tableMeta.rowData[3] === 7 ?
...@@ -5516,7 +5201,7 @@ export default class TaxPlanning extends Component { ...@@ -5516,7 +5201,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -5533,7 +5218,7 @@ export default class TaxPlanning extends Component { ...@@ -5533,7 +5218,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -5941,7 +5626,7 @@ export default class TaxPlanning extends Component { ...@@ -5941,7 +5626,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 7 ? tableMeta.rowData[3] === 7 ?
...@@ -5960,7 +5645,7 @@ export default class TaxPlanning extends Component { ...@@ -5960,7 +5645,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].tbf}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -5977,7 +5662,7 @@ export default class TaxPlanning extends Component { ...@@ -5977,7 +5662,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleValueFormula(value, tableMeta, 3)).toFixed(2) : Number(handleValueFormula(value, tableMeta, 3)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -6006,161 +5691,6 @@ export default class TaxPlanning extends Component { ...@@ -6006,161 +5691,6 @@ export default class TaxPlanning extends Component {
} }
} }
}, },
// {
// name: `${this.props.periode}`,
// options: {
// customHeadRender: (columnMeta) => (
// <th style={{ ...style2, top: 0, backgroundColor: '#1c71b8', color: '#fff', fontSize: 13, fontWeight: 1, width: 150, borderRight: "1px solid rgb(255, 255, 255)" }} >
// <div style={{ borderBottom: "1px #fff solid", textAlign: 'center', fontSize: 12, fontWeight: 'bold', padding: 5, paddingTop: 8 }}>{columnMeta.name}</div>
// <div className="" style={{ ...style2, backgroundColor: '#1c71b8', color: '#fff', fontSize: 12, fontWeight: 'bold', position: "sticky", paddingBottom: 20 }}>
// <div className="column-1" style={{ placeSelf: 'center', textAlign: 'center', padding: 5 }}>
// <span>{"Trial Balance (Fiscal)"}</span>
// </div>
// </div>
// </th>
// ),
// setCellProps: () => ({ style2 }),
// customBodyRender: (value, tableMeta, updateValue) => {
// // console.log(dataTable2);
// return (
// <div>
// <div style={{ textAlign: 'right' }}>
// {
// tableMeta.rowData[3] === 4 || tableMeta.rowData[3] === 1 ?
// null
// :
// this.state.get_for == 'view' ?
// <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] === 3 ?
// <div style={{ flex: 1 }}>
// <FormControlLabel
// style={{ margin: 0 }}
// value={value}
// control={
// <NumberFormat
// thousandSeparator={true}
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder="input"
// disabled={this.props.isApprover == true ? true : false}
// value={Number(value).toFixed(1)}
// onBlur={(event) => {
// // updateValue(event.target.value)
// handleChange(event.target.value, tableMeta, 0)
// // console.log(event.target.value)
// }}
// />
// }
// />
// </div> :
// tableMeta.rowData[3] === 2 ?
// <span style={{ fontSize: 12, textAlign: 'right' }}>
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleParent(tableMeta, 1)).toFixed(1)}
// />
// </span>
// :
// tableMeta.rowData[3] === 6 ?
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// />
// :
// tableMeta.rowData[3] === 5 ?
// <NumberFormat
// thousandSeparator={true}
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text"
// placeholder=""
// disabled={true}
// value={Number(handleValueFormula(value, tableMeta, 1)).toFixed(1)}
// />
// :
// tableMeta.rowData[3] === 7 ?
// (Number(handleValueFormula(value, tableMeta, 0)).toFixed(1) >= Number(this.state.minValue) && Number(handleValueFormula(value, tableMeta, 0)).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, 1)).toFixed(1)}
// /> :
// <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[25].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, 1)).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>
// )
// }
// }
// },
{ {
name: `${this.props.periode}`, name: `${this.props.periode}`,
options: { options: {
...@@ -6240,7 +5770,7 @@ export default class TaxPlanning extends Component { ...@@ -6240,7 +5770,7 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleTotal(tableMeta, 6)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleTotal(tableMeta, 6)).toFixed(2) : Number(handleTotal(tableMeta, 6)).toFixed(1)}
/> />
: :
tableMeta.rowData[3] === 5 ? tableMeta.rowData[3] === 5 ?
...@@ -6250,39 +5780,29 @@ export default class TaxPlanning extends Component { ...@@ -6250,39 +5780,29 @@ export default class TaxPlanning extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleTotal(tableMeta, 5)).toFixed(1)} value={String(tableMeta.rowData[8]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? Number(handleTotal(tableMeta, 5)).toFixed(2) : Number(handleTotal(tableMeta, 5)).toFixed(1)}
/> />
: :
// tableMeta.rowData[3] === 1 ? tableMeta.rowData[3] === 7 ? null
// <NumberFormat // (Number(handleTotal(tableMeta, 1)) >= Number(this.state.minValue) && Number(handleTotal(tableMeta, 1)) <= Number(this.state.maxValue)) ?
// thousandSeparator={true} // <NumberFormat
// style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // thousandSeparator={true}
// type="text" // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// placeholder="" // type="text"
// disabled={true} // placeholder=""
// value={Number(handleTotal(tableMeta, 1)).toFixed(1)} // disabled={true}
// /> // value={Number(handleTotal(tableMeta, 7)).toFixed(1)}
// : // /> :
tableMeta.rowData[3] === 7 ? // <LightTooltip title={this.state.minValue === null ? `Value Should be 0` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
(Number(handleTotal(tableMeta, 1)) >= Number(this.state.minValue) && Number(handleTotal(tableMeta, 1)) <= Number(this.state.maxValue)) ? // <NumberFormat
<NumberFormat // thousandSeparator={true}
thousandSeparator={true} // style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent', color: 'red' }}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // type="text"
type="text" // placeholder=""
placeholder="" // disabled={true}
disabled={true} // value={Number(handleTotal(tableMeta, 7)).toFixed(1)}
value={Number(handleTotal(tableMeta, 7)).toFixed(1)} // />
/> : // </LightTooltip>
<LightTooltip title={this.state.minValue === null ? `Value Should be 0` : `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(handleTotal(tableMeta, 7)).toFixed(1)}
/>
</LightTooltip>
: :
null null
// tableMeta.rowData[3] === 7 ? // tableMeta.rowData[3] === 7 ?
......
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