Commit 4de9dcb5 authored by Rifka Kurnia's avatar Rifka Kurnia

Merge branch 'rifka' into 'master'

q1 q2 tp

See merge request !1334
parents 34530b9d 6e35d539
...@@ -64,7 +64,7 @@ export default class TaxPlanning extends Component { ...@@ -64,7 +64,7 @@ export default class TaxPlanning extends Component {
} }
componentDidMount() { componentDidMount() {
// this.getLatestUpdate() this.getLatestUpdate()
this.getSettingControl() this.getSettingControl()
this.handleViewOnly() this.handleViewOnly()
console.log(this.props.quarter); console.log(this.props.quarter);
...@@ -101,7 +101,7 @@ export default class TaxPlanning extends Component { ...@@ -101,7 +101,7 @@ export default class TaxPlanning extends Component {
checkStatus = false checkStatus = false
} }
// this.setState({viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev}) this.setState({viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev})
} }
handleGetFor(type) { handleGetFor(type) {
...@@ -476,61 +476,70 @@ export default class TaxPlanning extends Component { ...@@ -476,61 +476,70 @@ export default class TaxPlanning extends Component {
tbf: i[5] === undefined ? "0" : reg.test(String(i[5])) === false ? "0" : String(i[5]).trim(), tbf: i[5] === undefined ? "0" : reg.test(String(i[5])) === false ? "0" : String(i[5]).trim(),
}, },
april: { april: {
tbc: i[6] === undefined ? "0" : reg.test(String(i[6])) === false ? "0" : String(i[6]).trim(), tbc: this.props.quarter === "q2" || this.props.quarter === "q3" ? null : i[6] === undefined ? "0" : reg.test(String(i[6])) === false ? "0" : String(i[6]).trim(),
fcp: i[7] === undefined ? "0" : reg.test(String(i[7])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[7]).trim()).toFixed(2)) : String(Number(String(i[7]).trim()).toFixed(1)), fcp: this.props.quarter === "q2" || this.props.quarter === "q3" ? null : i[7] === undefined ? "0" : reg.test(String(i[7])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[7]).trim()).toFixed(2)) : String(Number(String(i[7]).trim()).toFixed(1)),
tbf: i[8] === undefined ? "0" : reg.test(String(i[8])) === false ? "0" : String(i[8]).trim(), tbf: this.props.quarter === "q2" || this.props.quarter === "q3" ? (i[6] === undefined ? "0" : reg.test(String(i[6])) === false ? "0" : String(i[6]).trim()) : (i[8] === undefined ? "0" : reg.test(String(i[8])) === false ? "0" : String(i[8]).trim()),
}, },
may: { may: {
tbc: i[9] === undefined ? "0" : reg.test(String(i[9])) === false ? "0" : String(i[9]).trim(), tbc: this.props.quarter === "q2" || this.props.quarter === "q3" ? null : i[9] === undefined ? "0" : reg.test(String(i[9])) === false ? "0" : String(i[9]).trim(),
fcp: i[10] === undefined ? "0" : reg.test(String(i[10])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[10]).trim()).toFixed(2)) : String(Number(String(i[10]).trim()).toFixed(1)), fcp: this.props.quarter === "q2" || this.props.quarter === "q3" ? null : i[10] === undefined ? "0" : reg.test(String(i[10])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[10]).trim()).toFixed(2)) : String(Number(String(i[10]).trim()).toFixed(1)),
tbf: i[11] === undefined ? "0" : reg.test(String(i[11])) === false ? "0" : String(i[11]).trim(), tbf: this.props.quarter === "q2" || this.props.quarter === "q3" ? (i[7] === undefined ? "0" : reg.test(String(i[7])) === false ? "0" : String(i[7]).trim()) : (i[11] === undefined ? "0" : reg.test(String(i[11])) === false ? "0" : String(i[11]).trim()),
}, },
june: { june: {
tbc: i[12] === undefined ? "0" : reg.test(String(i[12])) === false ? "0" : String(i[12]).trim(), tbc: this.props.quarter === "q2" || this.props.quarter === "q3" ? null : i[12] === undefined ? "0" : reg.test(String(i[12])) === false ? "0" : String(i[12]).trim(),
fcp: i[13] === undefined ? "0" : reg.test(String(i[13])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[13]).trim()).toFixed(2)) : String(Number(String(i[13]).trim()).toFixed(1)), fcp: this.props.quarter === "q2" || this.props.quarter === "q3" ? null : i[13] === undefined ? "0" : reg.test(String(i[13])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[13]).trim()).toFixed(2)) : String(Number(String(i[13]).trim()).toFixed(1)),
tbf: i[14] === undefined ? "0" : reg.test(String(i[14])) === false ? "0" : String(i[14]).trim(), tbf: this.props.quarter === "q2" || this.props.quarter === "q3" ? (i[8] === undefined ? "0" : reg.test(String(i[8])) === false ? "0" : String(i[8]).trim()) : (i[14] === undefined ? "0" : reg.test(String(i[14])) === false ? "0" : String(i[14]).trim()),
}, },
july: { july: {
tbc: i[15] === undefined ? "0" : reg.test(String(i[15])) === false ? "0" : String(i[15]).trim(), tbc: this.props.quarter === "q3" ? null : this.props.quarter === "q2" ? (i[9] === undefined ? "0" : reg.test(String(i[9])) === false ? "0" : String(i[9]).trim()) : (i[15] === undefined ? "0" : reg.test(String(i[15])) === false ? "0" : String(i[15]).trim()),
fcp: i[16] === undefined ? "0" : reg.test(String(i[16])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[16]).trim()).toFixed(2)) : String(Number(String(i[16]).trim()).toFixed(1)), fcp: this.props.quarter === "q3" ? null : this.props.quarter === "q2" ? (i[10] === undefined ? "0" : reg.test(String(i[10])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[10]).trim()).toFixed(2)) : String(Number(String(i[10]).trim()).toFixed(1))) :
tbf: i[17] === undefined ? "0" : reg.test(String(i[17])) === false ? "0" : String(i[17]).trim(), (i[16] === undefined ? "0" : reg.test(String(i[16])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[16]).trim()).toFixed(2)) : String(Number(String(i[16]).trim()).toFixed(1))),
tbf: this.props.quarter === "q3" ? (i[9] === undefined ? "0" : reg.test(String(i[9])) === false ? "0" : String(i[9]).trim()) :
this.props.quarter === "q2" ? (i[11] === undefined ? "0" : reg.test(String(i[11])) === false ? "0" : String(i[11]).trim()) : (i[17] === undefined ? "0" : reg.test(String(i[17])) === false ? "0" : String(i[17]).trim()),
}, },
august: { august: {
tbc: i[18] === undefined ? "0" : reg.test(String(i[18])) === false ? "0" : String(i[18]).trim(), tbc: this.props.quarter === "q3" ? null : this.props.quarter === "q2" ? (i[12] === undefined ? "0" : reg.test(String(i[12])) === false ? "0" : String(i[12]).trim()) : (i[18] === undefined ? "0" : reg.test(String(i[18])) === false ? "0" : String(i[18]).trim()),
fcp: i[19] === undefined ? "0" : reg.test(String(i[19])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[19]).trim()).toFixed(2)) : String(Number(String(i[19]).trim()).toFixed(1)), fcp: this.props.quarter === "q3" ? null : this.props.quarter === "q2" ? (i[13] === undefined ? "0" : reg.test(String(i[13])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[13]).trim()).toFixed(2)) : String(Number(String(i[13]).trim()).toFixed(1))) :
tbf: i[20] === undefined ? "0" : reg.test(String(i[20])) === false ? "0" : String(i[20]).trim(), (i[19] === undefined ? "0" : reg.test(String(i[19])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[19]).trim()).toFixed(2)) : String(Number(String(i[19]).trim()).toFixed(1))),
tbf: this.props.quarter === "q3" ? (i[10] === undefined ? "0" : reg.test(String(i[10])) === false ? "0" : String(i[10]).trim()) :
this.props.quarter === "q2" ? (i[14] === undefined ? "0" : reg.test(String(i[14])) === false ? "0" : String(i[14]).trim()) : i[20] === undefined ? "0" : reg.test(String(i[20])) === false ? "0" : String(i[20]).trim(),
}, },
september: { september: {
tbc: i[21] === undefined ? "0" : reg.test(String(i[21])) === false ? "0" : String(i[21]).trim(), tbc: this.props.quarter === "q3" ? null : this.props.quarter === "q2" ? (i[15] === undefined ? "0" : reg.test(String(i[15])) === false ? "0" : String(i[15]).trim()) : (i[21] === undefined ? "0" : reg.test(String(i[21])) === false ? "0" : String(i[21]).trim()),
fcp: i[22] === undefined ? "0" : reg.test(String(i[22])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[22]).trim()).toFixed(2)) : String(Number(String(i[22]).trim()).toFixed(1)), fcp: this.props.quarter === "q3" ? null : this.props.quarter === "q2" ? (i[16] === undefined ? "0" : reg.test(String(i[16])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[16]).trim()).toFixed(2)) : String(Number(String(i[16]).trim()).toFixed(1))) :
tbf: i[23] === undefined ? "0" : reg.test(String(i[23])) === false ? "0" : String(i[23]).trim(), (i[22] === undefined ? "0" : reg.test(String(i[22])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[22]).trim()).toFixed(2)) : String(Number(String(i[22]).trim()).toFixed(1))),
tbf: this.props.quarter === "q3" ? (i[11] === undefined ? "0" : reg.test(String(i[11])) === false ? "0" : String(i[11]).trim()) :
this.props.quarter === "q2" ? (i[17] === undefined ? "0" : reg.test(String(i[17])) === false ? "0" : String(i[17]).trim()) : (i[23] === undefined ? "0" : reg.test(String(i[23])) === false ? "0" : String(i[23]).trim()),
}, },
october: { october: {
tbc: i[24] === undefined ? "0" : reg.test(String(i[24])) === false ? "0" : String(i[24]).trim(), tbc: this.props.quarter === "q3" ? (i[12] === undefined ? "0" : reg.test(String(i[12])) === false ? "0" : String(i[12]).trim()) :
fcp: i[25] === undefined ? "0" : reg.test(String(i[25])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[25]).trim()).toFixed(2)) : String(Number(String(i[25]).trim()).toFixed(1)), this.props.quarter === "q2" ? (i[18] === undefined ? "0" : reg.test(String(i[18])) === false ? "0" : String(i[18]).trim()) : (i[24] === undefined ? "0" : reg.test(String(i[24])) === false ? "0" : String(i[24]).trim()),
tbf: i[26] === undefined ? "0" : reg.test(String(i[26])) === false ? "0" : String(i[26]).trim(), fcp: this.props.quarter === "q3" ? (i[13] === undefined ? "0" : reg.test(String(i[13])) === false ? "0" : String(i[13]).trim()) :
this.props.quarter === "q2" ? (i[19] === undefined ? "0" : reg.test(String(i[19])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[19]).trim()).toFixed(2)) : String(Number(String(i[19]).trim()).toFixed(1))) :
(i[25] === undefined ? "0" : reg.test(String(i[25])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[25]).trim()).toFixed(2)) : String(Number(String(i[25]).trim()).toFixed(1))),
tbf: this.props.quarter === "q3" ? (i[14] === undefined ? "0" : reg.test(String(i[14])) === false ? "0" : String(i[14]).trim()) :
this.props.quarter === "q2" ? (i[20] === undefined ? "0" : reg.test(String(i[20])) === false ? "0" : String(i[20]).trim()) : (i[26] === undefined ? "0" : reg.test(String(i[26])) === false ? "0" : String(i[26]).trim()),
}, },
november: { november: {
tbc: i[27] === undefined ? "0" : reg.test(String(i[27])) === false ? "0" : String(i[27]).trim(), tbc: this.props.quarter === "q3" ? (i[15] === undefined ? "0" : reg.test(String(i[15])) === false ? "0" : String(i[15]).trim()) :
fcp: i[28] === undefined ? "0" : reg.test(String(i[28])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[28]).trim()).toFixed(2)) : String(Number(String(i[28]).trim()).toFixed(1)), this.props.quarter === "q2" ? (i[21] === undefined ? "0" : reg.test(String(i[21])) === false ? "0" : String(i[21]).trim()) : (i[27] === undefined ? "0" : reg.test(String(i[27])) === false ? "0" : String(i[27]).trim()),
tbf: i[29] === undefined ? "0" : reg.test(String(i[29])) === false ? "0" : String(i[29]).trim(), fcp: this.props.quarter === "q3" ? (i[16] === undefined ? "0" : reg.test(String(i[16])) === false ? "0" : String(i[16]).trim()) :
this.props.quarter === "q2" ? (i[22] === undefined ? "0" : reg.test(String(i[22])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[22]).trim()).toFixed(2)) : String(Number(String(i[22]).trim()).toFixed(1))) :
(i[28] === undefined ? "0" : reg.test(String(i[28])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[28]).trim()).toFixed(2)) : String(Number(String(i[28]).trim()).toFixed(1))),
tbf: this.props.quarter === "q3" ? (i[17] === undefined ? "0" : reg.test(String(i[17])) === false ? "0" : String(i[17]).trim()) :
this.props.quarter === "q2" ? (i[23] === undefined ? "0" : reg.test(String(i[23])) === false ? "0" : String(i[23]).trim()) : (i[29] === undefined ? "0" : reg.test(String(i[29])) === false ? "0" : String(i[29]).trim()),
}, },
december: { december: {
tbc: i[30] === undefined ? "0" : reg.test(String(i[30])) === false ? "0" : String(i[30]).trim(), tbc: this.props.quarter === "q3" ? (i[18] === undefined ? "0" : reg.test(String(i[18])) === false ? "0" : String(i[18]).trim()) :
fcp: i[31] === undefined ? "0" : reg.test(String(i[31])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[31]).trim()).toFixed(2)) : String(Number(String(i[31]).trim()).toFixed(1)), this.props.quarter === "q2" ? (i[24] === undefined ? "0" : reg.test(String(i[24])) === false ? "0" : String(i[24]).trim()) : (i[30] === undefined ? "0" : reg.test(String(i[30])) === false ? "0" : String(i[30]).trim()),
tbf: i[32] === undefined ? "0" : reg.test(String(i[32])) === false ? "0" : String(i[32]).trim(), fcp: this.props.quarter === "q3" ? (i[19] === undefined ? "0" : reg.test(String(i[19])) === false ? "0" : String(i[19]).trim()) :
this.props.quarter === "q2" ? (i[25] === undefined ? "0" : reg.test(String(i[25])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[25]).trim()).toFixed(2)) : String(Number(String(i[25]).trim()).toFixed(1))) :
(i[31] === undefined ? "0" : reg.test(String(i[31])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[31]).trim()).toFixed(2)) : String(Number(String(i[31]).trim()).toFixed(1))),
tbf: this.props.quarter === "q3" ? (i[20] === undefined ? "0" : reg.test(String(i[20])) === false ? "0" : String(i[20]).trim()) :
this.props.quarter === "q2" ? (i[26] === undefined ? "0" : reg.test(String(i[26])) === false ? "0" : String(i[26]).trim()) : (i[32] === undefined ? "0" : reg.test(String(i[32])) === false ? "0" : String(i[32]).trim()),
}, },
total_current_year: i[33] === undefined ? "" : String(i[33]).trim(), total_current_year: this.props.quarter === "q3" ? (i[21] === undefined ? "0" : reg.test(String(i[21])) === false ? "0" : String(i[21]).trim()) :
// total_next_year: { this.props.quarter === "q2" ? (i[27] === undefined ? "" : String(i[27]).trim()) : (i[33] === undefined ? "" : String(i[33]).trim()),
// tbc: i[39] === undefined ? "0" : reg.test(String(i[39])) === false ? "0" : String(i[39]).trim(),
// fcp: i[40] === undefined ? "0" : reg.test(String(i[40])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[40]).trim()).toFixed(1)) : String(Number(String(i[40]).trim()).toFixed(1)),
// tbf: i[41] === undefined ? "0" : reg.test(String(i[41])) === false ? "0" : String(i[41]).trim(),
// },
// total_more_year: {
// tbc: i[42] === undefined ? "0" : reg.test(String(i[42])) === false ? "0" : String(i[42]).trim(),
// fcp: i[43] === undefined ? "0" : reg.test(String(i[43])) === false ? "0" : String(i[1]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[43]).trim()).toFixed(1)) : String(Number(String(i[43]).trim()).toFixed(1)),
// tbf: i[44] === undefined ? "0" : reg.test(String(i[44])) === false ? "0" : String(i[44]).trim(),
// }
}) })
} }
}) })
...@@ -543,6 +552,7 @@ export default class TaxPlanning extends Component { ...@@ -543,6 +552,7 @@ export default class TaxPlanning extends Component {
status: this.props.status, status: this.props.status,
tax_planning: payload tax_planning: payload
} }
console.log(payload)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] }) this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
} }
}); });
...@@ -703,9 +713,9 @@ export default class TaxPlanning extends Component { ...@@ -703,9 +713,9 @@ export default class TaxPlanning extends Component {
status: type, status: type,
tax_planning: data, tax_planning: data,
} }
// console.log(data); console.log(data);
api.create('UPLOAD').importRollingOutlookTP(body).then(response => { api.create('UPLOAD').importRollingOutlookTP(body).then(response => {
// console.log(response); console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.onClickClose() this.props.onClickClose()
...@@ -1332,7 +1342,7 @@ export default class TaxPlanning extends Component { ...@@ -1332,7 +1342,7 @@ export default class TaxPlanning extends Component {
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text" // type="text"
// placeholder="input" // placeholder="input"
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} // disabled={this.props.isApprover == true ? true : false}
// value={Number(value.tbf).toFixed(1)} // value={Number(value.tbf).toFixed(1)}
// onBlur={(event) => { // onBlur={(event) => {
// // updateValue(event.target.value) // // updateValue(event.target.value)
...@@ -1502,7 +1512,7 @@ export default class TaxPlanning extends Component { ...@@ -1502,7 +1512,7 @@ export default class TaxPlanning extends Component {
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text" // type="text"
// placeholder="input" // placeholder="input"
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} // disabled={this.props.isApprover == true ? true : false}
// value={Number(value.tbf).toFixed(1)} // value={Number(value.tbf).toFixed(1)}
// onBlur={(event) => { // onBlur={(event) => {
// // updateValue(event.target.value) // // updateValue(event.target.value)
...@@ -1672,7 +1682,7 @@ export default class TaxPlanning extends Component { ...@@ -1672,7 +1682,7 @@ export default class TaxPlanning extends Component {
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text" // type="text"
// placeholder="input" // placeholder="input"
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} // disabled={this.props.isApprover == true ? true : false}
// value={Number(value.tbf).toFixed(1)} // value={Number(value.tbf).toFixed(1)}
// onBlur={(event) => { // onBlur={(event) => {
// // updateValue(event.target.value) // // updateValue(event.target.value)
...@@ -1802,7 +1812,7 @@ export default class TaxPlanning extends Component { ...@@ -1802,7 +1812,7 @@ export default class TaxPlanning extends Component {
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1? tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1 || this.props.quarter === "q2" || this.props.quarter === "q3" ?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -1852,7 +1862,7 @@ export default class TaxPlanning extends Component { ...@@ -1852,7 +1862,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbc).toFixed(1)} value={Number(value.tbc).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -1947,7 +1957,7 @@ export default class TaxPlanning extends Component { ...@@ -1947,7 +1957,7 @@ export default class TaxPlanning extends Component {
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1? tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1 || this.props.quarter === "q2" || this.props.quarter === "q3" ?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -2096,7 +2106,7 @@ export default class TaxPlanning extends Component { ...@@ -2096,7 +2106,7 @@ export default class TaxPlanning 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' ?
tableMeta.rowData[3] === 5 || tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 7 ? tableMeta.rowData[3] === 5 || tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 7 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -2132,6 +2142,42 @@ export default class TaxPlanning extends Component { ...@@ -2132,6 +2142,42 @@ export default class TaxPlanning extends Component {
/> />
</div> </div>
: :
this.props.quarter === "q2" || this.props.quarter === "q3" ?
tableMeta.rowData[3] === 5 || tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 7 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value.tbf.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.tbf.value).toFixed(2) : Number(value.tbf.value).toFixed(1)}
/>
}
/>
</div>
:
<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] === 3 ? tableMeta.rowData[3] === 3 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -2143,7 +2189,7 @@ export default class TaxPlanning extends Component { ...@@ -2143,7 +2189,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbf).toFixed(1)} value={Number(value.tbf).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -2274,7 +2320,7 @@ export default class TaxPlanning extends Component { ...@@ -2274,7 +2320,7 @@ export default class TaxPlanning extends Component {
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1? tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1 || this.props.quarter === "q2" || this.props.quarter === "q3" ?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -2324,7 +2370,7 @@ export default class TaxPlanning extends Component { ...@@ -2324,7 +2370,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbc).toFixed(1)} value={Number(value.tbc).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -2419,7 +2465,7 @@ export default class TaxPlanning extends Component { ...@@ -2419,7 +2465,7 @@ export default class TaxPlanning extends Component {
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1? tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1 || this.props.quarter === "q2" || this.props.quarter === "q3" ?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -2584,6 +2630,42 @@ export default class TaxPlanning extends Component { ...@@ -2584,6 +2630,42 @@ export default class TaxPlanning extends Component {
/> />
</div> </div>
: :
this.props.quarter === "q2" || this.props.quarter === "q3" ?
tableMeta.rowData[3] === 5 || tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 7 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value.tbf.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.tbf.value).toFixed(2) : Number(value.tbf.value).toFixed(1)}
/>
}
/>
</div>
:
<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] === 3 ? tableMeta.rowData[3] === 3 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -2595,7 +2677,7 @@ export default class TaxPlanning extends Component { ...@@ -2595,7 +2677,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbf).toFixed(1)} value={Number(value.tbf).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -2726,7 +2808,7 @@ export default class TaxPlanning extends Component { ...@@ -2726,7 +2808,7 @@ export default class TaxPlanning extends Component {
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1? tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1 || this.props.quarter === "q2" || this.props.quarter === "q3" ?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -2776,7 +2858,7 @@ export default class TaxPlanning extends Component { ...@@ -2776,7 +2858,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbc).toFixed(1)} value={Number(value.tbc).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -2871,7 +2953,7 @@ export default class TaxPlanning extends Component { ...@@ -2871,7 +2953,7 @@ export default class TaxPlanning extends Component {
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1? tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1 || this.props.quarter === "q2" || this.props.quarter === "q3" ?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -3036,6 +3118,42 @@ export default class TaxPlanning extends Component { ...@@ -3036,6 +3118,42 @@ export default class TaxPlanning extends Component {
/> />
</div> </div>
: :
this.props.quarter === "q2" || this.props.quarter === "q3" ?
tableMeta.rowData[3] === 5 || tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 7 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value.tbf.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.tbf.value).toFixed(2) : Number(value.tbf.value).toFixed(1)}
/>
}
/>
</div>
:
<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] === 3 ? tableMeta.rowData[3] === 3 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -3047,7 +3165,7 @@ export default class TaxPlanning extends Component { ...@@ -3047,7 +3165,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbf).toFixed(1)} value={Number(value.tbf).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -3178,7 +3296,7 @@ export default class TaxPlanning extends Component { ...@@ -3178,7 +3296,7 @@ export default class TaxPlanning extends Component {
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1? tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1 || this.props.quarter === "q3" ?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -3228,7 +3346,7 @@ export default class TaxPlanning extends Component { ...@@ -3228,7 +3346,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbc).toFixed(1)} value={Number(value.tbc).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -3323,7 +3441,7 @@ export default class TaxPlanning extends Component { ...@@ -3323,7 +3441,7 @@ export default class TaxPlanning extends Component {
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1? tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1|| this.props.quarter === "q3" ?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -3488,6 +3606,42 @@ export default class TaxPlanning extends Component { ...@@ -3488,6 +3606,42 @@ export default class TaxPlanning extends Component {
/> />
</div> </div>
: :
this.props.quarter === "q3" ?
tableMeta.rowData[3] === 5 || tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 7 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value.tbf.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.tbf.value).toFixed(2) : Number(value.tbf.value).toFixed(1)}
/>
}
/>
</div>
:
<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] === 3 ? tableMeta.rowData[3] === 3 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -3499,7 +3653,7 @@ export default class TaxPlanning extends Component { ...@@ -3499,7 +3653,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbf).toFixed(1)} value={Number(value.tbf).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -3630,7 +3784,7 @@ export default class TaxPlanning extends Component { ...@@ -3630,7 +3784,7 @@ export default class TaxPlanning extends Component {
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1? tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1 || this.props.quarter === "q3" ?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -3680,7 +3834,7 @@ export default class TaxPlanning extends Component { ...@@ -3680,7 +3834,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbc).toFixed(1)} value={Number(value.tbc).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -3775,7 +3929,7 @@ export default class TaxPlanning extends Component { ...@@ -3775,7 +3929,7 @@ export default class TaxPlanning extends Component {
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1? tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1 || this.props.quarter === "q3" ?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -3940,6 +4094,42 @@ export default class TaxPlanning extends Component { ...@@ -3940,6 +4094,42 @@ export default class TaxPlanning extends Component {
/> />
</div> </div>
: :
this.props.quarter === "q3" ?
tableMeta.rowData[3] === 5 || tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 7 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value.tbf.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.tbf.value).toFixed(2) : Number(value.tbf.value).toFixed(1)}
/>
}
/>
</div>
:
<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] === 3 ? tableMeta.rowData[3] === 3 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -3951,7 +4141,7 @@ export default class TaxPlanning extends Component { ...@@ -3951,7 +4141,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbf).toFixed(1)} value={Number(value.tbf).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -4082,7 +4272,7 @@ export default class TaxPlanning extends Component { ...@@ -4082,7 +4272,7 @@ export default class TaxPlanning extends Component {
<div className="col-1"> <div className="col-1">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1? tableMeta.rowData[1] === 4 || tableMeta.rowData[1] === 1 || this.props.quarter === "q3" ?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -4132,7 +4322,7 @@ export default class TaxPlanning extends Component { ...@@ -4132,7 +4322,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbc).toFixed(1)} value={Number(value.tbc).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -4227,7 +4417,7 @@ export default class TaxPlanning extends Component { ...@@ -4227,7 +4417,7 @@ export default class TaxPlanning extends Component {
<div className="col-2"> <div className="col-2">
<div style={{ textAlign: 'right' }}> <div style={{ textAlign: 'right' }}>
{ {
tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1? tableMeta.rowData[2] === 4 || tableMeta.rowData[2] === 1 || this.props.quarter === "q3" ?
null null
: :
this.state.get_for == 'view'? this.state.get_for == 'view'?
...@@ -4392,6 +4582,42 @@ export default class TaxPlanning extends Component { ...@@ -4392,6 +4582,42 @@ export default class TaxPlanning extends Component {
/> />
</div> </div>
: :
this.props.quarter === "q3" ?
tableMeta.rowData[3] === 5 || tableMeta.rowData[3] === 6 || tableMeta.rowData[3] === 7 ?
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value.tbf.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.tbf.value).toFixed(2) : Number(value.tbf.value).toFixed(1)}
/>
}
/>
</div>
:
<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] === 3 ? tableMeta.rowData[3] === 3 ?
<div style={{ flex: 1 }}> <div style={{ flex: 1 }}>
<FormControlLabel <FormControlLabel
...@@ -4403,7 +4629,7 @@ export default class TaxPlanning extends Component { ...@@ -4403,7 +4629,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbf).toFixed(1)} value={Number(value.tbf).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -4579,7 +4805,7 @@ export default class TaxPlanning extends Component { ...@@ -4579,7 +4805,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbc).toFixed(1)} value={Number(value.tbc).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -4847,7 +5073,7 @@ export default class TaxPlanning extends Component { ...@@ -4847,7 +5073,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbf).toFixed(1)} value={Number(value.tbf).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -5023,7 +5249,7 @@ export default class TaxPlanning extends Component { ...@@ -5023,7 +5249,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbc).toFixed(1)} value={Number(value.tbc).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -5291,7 +5517,7 @@ export default class TaxPlanning extends Component { ...@@ -5291,7 +5517,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbf).toFixed(1)} value={Number(value.tbf).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -5467,7 +5693,7 @@ export default class TaxPlanning extends Component { ...@@ -5467,7 +5693,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbc).toFixed(1)} value={Number(value.tbc).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -5735,7 +5961,7 @@ export default class TaxPlanning extends Component { ...@@ -5735,7 +5961,7 @@ export default class TaxPlanning extends Component {
style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(value.tbf).toFixed(1)} value={Number(value.tbf).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
...@@ -5883,7 +6109,7 @@ export default class TaxPlanning extends Component { ...@@ -5883,7 +6109,7 @@ export default class TaxPlanning extends Component {
// style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} // style={{ color: "#5198ea", fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
// type="text" // type="text"
// placeholder="input" // placeholder="input"
// disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} // disabled={this.props.isApprover == true ? true : false}
// value={Number(value).toFixed(1)} // value={Number(value).toFixed(1)}
// onBlur={(event) => { // onBlur={(event) => {
// // updateValue(event.target.value) // // updateValue(event.target.value)
...@@ -6040,7 +6266,7 @@ export default class TaxPlanning extends Component { ...@@ -6040,7 +6266,7 @@ export default class TaxPlanning extends Component {
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }} style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text" type="text"
placeholder="input" placeholder="input"
disabled={this.props.isApprover == true ? true : ((this.props.lastStatus === 'SUBMIT' || this.props.lastStatus === 'REVISION') && this.props.prevRevision === false && (this.props.status === 'revision' || this.props.status === 'not-yet' || this.props.status === 'draft' || this.props.status === 'submitted') ? false : true)} disabled={this.props.isApprover == true ? true : false}
value={Number(handleTotal(tableMeta, 3)).toFixed(1)} value={Number(handleTotal(tableMeta, 3)).toFixed(1)}
/> />
} }
...@@ -6218,7 +6444,7 @@ export default class TaxPlanning extends Component { ...@@ -6218,7 +6444,7 @@ export default class TaxPlanning extends Component {
<div style={{ display: 'flex', justifyContent: 'space-between' }}> <div style={{ display: 'flex', justifyContent: 'space-between' }}>
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} {String(this.props.quarter).toLocaleUpperCase()} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision}) {String(this.props.quarter).toLocaleUpperCase()} </Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div> </div>
<div style={{ width: '50%' }}> <div style={{ width: '50%' }}>
...@@ -6437,7 +6663,7 @@ export default class TaxPlanning extends Component { ...@@ -6437,7 +6663,7 @@ export default class TaxPlanning extends Component {
<div style={{ padding: 25 }}> <div style={{ padding: 25 }}>
<div> <div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} {String(this.props.quarter).toLocaleUpperCase()} (rev.{this.props.revision})</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode} (rev.{this.props.revision}) {String(this.props.quarter).toLocaleUpperCase()} </Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography> <Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div> </div>
{this.state.dataLoaded && ( {this.state.dataLoaded && (
......
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