Commit 0e508cb7 authored by Riri Novita's avatar Riri Novita

Merge branch 'dev/riri' into 'ENV-DEV'

Update Stopper

See merge request !1824
parents 4c00357c ae4c89f8
......@@ -667,7 +667,8 @@ export default class BudgetTahunan extends Component {
"report": 'ratio',
"submissionId": this.state.submissionID,
"periode": this.state.periode.periode,
"companyId": this.state.company.company_id
"companyId": this.state.company.company_id,
"currency_id": this.state.defaultCurrency.id,
}
// console.log(bodyRatioBs);
api.create().triggerRatioMB(bodyRatioBs).then((res) => {
......@@ -725,6 +726,7 @@ export default class BudgetTahunan extends Component {
"revision": Number(this.state.lastRevision),
"periode": this.state.periode.periode,
"company_id": this.state.company.company_id,
"currency_id": this.state.defaultCurrency.id,
"submission_id": this.state.submissionID
}
api.create().getDetailReportCF(payload).then(response => {
......@@ -1350,6 +1352,7 @@ export default class BudgetTahunan extends Component {
"periode": this.state.periode.periode,
"company_id": this.state.company.company_id,
"submission_id": this.state.PLID,
"currency_id": this.state.defaultCurrency.id,
"months": 0,
"quarter": 0,
}
......@@ -1811,6 +1814,7 @@ export default class BudgetTahunan extends Component {
"report_id": 28,
"status": "submitted",
"profit_loss_id": this.state.PLID,
"currency_id": this.state.defaultCurrency.id,
"profit_loss_mb": this.state.dbPL,
"months": 0,
}
......@@ -1857,6 +1861,7 @@ export default class BudgetTahunan extends Component {
"revision": Number(this.state.lastRevision),
"periode": this.state.periode.periode,
"company_id": this.state.company.company_id,
"currency_id": this.state.defaultCurrency.id,
"submission_id": this.state.submissionID,
}
api.create().getHierarkiCreateReportFRMB(payload).then(response => {
......@@ -2068,6 +2073,7 @@ export default class BudgetTahunan extends Component {
"report_id": 29,
"status": "submitted",
"ratio_id": this.state.FRID,
"currency_id": this.state.defaultCurrency.id,
"ratio_mb": this.state.dbFR,
"months": 0,
}
......
......@@ -777,6 +777,7 @@ export default class FixedAssetsMovementMR extends Component {
}
const handleVariance = (tableMeta, dex, type) => {
console.log(tableMeta);
let total = 0
// if (dex === 1) {
// total = Number(tableMeta.rowData[8]) - Number(tableMeta.rowData[9]) == NaN? "0.0" : Number(tableMeta.rowData[8]) - Number(tableMeta.rowData[9])
......
......@@ -737,7 +737,8 @@ export default class MonthlyReport extends Component {
"monthlyReportId": this.state.monthlyReportId,
"periode": this.state.periode.periode,
"companyId": this.state.company.company_id,
"months": this.state.month.month_id
"months": this.state.month.month_id,
"currency_id": this.state.defaultCurrency.id
}
api.create().triggerHistoricalRatio(bodyRatioLocf).then((res) => {
console.log(res)
......@@ -749,7 +750,8 @@ export default class MonthlyReport extends Component {
"monthlyReportId": this.state.monthlyReportId,
"periode": this.state.periode.periode,
"companyId": this.state.company.company_id,
"months": this.state.month.month_id
"months": this.state.month.month_id,
"currency_id": this.state.defaultCurrency.id
}
api.create().triggerRatioFromLOCF(bodyRatioBs).then((res) => {
console.log(res)
......@@ -1537,7 +1539,8 @@ export default class MonthlyReport extends Component {
let PLID = null
let payloadID = {
"periode": this.state.periode.periode,
"company_id": this.state.company.company_id
"company_id": this.state.company.company_id,
"currency_id": this.state.defaultCurrency.id
}
console.log(payloadID);
api.create().getPLID(payloadID).then(response => {
......@@ -1555,7 +1558,8 @@ export default class MonthlyReport extends Component {
"months": this.state.month.month_id,
"quarter": 0,
"report_id": 28,
"submission_id": this.state.PLID
"submission_id": this.state.PLID,
"currency_id": this.state.defaultCurrency.id
}
api.create().getHierarkiCreateReportPLMR(payload).then((response) => {
......@@ -1950,7 +1954,8 @@ export default class MonthlyReport extends Component {
"months": this.state.month.month_id,
"quarter": 0,
"profit_loss_id": this.state.PLID,
"profit_loss_mr": this.state.dbPL
"profit_loss_mr": this.state.dbPL,
"currency_id": this.state.defaultCurrency.id
}
api.create().createReportPLMR(payload).then((res) => {
console.log(res)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -420,19 +420,23 @@ export default class ProfitLossMR extends Component {
this.props.saveToMonthlyReport()
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => {
document.body.style.overflow = 'unset';
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
this.props.saveToMonthlyReport()
})
if (response.data?.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: true })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => {
document.body.style.overflow = 'unset';
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
this.props.saveToMonthlyReport()
})
}
}
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 })
this.setState({ alert: true, messageAlert: "Error saving data. Please try again", tipeAlert: 'warning', loading: false, handleDoubleClick: 0 })
}
})
}
......@@ -482,6 +486,7 @@ export default class ProfitLossMR extends Component {
...this.state.payload,
currency_id: this.state.defaultCurrencyUpload?.id
}
console.log(this.props.monthlyReportId);
api.create().checkUploadMonthlyReportPL(payload).then(response => {
// console.log(JSON.stringify(this.state.payload));
console.log(response)
......@@ -594,14 +599,18 @@ export default class ProfitLossMR extends Component {
// this.props.onClickClose()
// this.props.getReport()
} else {
this.setState({ visibleAlertSave: true, alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
if (response.data?.message == "Please Set Up Rate Currency First") {
this.setState({ visibleAlertSave: true })
} else {
this.setState({ alert: true, messageAlert: response.data.message, tipeAlert: 'warning', loading: false, handleDoubleClick: 0 }, () => {
if (response.data.message.includes("Someone Logged In") || response.data.message.includes("Token Expired")) {
setTimeout(() => {
localStorage.removeItem(Constant.TOKEN)
window.location.reload();
}, 1000);
}
})
}
// alert(response.data.status)
}
} else {
......@@ -665,9 +674,9 @@ export default class ProfitLossMR extends Component {
"currency_id": this.props.defaultCurrency.id,
"profit_loss": data
}
// console.log(JSON.stringify(payload));
console.log(JSON.stringify(payload));
api.create().validateSubmitReportPL(payload).then((response) => {
console.log(response.data.data.result)
console.log(response)
console.log(err);
if (response.data) {
if (response.data.status === "success") {
......@@ -2472,7 +2481,7 @@ export default class ProfitLossMR extends Component {
marginRight: 20,
borderRadius: 9
}}
onClick={() => this.setState({ visibleAlertSave: false })}
onClick={() => this.setState({ visibleAlertSave: false, loading: false })}
>
<div style={{ backgroundColor: '#fff', width: 105, height: 30, borderRadius: 9, justifyContent: 'center', display: 'flex', alignItems: 'center', border: 'solid 1px #3549609e' }}>
<Typography style={{ fontSize: '15px', color: '#354960', textAlign: 'center' }}>Close</Typography>
......
......@@ -625,7 +625,8 @@ export default class OutlookPA extends Component {
"report": 'ratio',
"outlookPaId": this.state.outlook_pa_id,
"companyId": this.state.company.company_id,
"periode": this.state.periode.periode
"periode": this.state.periode.periode,
"currency_id": this.state.defaultCurrency.id,
}
api.create().triggerRatioOLPA(bodyRatioOLPA).then((res) => {
console.log(res)
......@@ -993,7 +994,8 @@ export default class OutlookPA extends Component {
let PLID = null
let payloadID = {
"periode": this.state.periode.periode,
"company_id": this.state.company.company_id
"company_id": this.state.company.company_id,
"currency_id": this.state.defaultCurrency.id,
}
console.log(payloadID);
api.create().getPLID(payloadID).then(response => {
......@@ -1010,6 +1012,7 @@ export default class OutlookPA extends Component {
"periode": this.state.periode.periode,
"company_id": this.state.company.company_id,
"outlook_pa_id": this.state.PLID,
"currency_id": this.state.defaultCurrency.id,
}
api.create().getHierarkiDBPLOLPA(payload).then(response => {
// console.log(response);
......@@ -1470,6 +1473,7 @@ export default class OutlookPA extends Component {
"status": "submitted",
"profit_loss_id": this.state.PLID,
"profit_loss_olpa": this.state.dbPL,
"currency_id": this.state.defaultCurrency.id,
}
console.log(this.state.dbPL)
// console.log(JSON.stringify(payload))
......
......@@ -52,7 +52,12 @@ export default class OperatingIndicatorRO extends Component {
judulColumn: null,
saveDraft: true,
viewOnly: true,
get_for: 'view'
get_for: 'view',
defaultCurrencyUpload: this.props.defaultCurrency,
visibleAlertSave: false,
alert: false,
tipeAlert: '',
messageAlert: '',
}
this.handleValue = this.handleValue.bind(this)
this.fileHandler = this.fileHandler.bind(this);
......@@ -152,7 +157,8 @@ export default class OperatingIndicatorRO extends Component {
"company_id": this.props.data.company.company_id,
"periode": this.props.data.periode,
"quartal": this.props.quartal,
"get_for": this.state.get_for
"get_for": this.state.get_for,
"currency_id": this.props.defaultCurrency.id,
}
console.log(payload)
api.create().getHierarkiRollingOI(payload).then(response => {
......@@ -274,6 +280,7 @@ export default class OperatingIndicatorRO extends Component {
"company_id": this.props.data.company.company_id,
"periode": this.props.data.periode,
"quartal": this.props.quartal,
"currency_id": this.props.defaultCurrency.id,
"status": type,
"rolling_outlook": payloadRO
}
......
......@@ -331,7 +331,8 @@ export default class RollingOutlook extends Component {
"company_id": this.state.company.company_id,
"periode": this.state.periode.periode,
"report_type": "Rolling Outlook",
"quartal": this.state.quarter.value
"quartal": this.state.quarter.value,
"currency_id": this.state.defaultCurrency.id
}
let dataHardcode = []
api.create().getRollingOutlookReport(payload).then(response => {
......@@ -659,7 +660,8 @@ export default class RollingOutlook extends Component {
"rollingOutlookId": this.state.rollingOutlookID,
"periode": this.state.periode.periode,
"companyId": this.state.company.company_id,
"quartal": this.state.quarter.value
"quartal": this.state.quarter.value,
"currency_id": this.state.defaultCurrency.id
}
api.create().triggerRatioRO(bodyRatioBs).then((res) => {
console.log(res)
......@@ -1017,7 +1019,8 @@ export default class RollingOutlook extends Component {
let PLID = null
let payloadID = {
"periode": this.state.periode.periode,
"company_id": this.state.company.company_id
"company_id": this.state.company.company_id,
"currency_id": this.state.defaultCurrency.id
}
console.log(payloadID);
api.create().getPLID(payloadID).then(response => {
......@@ -1035,6 +1038,7 @@ export default class RollingOutlook extends Component {
"company_id": this.state.company.company_id,
"quartal": this.state.quarter.value,
"rolling_outlook_id": this.state.PLID,
"currency_id": this.state.defaultCurrency.id
}
api.create().getHierarkiDBPLRO(payload).then(response => {
// console.log(response);
......@@ -1496,6 +1500,7 @@ export default class RollingOutlook extends Component {
"profit_loss_id": this.state.PLID,
"profit_loss_ro": this.state.dbPL,
"quartal": this.state.quarter.value,
"currency_id": this.state.defaultCurrency.id
}
console.log(this.state.dbPL)
// console.log(JSON.stringify(payload))
......
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