Commit 82a303cb authored by ardiansyah's avatar ardiansyah

Merge branch 'ENV-DEV' into 'ENV-STAGING'

Env dev

See merge request !1963
parents 29b8ff7a 5c7b4dd1
......@@ -630,7 +630,7 @@ export default class CreateParameter extends Component {
createParameter() {
let char = this.state.value
let arrayChar = char.split('');
// console.log(char);
console.log(char);
let body = {
"setting_group_id": this.state.getTypes.setting_group_id,
"setting_type_id": this.state.getParameter.setting_type_id,
......@@ -640,7 +640,7 @@ export default class CreateParameter extends Component {
"orders": this.state.order,
"value": this.state.value,
// convert IDR to IDR mn
"value": this.state.enableReportName ? this.state.value.includes(".") || arrayChar.length == 2 ? this.state.value : Number((this.state.value)/1000).toFixed(1) : this.state.value ,
"value": this.state.enableReportName ? this.state.value.includes(".") || arrayChar.length == 2 ? this.state.value : this.state.value/1000 : this.state.value ,
"max_value": this.state.maxValue,
"min_value": this.state.minValue,
"start_date": this.state.startDate,
......
......@@ -509,7 +509,8 @@ export default class CorporateAnnualTargetMR extends Component {
console.log(response);
if (response.data) {
if (response.data.status === "success") {
this.props.onClickClose()
this.props.saveToMonthlyReport()
// this.props.onClickClose()
// this.props.getReport()
} else {
this.setState({ visibleAlertSave: true, alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false }, () => {
......@@ -876,9 +877,9 @@ export default class CorporateAnnualTargetMR extends Component {
let perfomanceScoreColor = '#fff'
if (listPerfomanceDefault.length > 0) {
listPerfomanceDefault.map((item, index) => {
console.log(Number(lastTotal))
console.log(Number(item.min_value))
console.log(Number(item.max_value))
// console.log(Number(lastTotal))
// console.log(Number(item.min_value))
// console.log(Number(item.max_value))
if (Number(lastTotal) >= Number(item.min_value) && Number(lastTotal) <= Number(item.max_value)) {
console.log('masuk')
perfomanceScore = item.description
......@@ -1434,7 +1435,7 @@ export default class CorporateAnnualTargetMR extends Component {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(totalScore).toFixed(2)
if (tableMeta.rowIndex == dataTable2.length - 1) {
someXXX = Number(totalScore).toFixed(2)
console.log(someXXX)
// console.log(someXXX)
}
return null
} else {
......
......@@ -427,6 +427,7 @@ export default class SubHolding extends Component {
}
getReportType() {
console.log(this.state.defaultCurrency);
let payload = {
"company_id": this.state.company.company_id,
"periode": this.state.periode.periode,
......@@ -4161,23 +4162,29 @@ export default class SubHolding extends Component {
a.click();
}
} else if (this.state.report.value === 6) {
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_cash_flow/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=6&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&months=${this.state.month.month_id}&&quarter=1&&currency_id=${this.state.defaultCurrency.id}`
console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_cash_flow/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=6&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&months=${this.state.month.month_id}&&quarter=1&&currency_id=${this.state.defaultCurrency.id}`
)
res = await res.blob()
this.setState({ loading: false })
if (res.size > 0) {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
a.href = url;
a.download = `Report Cash Flow - Summary ${company.company_name} ${month.month_value} ${periode.periode}.xlsx`;
a.click();
try {
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_cash_flow/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=6&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&months=${this.state.month.month_id}&&quarter=1&&currency_id=${this.state.defaultCurrency.id}`
console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_cash_flow/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=6&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&months=${this.state.month.month_id}&&quarter=1&&currency_id=${this.state.defaultCurrency.id}`
)
res = await res.blob()
this.setState({ loading: false })
if (res.size > 0) {
let url = window.URL.createObjectURL(res);
let a = document.createElement('a');
a.href = url;
a.download = `Report Cash Flow - Summary ${company.company_name} ${month.month_value} ${periode.periode}.xlsx`;
a.click();
}
} catch (error) {
alert(error)
this.setState({ loading: false })
}
} else if (this.state.report.value === 7) {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_balance_sheet/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=2&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&months=${this.state.month.month_id}&&quarter=1`
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_balance_sheet/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=2&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&months=${this.state.month.month_id}&&quarter=1&&currency_id=${this.state.defaultCurrency.id}`
)
res = await res.blob()
this.setState({ loading: false })
......@@ -4189,10 +4196,10 @@ export default class SubHolding extends Component {
a.click();
}
} else if (this.state.report.value === 8) {
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_profit_loss/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=28&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&months=${this.state.month.month_id}&&quarter=1`
let url = `${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_profit_loss/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=28&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&months=${this.state.month.month_id}&&quarter=1&&currency_id=${this.state.defaultCurrency.id}`
console.log(url);
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_profit_loss/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=28&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&months=${this.state.month.month_id}&&quarter=1`
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_profit_loss/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=28&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&months=${this.state.month.month_id}&&quarter=1&&currency_id=${this.state.defaultCurrency.id}`
)
res = await res.blob()
this.setState({ loading: false })
......@@ -4205,7 +4212,7 @@ export default class SubHolding extends Component {
}
} else if (this.state.report.value === 9) {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_ratio/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=1&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&months=${this.state.month.month_id}&&quarter=1`
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/summary_ratio/export_report?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=1&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&months=${this.state.month.month_id}&&quarter=1&&currency_id=${this.state.defaultCurrency.id}`
)
res = await res.blob()
this.setState({ loading: false })
......@@ -4218,7 +4225,7 @@ export default class SubHolding extends Component {
}
} else if (this.state.report.value === 11) {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cat/quarterly/export_report?report_id=10&&company_id=${this.state.company.company_id}&&periode=${this.state.periode.periode}&&quarter=${this.state.quarter.name}`
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cat/quarterly/export_report?report_id=10&&company_id=${this.state.company.company_id}&&periode=${this.state.periode.periode}&&quarter=${this.state.quarter.name}&&currency_id=${this.state.defaultCurrency.id}`
)
console.log(res);
res = await res.blob()
......@@ -4232,7 +4239,7 @@ export default class SubHolding extends Component {
}
} else if (this.state.report.value === 10) {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cat/performance_appraisal/export?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}`
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/cat/performance_appraisal/export?submission_id=${this.state.submissionID === null ? "" : this.state.submissionID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}&&currency_id=${this.state.defaultCurrency.id}`
)
res = await res.blob()
this.setState({ loading: false })
......
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