Commit c9bab51f authored by r.kurnia's avatar r.kurnia

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

parents 00221fd1 1615c9fb
...@@ -349,8 +349,9 @@ const create = (type = "") => { ...@@ -349,8 +349,9 @@ const create = (type = "") => {
const uploadAttOLPA = (body) => api.post('transaction/outlook_pa/upload_attachment', body) const uploadAttOLPA = (body) => api.post('transaction/outlook_pa/upload_attachment', body)
const deleteAttOLPA = (id) => api.post(`transaction/outlook_pa/delete_attachment/${id}`) const deleteAttOLPA = (id) => api.post(`transaction/outlook_pa/delete_attachment/${id}`)
const getReportOLPA = (body) => api.post('transaction/outlook_pa/get_all_report', body) 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 checkApproverOLPA = () => api.get('transaction/outlook_pa/is_approver')
const createPeriodeRevisionOLPA = (body) => api.post('transaction/outlook_pa/create_periode_revision', body)
// Monthly // Monthly
const getMonthlyReport = (body) => api.post('transaction/monthly_report/get_all_report', body) const getMonthlyReport = (body) => api.post('transaction/monthly_report/get_all_report', body)
...@@ -768,7 +769,8 @@ const create = (type = "") => { ...@@ -768,7 +769,8 @@ const create = (type = "") => {
checkUploadRollingOutlookOI, checkUploadRollingOutlookOI,
uploadRollingOutlookOI, uploadRollingOutlookOI,
submitRollingOutlook, submitRollingOutlook,
getRollingOutlookCompanySubmitted getRollingOutlookCompanySubmitted,
createPeriodeRevisionOLPA
} }
} }
......
...@@ -311,7 +311,7 @@ export default class OutlookPA extends Component { ...@@ -311,7 +311,7 @@ export default class OutlookPA extends Component {
let data = [] let data = []
response.data.data.map((item) => { response.data.data.map((item) => {
if (this.state.isApprover) { if (this.state.isApprover) {
if (item >= 2000 && item <= (Number(currentYear))) { if (item >= 2000 && item <= (Number(currentYear) + 1)) {
data.push(item) data.push(item)
} }
} else { } else {
...@@ -329,7 +329,7 @@ export default class OutlookPA extends Component { ...@@ -329,7 +329,7 @@ export default class OutlookPA extends Component {
options: periodeData, options: periodeData,
getOptionLabel: (option) => option.periode, getOptionLabel: (option) => option.periode,
}; };
let periode = (this.state.lastPeriod == "" ? String(Number(currentYear)) : Number(this.state.lastPeriod)) 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) let index = data.sort((a, b) => a - b).findIndex((val) => val == periode)
// console.log(data) // console.log(data)
// console.log(this.state.lastPeriod) // console.log(this.state.lastPeriod)
...@@ -450,13 +450,13 @@ export default class OutlookPA extends Component { ...@@ -450,13 +450,13 @@ export default class OutlookPA extends Component {
"max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD') "max_periode": moment(this.state.maxDateRevision).format('YYYY-MM-DD')
} }
// console.log(payload) // console.log(payload)
api.create().approvalSubmission(body).then((res) => { api.create().approvalSubmissionOLPA(body).then((res) => {
// console.log(res) console.log(res)
this.setState({ loading: false }, () => { this.setState({ loading: false }, () => {
this.getSubmission() this.getOutlookPAID()
}) })
if (type == 'revision') { 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 { ...@@ -144,6 +144,7 @@ export default class BalanceSheetOLPA extends Component {
"outlook_pa_id": this.props.outlook_pa_id, "outlook_pa_id": this.props.outlook_pa_id,
"report_id": this.props.report_id, "report_id": this.props.report_id,
"revision": this.props.revision, "revision": this.props.revision,
"get_for": this.state.get_for,
"periode": this.props.periode, "periode": this.props.periode,
"company_id": this.props.company.company_id "company_id": this.props.company.company_id
} }
......
...@@ -122,6 +122,7 @@ export default class ProfitLossOLPA extends Component { ...@@ -122,6 +122,7 @@ export default class ProfitLossOLPA extends Component {
let payload = { let payload = {
"report_id": this.props.report_id, "report_id": this.props.report_id,
"revision": Number(this.props.revision), "revision": Number(this.props.revision),
"get_for": this.state.get_for,
"periode": this.props.periode, "periode": this.props.periode,
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
"outlook_pa_id": this.props.outlook_pa_id "outlook_pa_id": this.props.outlook_pa_id
......
...@@ -146,6 +146,7 @@ export default class TaxPlanningOLPA extends Component { ...@@ -146,6 +146,7 @@ export default class TaxPlanningOLPA extends Component {
let payload = { let payload = {
"outlook_pa_id": this.props.outlook_pa_id, "outlook_pa_id": this.props.outlook_pa_id,
"report_id": this.props.report_id, "report_id": this.props.report_id,
"get_for": this.state.get_for,
"revision": this.props.revision, "revision": this.props.revision,
"periode": this.props.periode, "periode": this.props.periode,
"company_id": this.props.company.company_id "company_id": this.props.company.company_id
......
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