Commit ac9047de authored by Riri Novita's avatar Riri Novita

Fixing Issue MB

parent 744102c0
......@@ -3457,7 +3457,11 @@ export default class BalanceSheet extends Component {
<div>
<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' }}>in IDR mn</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
<div style={{ width: '50%' }}>
{this.state.dataTable.length == 0 ? null : this.props.isApprover == true ?
......@@ -3671,7 +3675,11 @@ export default class BalanceSheet extends Component {
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
{this.state.dataLoaded && (
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
......
......@@ -360,7 +360,7 @@ export default class BudgetTahunan extends Component {
}
})
// // // console.log(dataTableRevision);
this.setState({ dataTable, dataTableRevision: dataTableRevision.sort((a, b) => a.number - b.number), dataForRevision: response.data.data }, () => {
this.setState({ loading: false, dataTable, dataTableRevision: dataTableRevision.sort((a, b) => a.number - b.number), dataForRevision: response.data.data }, () => {
document.body.style.overflow = 'unset';
})
}
......@@ -627,6 +627,11 @@ export default class BudgetTahunan extends Component {
console.log(response)
if (response.data) {
if (response.data.status === "success") {
if (type === "CAT") {
this.setState({ visibleCAT: false, visibleBudgetTahunan: true, loading: false })
} else {
this.setState({ visibleBudgetTahunan: true, loading: false })
}
this.setState({
submissionID: response.data.data.submission_id,
submitter: response.data.data.submitter,
......@@ -634,7 +639,7 @@ export default class BudgetTahunan extends Component {
lastStatus: response.data.data.last_status === null ? 'SUBMIT' : response.data.data.last_status,
lastRevision: response.data.data.last_revision,
btnApprove: response.data.data.is_submit,
// loading: false
loading: false
}, () => {
// // console.log(response.data.data.is_submit);
// // console.log(this.state.btnApprove)
......@@ -2339,15 +2344,16 @@ export default class BudgetTahunan extends Component {
if (response.ok) {
if (response.data.status === 'success') {
if (type === "PL" || "DraftPL") {
this.setState({ visiblePL: false, visibleBudgetTahunan: true })
this.setState({ visiblePL: false, visibleBudgetTahunan: true, loading: false })
console.log(this.state.loading);
} else if (type === "TP") {
this.setState({ visibleTP: false, visibleBudgetTahunan: true })
this.setState({ visibleTP: false, visibleBudgetTahunan: true,loading: false })
} else if (type === "BS") {
this.setState({ visibleBS: false, visibleBudgetTahunan: true })
this.setState({ visibleBS: false, visibleBudgetTahunan: true, loading: false })
} else if (type === "FAM") {
this.setState({ visibleFAM: false, visibleBudgetTahunan: true })
this.setState({ visibleFAM: false, visibleBudgetTahunan: true, loading: false })
} else if (type === "CAT") {
this.setState({ visibleFAM: false, visibleBudgetTahunan: true })
this.setState({ visibleFAM: false, visibleBudgetTahunan: true, loading: false })
} else {
this.setState({ visibleBudgetTahunan: true, loading: false })
}
......
......@@ -442,7 +442,7 @@ export default class CashFlow extends Component {
// let valuezzz = dataTable2[tableMeta.rowIndex][7].value
// forecastt += Number(valuezzz == "" ? 0 : valuezzz)
// } else {
forecastt += Number(valuezz == "" ? 0 : valuezz)
forecastt += Number(valuezz == "" ? 0 : valuezz)
// }
}
}
......@@ -458,7 +458,7 @@ export default class CashFlow extends Component {
// let valuezzz = dataTable2[tableMeta.rowIndex + 1][19]
// forecastt += Number(valuezzz == "" ? 0 : valuezzz)
// } else {
forecastt += Number(valuezz == "" ? 0 : valuezz)
forecastt += Number(valuezz == "" ? 0 : valuezz)
// }
}
}
......@@ -473,7 +473,7 @@ export default class CashFlow extends Component {
// let valuezzz = dataTable2[tableMeta.rowIndex + 1][20]
// forecastt += Number(valuezzz == "" ? 0 : valuezzz)
// } else {
forecastt += Number(valuezz == "" ? 0 : valuezz)
forecastt += Number(valuezz == "" ? 0 : valuezz)
// }
}
}
......@@ -497,7 +497,7 @@ export default class CashFlow extends Component {
// let valuezzz = dataTable2[tableMeta.rowIndex + 1][data].value
// anjay.push(valuezzz == "" ? 0 : valuezzz)
// } else {
anjay.push(valuezz == "" ? 0 : valuezz)
anjay.push(valuezz == "" ? 0 : valuezz)
// }
}
}
......@@ -2896,7 +2896,7 @@ export default class CashFlow extends Component {
options: {
display: false
}
},
},
// {
// name: "",
// options: {
......@@ -3045,24 +3045,24 @@ export default class CashFlow extends Component {
// />
// </LightTooltip>
// :
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
// value={Number(handleFYTotal(tableMeta)).toFixed(1)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
value={value}
/>
}
/>
</div>}
<div style={{ flex: 1 }}>
<FormControlLabel
style={{ margin: 0 }}
value={value}
control={
<NumberFormat
thousandSeparator={true}
style={{ fontSize: 12, textAlign: 'right', borderColor: 'transparent', margin: 0, width: 96, backgroundColor: 'transparent' }}
type="text"
placeholder=""
disabled={true}
// value={Number(handleFYTotal(tableMeta)).toFixed(1)}
// value={Number(handleForecast(tableMeta, `${Number(this.props.periode) + 1}`, 20)).toFixed(1)}
value={value}
/>
}
/>
</div>}
</div>
)
}
......@@ -3277,7 +3277,11 @@ export default class CashFlow extends Component {
<div>
<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' }}>in IDR mn</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
{/* <div style={{ width: '50%' }}>
<div style={{ justifyContent: 'flex-end', display: 'flex', flexFlow: 'wrap' }}>
......
......@@ -647,7 +647,7 @@ export default class CorporateAnnualTarget extends Component {
})
let body = {
"report_id": this.props.report_id,
// "revision": Number(this.props.revision),
// "revision": Number(this.props.revision),
"periode": this.props.periode,
"company_id": this.props.company.company_id,
"submission_id": this.props.submissionID,
......@@ -663,10 +663,11 @@ export default class CorporateAnnualTarget extends Component {
if (response.ok) {
if (response.data.status === "success") {
if (type == 'submitted') {
this.props.saveToMasterBudget(body, 'CAT')
this.props.getReport(body, 'CAT')
} else {
this.props.saveToMasterBudget(body)
this.props.getReport(body)
}
this.setState({ loading: false})
// this.props.onClickClose()
// this.props.getReport()
} else {
......@@ -1362,7 +1363,7 @@ export default class CorporateAnnualTarget extends Component {
// // // console.log(total)
total = R.equals(total, NaN) ? "0.0" : total
console.log(total);
// console.log(total);
// if (dataTable2[tableMeta.rowIndex][6] == "ROIC") {
// if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value == undefined) {
// dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = "0"
......@@ -3777,7 +3778,11 @@ export default class CorporateAnnualTarget extends Component {
<div>
<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' }}>in IDR mn</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
<div style={{ width: '50%' }}>
{this.state.dataTable.length == 0 ? null : this.props.isApprover == true ?
......@@ -3983,7 +3988,11 @@ export default class CorporateAnnualTarget extends Component {
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
{this.state.dataLoaded && (
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
......
......@@ -2636,7 +2636,11 @@ export default class FixedAssetsMovement extends Component {
<div>
<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' }}>in IDR mn</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
<div style={{ width: '50%' }}>
{this.state.dataTable.length == 0 ? null : this.props.isApprover == true ?
......@@ -2852,7 +2856,11 @@ export default class FixedAssetsMovement extends Component {
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
{this.state.dataLoaded && (
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
......
......@@ -107,6 +107,7 @@ export default class ProfitLoss extends Component {
}
getItemHierarki() {
console.log(this.props);
this.setState({ loading: true, judulColumn: null })
let payload = {
"report_id": this.props.report_id,
......@@ -471,9 +472,9 @@ export default class ProfitLoss extends Component {
}
} else {
if (response.data.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: true})
this.setState({ visibleAlertSave: true })
} else {
this.setState({alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
......@@ -2863,7 +2864,12 @@ export default class ProfitLoss extends Component {
<div>
<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' }}>in IDR mn</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
<div style={{ width: '50%' }}>
{this.state.dataTable.length == 0 ? null : this.props.isApprover == true ?
......@@ -3049,7 +3055,7 @@ export default class ProfitLoss extends Component {
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
:
this.state.handleDoubleClick == 1 ? null :
this.setState({ handleDoubleClick: 1 }, () => {
this.setState({ handleDoubleClick: 1, loading: true }, () => {
this.backToMasterBudget('submitted')
})}
style={{
......@@ -3074,7 +3080,11 @@ export default class ProfitLoss extends Component {
<div>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>{this.props.company.company_name}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>Period : {this.props.periode}</Typography>
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
{this.state.dataLoaded && (
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
......
......@@ -8962,7 +8962,11 @@ export default class TaxPlanning extends Component {
<div>
<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' }}>in IDR mn</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
<div style={{ width: '50%' }}>
{this.state.dataTable.length == 0 ? null : this.props.isApprover == true ?
......@@ -9153,7 +9157,7 @@ export default class TaxPlanning extends Component {
this.setState({ alert: true, messageAlert: 'Data is not complete !', tipeAlert: 'warning' })
:
this.state.handleDoubleClick == 1 ? null :
this.setState({ handleDoubleClick: 1, loading: true }, () => {
this.setState({ handleDoubleClick: 1 }, () => {
setTimeout(() => {
this.backToMasterBudget('submitted')
}, 100);
......@@ -9181,7 +9185,11 @@ export default class TaxPlanning extends Component {
<div>
<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' }}>in IDR mn</Typography>
{this.props.defaultCurrency.id === 1 ?
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
:
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in USD thousand</Typography>
}
</div>
{this.state.dataLoaded && (
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
......
......@@ -3426,7 +3426,7 @@ export default class TaxPlanningOLPA extends Component {
this.setState({ alert: true, messageAlert: 'Data Incomplete', tipeAlert: 'error' })
:
this.state.handleDoubleClick == 1 ? null :
this.setState({ handleDoubleClick: 1, loading: true }, () => {
this.setState({ handleDoubleClick: 1 }, () => {
setTimeout(() => {
this.backToMasterBudget('submitted')
}, 100);
......
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