Commit 7c972419 authored by faisalhamdi's avatar faisalhamdi

Merge branch 'master' of http://103.44.149.204/d.arizona/tia-dev into faisal

parents 0adff05b 4de9dcb5
...@@ -248,9 +248,12 @@ const create = (type = "") => { ...@@ -248,9 +248,12 @@ const create = (type = "") => {
const getRollingOutlookReport = (body) => api.post('transaction/rolling_outlook/get_all_report', body) const getRollingOutlookReport = (body) => api.post('transaction/rolling_outlook/get_all_report', body)
const getRollingOutlookLastUpdate = (body) => api.post('transaction/rolling_outlook/get_latest_update', body) const getRollingOutlookLastUpdate = (body) => api.post('transaction/rolling_outlook/get_latest_update', body)
const getRollingOutlookRevision = (body) => api.post('transaction/rolling_outlook/get_revision', body) const getRollingOutlookRevision = (body) => api.post('transaction/rolling_outlook/get_revision', body)
const getRollingOutlookIsApprover = (body) => api.get('transaction/rolling_outlook/is_approver') const getRollingOutlookIsApprover = (body) => api.get('transaction/rolling_outlook/is_approver', body)
const uploadAttachmentRO = (body) => api.post('transaction/rolling_outlook/upload_attachment', body) const uploadAttachmentRO = (body) => api.post('transaction/rolling_outlook/upload_attachment', body)
const deleteAttachmentRO = (id) => api.post(`transaction/rolling_outlook/delete_attachment/${id}`) const deleteAttachmentRO = (id) => api.post(`transaction/rolling_outlook/delete_attachment/${id}`)
const approvalRolling = (body) => api.post('transaction/rolling_outlook/approval_rolling', body)
const createPeriodeRevisionRO = (body) => api.post('transaction/rolling_outlook/create_periode_revision', body)
const historyApprovalRO = (body) => api.post('transaction/rolling_outlook/history_approval', body)
const getRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/get_report_hierarki', body) const getRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/get_report_hierarki', body)
const checkImportRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/check_import', body) const checkImportRollingOutlookBS = (body) => api.post('transaction/balance_sheet/rolling_outlook/check_import', body)
...@@ -770,7 +773,10 @@ const create = (type = "") => { ...@@ -770,7 +773,10 @@ const create = (type = "") => {
uploadRollingOutlookOI, uploadRollingOutlookOI,
submitRollingOutlook, submitRollingOutlook,
getRollingOutlookCompanySubmitted, getRollingOutlookCompanySubmitted,
createPeriodeRevisionOLPA createPeriodeRevisionOLPA,
approvalRolling,
createPeriodeRevisionRO,
historyApprovalRO
} }
} }
......
...@@ -629,7 +629,55 @@ export default class SubHolding extends Component { ...@@ -629,7 +629,55 @@ export default class SubHolding extends Component {
item.balance_sheet.monthly_last_year_september, item.balance_sheet.monthly_last_year_september,
item.balance_sheet.monthly_last_year_october, item.balance_sheet.monthly_last_year_october,
item.balance_sheet.monthly_last_year_november, item.balance_sheet.monthly_last_year_november,
item.balance_sheet.monthly_last_year_december item.balance_sheet.monthly_last_year_december,
item.balance_sheet.ro_january,
item.balance_sheet.ro_february,
item.balance_sheet.ro_march,
item.balance_sheet.ro_april,
item.balance_sheet.ro_may,
item.balance_sheet.ro_june,
item.balance_sheet.ro_july,
item.balance_sheet.ro_august,
item.balance_sheet.ro_september,
item.balance_sheet.ro_october,
item.balance_sheet.ro_november,
item.balance_sheet.ro_december,
item.balance_sheet.ro_q1_january,
item.balance_sheet.ro_q1_february,
item.balance_sheet.ro_q1_march,
item.balance_sheet.ro_q1_april,
item.balance_sheet.ro_q1_may,
item.balance_sheet.ro_q1_june,
item.balance_sheet.ro_q1_july,
item.balance_sheet.ro_q1_august,
item.balance_sheet.ro_q1_september,
item.balance_sheet.ro_q1_october,
item.balance_sheet.ro_q1_november,
item.balance_sheet.ro_q1_december,
item.balance_sheet.ro_q2_january,
item.balance_sheet.ro_q2_february,
item.balance_sheet.ro_q2_march,
item.balance_sheet.ro_q2_april,
item.balance_sheet.ro_q2_may,
item.balance_sheet.ro_q2_june,
item.balance_sheet.ro_q2_july,
item.balance_sheet.ro_q2_august,
item.balance_sheet.ro_q2_september,
item.balance_sheet.ro_q2_october,
item.balance_sheet.ro_q2_november,
item.balance_sheet.ro_q2_december,
item.balance_sheet.ro_q3_january,
item.balance_sheet.ro_q3_february,
item.balance_sheet.ro_q3_march,
item.balance_sheet.ro_q3_april,
item.balance_sheet.ro_q3_may,
item.balance_sheet.ro_q3_june,
item.balance_sheet.ro_q3_july,
item.balance_sheet.ro_q3_august,
item.balance_sheet.ro_q3_september,
item.balance_sheet.ro_q3_october,
item.balance_sheet.ro_q3_november,
item.balance_sheet.ro_q3_december,
]) ])
} }
if (item.children !== null) { if (item.children !== null) {
...@@ -690,7 +738,55 @@ export default class SubHolding extends Component { ...@@ -690,7 +738,55 @@ export default class SubHolding extends Component {
item.balance_sheet.monthly_last_year_september, item.balance_sheet.monthly_last_year_september,
item.balance_sheet.monthly_last_year_october, item.balance_sheet.monthly_last_year_october,
item.balance_sheet.monthly_last_year_november, item.balance_sheet.monthly_last_year_november,
item.balance_sheet.monthly_last_year_december item.balance_sheet.monthly_last_year_december,
item.balance_sheet.ro_january,
item.balance_sheet.ro_february,
item.balance_sheet.ro_march,
item.balance_sheet.ro_april,
item.balance_sheet.ro_may,
item.balance_sheet.ro_june,
item.balance_sheet.ro_july,
item.balance_sheet.ro_august,
item.balance_sheet.ro_september,
item.balance_sheet.ro_october,
item.balance_sheet.ro_november,
item.balance_sheet.ro_december,
item.balance_sheet.ro_q1_january,
item.balance_sheet.ro_q1_february,
item.balance_sheet.ro_q1_march,
item.balance_sheet.ro_q1_april,
item.balance_sheet.ro_q1_may,
item.balance_sheet.ro_q1_june,
item.balance_sheet.ro_q1_july,
item.balance_sheet.ro_q1_august,
item.balance_sheet.ro_q1_september,
item.balance_sheet.ro_q1_october,
item.balance_sheet.ro_q1_november,
item.balance_sheet.ro_q1_december,
item.balance_sheet.ro_q2_january,
item.balance_sheet.ro_q2_february,
item.balance_sheet.ro_q2_march,
item.balance_sheet.ro_q2_april,
item.balance_sheet.ro_q2_may,
item.balance_sheet.ro_q2_june,
item.balance_sheet.ro_q2_july,
item.balance_sheet.ro_q2_august,
item.balance_sheet.ro_q2_september,
item.balance_sheet.ro_q2_october,
item.balance_sheet.ro_q2_november,
item.balance_sheet.ro_q2_december,
item.balance_sheet.ro_q3_january,
item.balance_sheet.ro_q3_february,
item.balance_sheet.ro_q3_march,
item.balance_sheet.ro_q3_april,
item.balance_sheet.ro_q3_may,
item.balance_sheet.ro_q3_june,
item.balance_sheet.ro_q3_july,
item.balance_sheet.ro_q3_august,
item.balance_sheet.ro_q3_september,
item.balance_sheet.ro_q3_october,
item.balance_sheet.ro_q3_november,
item.balance_sheet.ro_q3_december,
]) ])
if (item.children !== null) { if (item.children !== null) {
if (item.children.length > 0) { if (item.children.length > 0) {
...@@ -715,9 +811,11 @@ export default class SubHolding extends Component { ...@@ -715,9 +811,11 @@ export default class SubHolding extends Component {
} }
}) })
} }
} else { } else {
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false }) this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
} }
console.log(dataTable);
}) })
} else if (this.state.report.value === 3) { } else if (this.state.report.value === 3) {
let PLID = null let PLID = null
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -382,7 +382,7 @@ export default class OutlookPA extends Component { ...@@ -382,7 +382,7 @@ export default class OutlookPA extends Component {
"is_approver": this.state.isApprover "is_approver": this.state.isApprover
} }
api.create().getOutlookPAID(payload).then(response => { api.create().getOutlookPAID(payload).then(response => {
// console.log(response) console.log(response)
if (response) { if (response) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ this.setState({
......
...@@ -124,6 +124,7 @@ export default class RollingOutlook extends Component { ...@@ -124,6 +124,7 @@ export default class RollingOutlook extends Component {
} }
checkApprover() { checkApprover() {
// console.log('tot')
let listStatus1 = [ let listStatus1 = [
{ name: 'Open', value: 'not-yet' }, { name: 'Open', value: 'not-yet' },
{ name: 'Submitted', value: 'approval_review' }, { name: 'Submitted', value: 'approval_review' },
...@@ -138,6 +139,7 @@ export default class RollingOutlook extends Component { ...@@ -138,6 +139,7 @@ export default class RollingOutlook extends Component {
] ]
api.create().getRollingOutlookIsApprover().then(response => { api.create().getRollingOutlookIsApprover().then(response => {
// console.log('yuuuu')
console.log(response); console.log(response);
if (response.data.data.is_approver === true) { if (response.data.data.is_approver === true) {
this.setState({ isApprover: true, checkApprover: true, listStatus: listStatus1, selectedStatus: listStatus1 }, () => this.setState({ isApprover: true, checkApprover: true, listStatus: listStatus1, selectedStatus: listStatus1 }, () =>
...@@ -533,15 +535,15 @@ export default class RollingOutlook extends Component { ...@@ -533,15 +535,15 @@ export default class RollingOutlook extends Component {
console.log(this.state.lastStatus); console.log(this.state.lastStatus);
this.historyApproval() this.historyApproval()
this.getLatestPeriodSubmit() this.getLatestPeriodSubmit()
api.create().checkApprover().then(response => { // api.create().checkApprover().then(response => {
// console.log(response); // console.log(response);
if (response.data.data.is_approver === true) { if (this.state.isApprover) {
this.setState({ isApprover: true, checkApprover: true }) this.setState({ isApprover: true, checkApprover: true })
} else { } else {
this.setState({ isApprover: this.state.lastStatus === "SUBMITTED" ? true : false, checkApprover: false }) this.setState({ isApprover: this.state.lastStatus === "SUBMITTED" ? true : false, checkApprover: false })
} }
}) // })
}) })
} else { } else {
this.setState({ rollingOutlookID: null, loading: false }) this.setState({ rollingOutlookID: null, loading: false })
...@@ -553,9 +555,10 @@ export default class RollingOutlook extends Component { ...@@ -553,9 +555,10 @@ export default class RollingOutlook extends Component {
historyApproval() { historyApproval() {
let body = { let body = {
"company_id": this.state.company.company_id, "company_id": this.state.company.company_id,
"periode": this.state.periode.periode "periode": this.state.periode.periode,
"quartal": this.state.quarter.value
} }
api.create().historyApproval(body).then(response => { api.create().historyApprovalRO(body).then(response => {
console.log(response); console.log(response);
if (response.data.data.length > 0) { if (response.data.data.length > 0) {
let dataTableHistory = response.data.data.map(item => { let dataTableHistory = response.data.data.map(item => {
...@@ -567,7 +570,7 @@ export default class RollingOutlook extends Component { ...@@ -567,7 +570,7 @@ export default class RollingOutlook extends Component {
item.history_approval_date item.history_approval_date
] ]
}) })
this.setState({ dataTableHistory, visibleTableHistory: false }) this.setState({ dataTableHistory, visibleTableHistory: true })
} }
}) })
} }
...@@ -578,21 +581,24 @@ export default class RollingOutlook extends Component { ...@@ -578,21 +581,24 @@ export default class RollingOutlook extends Component {
let body = { let body = {
"approval_id": this.props.location.state == undefined ? this.state.approverID : this.state.rawData.approval_id, "approval_id": this.props.location.state == undefined ? this.state.approverID : this.state.rawData.approval_id,
"status": type, "status": type,
"detail": this.state.detailRevisiCheck "detail": this.state.detailRevisiCheck,
"quartal": this.state.quarter.value
} }
let payload = { let payload = {
"company_id": this.state.company.company_id, "company_id": this.state.company.company_id,
"min_periode": moment(this.state.minDateRevision).format('YYYY-MM-DD'), "min_periode": moment(this.state.minDateRevision).format('YYYY-MM-DD'),
"max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD') "periode": this.state.periode.periode,
"max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD'),
"quartal": this.state.quarter.value
} }
console.log(payload) console.log(payload)
api.create().approvalSubmission(body).then((res) => { api.create().approvalRolling(body).then((res) => {
console.log(res) console.log(res)
this.setState({ loading: false }, () => { this.setState({ loading: false }, () => {
this.getRollingOutlookID() this.getRollingOutlookID()
}) })
if (type == 'revision') { if (type == 'revision') {
api.create().createPeriodeRevision(payload).then((res) => console.log(res)) api.create().createPeriodeRevisionRO(payload).then((res) => console.log(res))
} }
}) })
} }
...@@ -783,7 +789,7 @@ export default class RollingOutlook extends Component { ...@@ -783,7 +789,7 @@ export default class RollingOutlook extends Component {
api.create().submitRollingOutlook(body).then(response => { api.create().submitRollingOutlook(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.getRollingOutlookID() this.getRollingOutlookID()
} }
} }
......
...@@ -97,15 +97,15 @@ export default class BalanceSheetRO extends Component { ...@@ -97,15 +97,15 @@ export default class BalanceSheetRO extends Component {
} else { } else {
checkStatus = false checkStatus = false
} }
// console.log(this.props.isApprover); console.log(this.props.isApprover);
// console.log(this.props.lastStatus); console.log(this.props.lastStatus);
// console.log(this.props.prevRevision); console.log(this.props.prevRevision);
// console.log(this.props.status); console.log(this.props.status);
// console.log(!checkApprover); console.log(!checkApprover);
// console.log(checkLastStatus); console.log(checkLastStatus);
// console.log(checkStatus); console.log(checkStatus);
// console.log(checkPrevRev); console.log(checkPrevRev);
this.setState({ viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev }) this.setState({ viewOnly: !checkApprover && checkLastStatus && checkStatus && checkPrevRev })
} }
...@@ -1153,7 +1153,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1153,7 +1153,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)} value={val === "0" ? "" : Number(handleValue(tableMeta, 0)).toFixed(1)}
/> />
</span> </span>
: :
...@@ -1170,7 +1170,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1170,7 +1170,7 @@ export default class BalanceSheetRO extends Component {
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={true} disabled={true}
value={Number(val).toFixed(1)} value={val === "0" ? "" : Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
}} }}
...@@ -1190,7 +1190,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1190,7 +1190,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta, 7)).toFixed(1)} value={val === "0" ? "" : Number(handleValueFormula(tableMeta, 7)).toFixed(1)}
/> />
} }
/> />
...@@ -1210,7 +1210,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1210,7 +1210,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta, 7)).toFixed(1)} value={val === "0" ? "" : Number(handleValueFormula(tableMeta, 7)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -1227,7 +1227,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1227,7 +1227,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta, 7)).toFixed(1)} value={val === "0" ? "" : Number(handleValueFormula(tableMeta, 7)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -1242,7 +1242,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1242,7 +1242,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(val).toFixed(1)} value={val === "0" ? "" : Number(val).toFixed(1)}
/> />
} }
/> />
...@@ -1284,7 +1284,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1284,7 +1284,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)} value={val === "0" ? "" : Number(handleValue(tableMeta, 0)).toFixed(1)}
/> />
</span> </span>
: :
...@@ -1301,7 +1301,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1301,7 +1301,7 @@ export default class BalanceSheetRO extends Component {
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={true} disabled={true}
value={Number(val).toFixed(1)} value={val === "0" ? "" : Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
}} }}
...@@ -1321,7 +1321,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1321,7 +1321,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta, 8)).toFixed(1)} value={val === "0" ? "" : Number(handleValueFormula(tableMeta, 8)).toFixed(1)}
/> />
} }
/> />
...@@ -1341,7 +1341,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1341,7 +1341,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta, 8)).toFixed(1)} value={val === "0" ? "" : Number(handleValueFormula(tableMeta, 8)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -1358,7 +1358,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1358,7 +1358,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta, 8)).toFixed(1)} value={val === "0" ? "" : Number(handleValueFormula(tableMeta, 8)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -1373,7 +1373,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1373,7 +1373,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(val).toFixed(1)} value={val === "0" ? "" : Number(val).toFixed(1)}
/> />
} }
/> />
...@@ -1415,7 +1415,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1415,7 +1415,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValue(tableMeta, 0)).toFixed(1)} value={val === "0" ? "" : Number(handleValue(tableMeta, 0)).toFixed(1)}
/> />
</span> </span>
: :
...@@ -1432,7 +1432,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1432,7 +1432,7 @@ export default class BalanceSheetRO extends Component {
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={true} disabled={true}
value={Number(val).toFixed(1)} value={val === "0" ? "" : Number(val).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
}} }}
...@@ -1452,7 +1452,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1452,7 +1452,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta, 9)).toFixed(1)} value={val === "0" ? "" : Number(handleValueFormula(tableMeta, 9)).toFixed(1)}
/> />
} }
/> />
...@@ -1472,7 +1472,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1472,7 +1472,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta, 9)).toFixed(1)} value={val === "0" ? "" : Number(handleValueFormula(tableMeta, 9)).toFixed(1)}
/> : /> :
<LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow> <LightTooltip title={this.state.minValue === null ? `Value Should be ${tableMeta.rowData[21]}` : `Value Should be (${this.state.minValue}) up to (${this.state.maxValue})`} arrow>
<NumberFormat <NumberFormat
...@@ -1489,7 +1489,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1489,7 +1489,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta, 9)).toFixed(1)} value={val === "0" ? "" : Number(handleValueFormula(tableMeta, 9)).toFixed(1)}
/> />
</LightTooltip> </LightTooltip>
: :
...@@ -1504,7 +1504,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1504,7 +1504,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(val).toFixed(1)} value={val === "0" ? "" : Number(val).toFixed(1)}
/> />
} }
/> />
...@@ -1563,7 +1563,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1563,7 +1563,7 @@ export default class BalanceSheetRO extends Component {
placeholder="" placeholder=""
// disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)} // disabled={this.props.isApprover? true : (this.state.get_for == 'view'? true : false)}
disabled={this.props.quarter == 'q1'? false : true} disabled={this.props.quarter == 'q1'? false : true}
value={Number(val).toFixed(1)} value={this.props.quarter == 'q2' || this.props.quarter == 'q3'? (val == ""? "" : Number(val).toFixed(1)) : Number(val).toFixed(1) }
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
}} }}
...@@ -1583,7 +1583,7 @@ export default class BalanceSheetRO extends Component { ...@@ -1583,7 +1583,7 @@ export default class BalanceSheetRO extends Component {
type="text" type="text"
placeholder="" placeholder=""
disabled={true} disabled={true}
value={Number(handleValueFormula(tableMeta, 10)).toFixed(1)} value={this.props.quarter == 'q2' || this.props.quarter == 'q3'? (val == ""? "" : Number(handleValueFormula(tableMeta, 10)).toFixed(1)) : Number(handleValueFormula(tableMeta, 10)).toFixed(1)}
/> />
} }
/> />
...@@ -2858,7 +2858,7 @@ export default class BalanceSheetRO extends Component { ...@@ -2858,7 +2858,7 @@ export default class BalanceSheetRO 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} (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%' }}>
...@@ -3087,7 +3087,7 @@ export default class BalanceSheetRO extends Component { ...@@ -3087,7 +3087,7 @@ export default class BalanceSheetRO 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} (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%' }}/>
......
...@@ -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