Commit cba56b9c authored by rifkaki's avatar rifkaki

conflict index

parents 659fdcd1 3f56b6b7
......@@ -245,6 +245,7 @@ const create = (type = "") => {
const getHierarkiCreateReportPLMR = (body) => api.post('/transaction/db_profit_loss/monthly_report/get_report_hierarki', body)
const createReportPLMB = (body) => api.post('/transaction/db_profit_loss/master_budget/create_submission_report', body)
const createReportPLMR = (body) => api.post('/transaction/db_profit_loss/monthly_report/create_monthly_report', body)
const getPLID = (body) => api.post('/transaction/db_profit_loss/get_profit_loss_id', body)
// const getReportPLMB = (body) => api.post('/transaction/db_profit_loss/get_report_hierarki', body)
// const getReportPLMB = (body) => api.post('/transaction/db_profit_loss/get_report_hierarki', body)
const getReportPLMR = (body) => api.post('/transaction/db_profit_loss/monthly_report/get_report_hierarki', body)
......@@ -635,6 +636,7 @@ const create = (type = "") => {
getHierarkiCreateReportPLMR,
createReportPLMB,
createReportPLMR,
getPLID,
getHierarkiReportHistorical
}
}
......
......@@ -621,7 +621,22 @@ export default class SubHolding extends Component {
}
})
} else if (this.state.report.value === 3) {
let payloads = {...payload, months: this.state.month.month_id, quarter: 0}
let PLID = null
let payloadID = {
"periode": this.state.periode.periode,
"company_id": this.state.company.company_id
}
console.log(payloadID);
api.create().getPLID(payloadID).then(response => {
console.log(response);
if (response) {
PLID = response.data.data == null ? null : response.data.data.profit_loss_id
} else {
PLID = null
}
this.setState({ PLID }, () => {
let payloads = {...payload, submission_id: this.state.PLID, months: this.state.month.month_id, quarter: 0}
console.log(payloads);
api.create().getReportPL(payloads).then(response => {
console.log(response);
if (response.data) {
......@@ -796,6 +811,8 @@ export default class SubHolding extends Component {
this.setState({ dataTable: [], previewTable: false, loading: false, previewDownload: false })
}
})
})
})
} else if (this.state.report.value === 4) {
api.create().getReportHierarkiFRMB(payload).then(response => {
// console.log(payload);
......@@ -2737,7 +2754,7 @@ export default class SubHolding extends Component {
}
} else if (this.state.report.value === 3) {
let res = await fetch(
`${process.env.REACT_APP_URL_MAIN_BE}/public/transaction/db_profit_loss/export_report?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/db_profit_loss/export_report?submission_id=${this.state.PLID === null ? "" : this.state.PLID}&&report_id=${this.state.report.value}&&company_id=${this.state.company.company_id}&&year=${this.state.periode.periode}&&revision=${this.state.revisionType}`
)
res = await res.blob()
this.setState({ loading: false })
......
......@@ -141,7 +141,7 @@ export default class TableSummaryTriputra extends Component {
<div className="col-1">
<div className="grid grid-3x content-center">
<div className="col-1">
<div style={{ textAlign: 'right', width: 90 }}>
<div style={{ textAlign: 'right', width: 60 }}>
{val.a}
</div>
</div>
......
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