Commit f9f8d2dd authored by faisalhamdi's avatar faisalhamdi

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

parents 596417ef 90a82d4d
......@@ -260,8 +260,10 @@ const create = (type = "") => {
const createRollingOutlookPL = (body) => api.post('transaction/profit_loss/rolling_outlook/create_rolling_outlook', body)
const checkImportRollingOutlookPL = (body) => api.post('transaction/profit_loss/rolling_outlook/check_import', body)
const importRollingOutlookPL = (body) => api.post('transaction/profit_loss/rolling_outlook/import_rolling_outlook', body)
const getRollingOutlookTP = (body) => api.post('transaction/rolling_outlook/tax_planning/get_report_hierarki', body)
const createRollingOutlookTP = (body) => api.post('transaction/rolling_outlook/tax_planning/store_ro_tax_planning', body)
const getRollingOutlookTP = (body) => api.post('transaction/tax_planning/rolling_outlook/get_report_hierarki', body)
const createRollingOutlookTP = (body) => api.post('transaction/tax_planning/rolling_outlook/create_rolling_outlook', body)
const checkImportRollingOutlookTP = (body) => api.post('transaction/tax_planning/rolling_outlook/check_import', body)
const importRollingOutlookTP = (body) => api.post('transaction/tax_planning/rolling_outlook/import_rolling_outlook', body)
const getRollingOutlookCAT = (body) => api.post('transaction/cat/rolling_outlook/get_report_hierarki', body)
const createRollingOutlookCAT = (body) => api.post('transaction/cat/rolling_outlook/create_rolling_outlook', body)
const checkImportRollingOutlookCAT = (body) => api.post('transaction/cat/rolling_outlook/check_import', body)
......@@ -274,6 +276,7 @@ const create = (type = "") => {
const checkUploadRollingOutlookOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/check_import', body)
const uploadRollingOutlookOI = (body) => api.post('transaction/operating_indicator/rolling_outlook/import_rolling_outlook', body)
const submitRollingOutlook = (body) => api.post('transaction/rolling_outlook/submit_rolling_outlook', body)
const getRollingOutlookCompanySubmitted = (body) => api.post('transaction/rolling_outlook/get_company_submitted', body)
//REPORT NEW
const getAllReportBS = (body) => api.post('/transaction/db_balance_sheet/get_report_hierarki', body)
......@@ -346,8 +349,9 @@ const create = (type = "") => {
const uploadAttOLPA = (body) => api.post('transaction/outlook_pa/upload_attachment', body)
const deleteAttOLPA = (id) => api.post(`transaction/outlook_pa/delete_attachment/${id}`)
const getReportOLPA = (body) => api.post('transaction/outlook_pa/get_all_report', body)
const approvalSubmissionOLPA = (body) => api.post('transaction/outlook_pa/approval_submission', body)
const approvalSubmissionOLPA = (body) => api.post('transaction/outlook_pa/approval_outlook', body)
const checkApproverOLPA = () => api.get('transaction/outlook_pa/is_approver')
const createPeriodeRevisionOLPA = (body) => api.post('transaction/outlook_pa/create_periode_revision', body)
// Monthly
const getMonthlyReport = (body) => api.post('transaction/monthly_report/get_all_report', body)
......@@ -729,6 +733,8 @@ const create = (type = "") => {
createRollingOutlookBS,
getRollingOutlookTP,
createRollingOutlookTP,
checkImportRollingOutlookTP,
importRollingOutlookTP,
getAllMasterDataCat,
getParentItemReport,
saveMasterDataCat,
......@@ -762,7 +768,9 @@ const create = (type = "") => {
getLastestUpdateROOI,
checkUploadRollingOutlookOI,
uploadRollingOutlookOI,
submitRollingOutlook
submitRollingOutlook,
getRollingOutlookCompanySubmitted,
createPeriodeRevisionOLPA
}
}
......
......@@ -492,7 +492,7 @@ export default class MonthlyReport extends Component {
"months": this.state.month.month_id,
"status": selectedStatus
}
this.setState({ isApprovedMB: true })
// this.setState({ isApprovedMB: true })
api.create().getCompanySubmittedMonthly(body).then(response => {
console.log(response);
if (response.data) {
......
......@@ -564,7 +564,7 @@ export default class OperatingIndicator extends Component {
{this.state.visibleOperatingIndicator && (
<div>
<div className={"main-color"} style={{ height: 78, display: 'flex', alignItems: 'center', paddingLeft: 20 }}>
<Typography style={{ fontSize: '16px', color: 'white' }}>Operating Indicator</Typography>
<Typography style={{ fontSize: '16px', color: 'white' }}>Operating Indicator Submission</Typography>
</div>
<div style={{ padding: 20, width: '100%' }}>
<Paper style={{ paddingTop: 10 }}>
......
......@@ -99,7 +99,7 @@ export default class OutlookPA extends Component {
"periode": this.state.periode.periode
}
api.create().getCompanySubmittedOLPA(body).then(response => {
// console.log(response);
console.log(response);
if (response.data) {
if (response.data.status === 'success') {
let data = response.data.data
......@@ -233,7 +233,7 @@ export default class OutlookPA extends Component {
getCompanyActive() {
api.create().getPerusahaanActive().then((response) => {
// console.log(response);
console.log(response);
if (response.data) {
if (response.data.status === 'success') {
let data = response.data.data
......@@ -291,8 +291,9 @@ export default class OutlookPA extends Component {
getLastPeriod() {
api.create().getLastPeriodOLPA(this.state.company.company_id).then(response => {
// console.log(response);
let currentYear = new Date().getFullYear()
if (response.data.status === "success") {
this.setState({ lastPeriod: response.data.data.last_periode, latestPeriode: response.data.data.latest_periode }, () => {
this.setState({ lastPeriod: Number(response.data.data.last_periode) < Number(currentYear)? String(currentYear) : response.data.data.last_periode, latestPeriode: response.data.data.latest_periode }, () => {
this.getPeriode()
})
}
......@@ -314,7 +315,7 @@ export default class OutlookPA extends Component {
data.push(item)
}
} else {
if ((item >= 2000) && (item == Number(this.state.lastPeriod) + 1 || item < Number(this.state.lastPeriod) + 1)) {
if ((item >= 2000) && (item == Number(this.state.lastPeriod) || item < Number(this.state.lastPeriod))) {
data.push(item)
}
}
......@@ -328,7 +329,7 @@ export default class OutlookPA extends Component {
options: periodeData,
getOptionLabel: (option) => option.periode,
};
let periode = (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : Number(this.state.lastPeriod) + 1)
let periode = (this.state.lastPeriod == "" ? String(Number(currentYear) + 1) : Number(this.state.lastPeriod))
let index = data.sort((a, b) => a - b).findIndex((val) => val == periode)
// console.log(data)
// console.log(this.state.lastPeriod)
......@@ -449,13 +450,13 @@ export default class OutlookPA extends Component {
"max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD')
}
// console.log(payload)
api.create().approvalSubmission(body).then((res) => {
// console.log(res)
api.create().approvalSubmissionOLPA(body).then((res) => {
console.log(res)
this.setState({ loading: false }, () => {
this.getSubmission()
this.getOutlookPAID()
})
if (type == 'revision') {
api.create().createPeriodeRevision(payload).then((res) => console.log(res))
api.create().createPeriodeRevisionOLPA(payload).then((res) => console.log(res))
}
})
}
......
......@@ -144,6 +144,7 @@ export default class BalanceSheetOLPA extends Component {
"outlook_pa_id": this.props.outlook_pa_id,
"report_id": this.props.report_id,
"revision": this.props.revision,
"get_for": this.state.get_for,
"periode": this.props.periode,
"company_id": this.props.company.company_id
}
......
......@@ -122,6 +122,7 @@ export default class ProfitLossOLPA extends Component {
let payload = {
"report_id": this.props.report_id,
"revision": Number(this.props.revision),
"get_for": this.state.get_for,
"periode": this.props.periode,
"company_id": this.props.company.company_id,
"outlook_pa_id": this.props.outlook_pa_id
......
......@@ -146,6 +146,7 @@ export default class TaxPlanningOLPA extends Component {
let payload = {
"outlook_pa_id": this.props.outlook_pa_id,
"report_id": this.props.report_id,
"get_for": this.state.get_for,
"revision": this.props.revision,
"periode": this.props.periode,
"company_id": this.props.company.company_id
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
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