Commit a17a8e9b authored by Dida Adams Arizona's avatar Dida Adams Arizona

Merge branch 'master' into 'didam'

# Conflicts:
#   src/api/index.js
parents be083e31 55eb6369
......@@ -292,7 +292,8 @@ const create = (type = "") => {
const getPerBSiMontlyReportLOCF = (body) => api.post('transaction/monthly_report_locf/get_per_bs', body)
const checkUploadMonthlyReportLOCF = (body) => api.post('transaction/monthly_report_locf/check_import', body)
const uploadMonthlyReportLOCF = (body) => api.post('transaction/monthly_report_locf/import_monthly_report', body)
const validateSubmitReportOI = (body) => api.post('transaction/monthly_report_oi/validate_save', body)
// MonthlyPL
const getHierarkiMontlyReportPL = (body) => api.post('transaction/monthly_report_pl/get_report_hierarki', body)
const createMonthlyReportPL = (body) => api.post('transaction/monthly_report_pl/create_monthly_report', body)
......@@ -528,7 +529,8 @@ const create = (type = "") => {
validateSubmitReportPL,
getPerBSiMontlyReportLOCF,
checkUploadMonthlyReportLOCF,
uploadMonthlyReportLOCF
uploadMonthlyReportLOCF,
validateSubmitReportOI
}
}
......
This diff is collapsed.
......@@ -243,6 +243,7 @@ export default class CorporateAnnualTargetMR extends Component {
}
else {
let isi = resp.rows.slice(3)
console.log(isi);
let payload = []
let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/;
isi.map((i, index) => {
......@@ -251,9 +252,9 @@ export default class CorporateAnnualTargetMR extends Component {
orders: i[0] === undefined ? "" : String(i[0]).trim(),
item_report_id: i[1] === undefined ? "" : String(i[1]).trim(),
item_report: i[2] === undefined ? "" : String(i[2]).trim(),
wight: i[3] === undefined ? "" : (String(i[3])) === false ? "0" : String(i[3]).trim(),
weight: i[3] === undefined ? "" : (String(i[3])) === false ? "0" : String(i[3]).trim(),
oum: i[4] === undefined ? "" : (String(i[4])) === false ? "0" : String(i[4]).trim(),
kpi_type: i[5] === undefined ? "" : (String(i[5])) === false ? "0" : String(i[5]).trim(),
jenis_kpi: i[5] === undefined ? "" : (String(i[5])) === false ? "0" : String(i[5]).trim(),
max_ach: i[6] === undefined ? "" : (String(i[6])) === false ? "0" : String(i[6]).trim(),
actual_monthly: i[7] === undefined ? "0.0" : (String(i[7])) === false ? "0" : String(i[7]).trim(),
notes: i[8] === undefined ? "" : (String(i[8])) === false ? "0" : String(i[8]).trim(),
......@@ -276,8 +277,8 @@ export default class CorporateAnnualTargetMR extends Component {
checkUpload() {
api.create().checkUploadMonthlyReportCAT(this.state.payload).then(response => {
console.log(JSON.stringify(this.state.payload));
// console.log(this.state.payload)
// console.log(response)
console.log(this.state.payload)
console.log(response)
if (response.data) {
if (response.data.status === 'success') {
this.setState({ visibleUpload: false, loading: true, visibleCATMR: false })
......@@ -293,19 +294,21 @@ export default class CorporateAnnualTargetMR extends Component {
item.uom,
item.kpi_type,
item.max_ach,
item.formula,
item.formula_ytd,
item.actual_monthly,
item.target_monthly,
item.achivement_monthly,
item.score,
item.score_x_weight,
item.notes
item.notes,
item.order,
item.error
]
})
console.log(dataTable)
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
this.state.dataTable.map(item => {
if (item[18].length > 0) {
if (item[16].length > 0) {
console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true })
}
......@@ -323,7 +326,7 @@ export default class CorporateAnnualTargetMR extends Component {
data.push({
item_report_id: i[1],
item_report: String(i[5]).trim(),
wight: String(i[6]),
weight: String(i[6]),
uom: String(i[7]),
jenis_kpi: i[8] == null ? "" : i[8].value,
max_ach: i[9] == null ? "" : i[9].value,
......@@ -344,7 +347,6 @@ export default class CorporateAnnualTargetMR extends Component {
"status": type,
"months": this.props.month.month_id,
"corporate_annual_target": data
// "fixed_asset_movement": data
}
console.log(data);
api.create('UPLOAD').uploadMonthlyReportCAT(body).then(response => {
......@@ -561,7 +563,7 @@ export default class CorporateAnnualTargetMR extends Component {
// console.log(data);
let index = 0
if (value == null) {
console.log("masuk");
// console.log("masuk");
index = -1
} else {
index = data.findIndex((val) => val.value == value.value)
......@@ -1483,7 +1485,6 @@ export default class CorporateAnnualTargetMR extends Component {
<Typography style={{ fontSize: '11px', color: '#4b4b4b' }}>in IDR mn</Typography>
</div>
<div style={{ marginTop: 20, width: this.props.width - (this.props.open === true ? 400 : 150) }}>
{ console.log(this.state.loading) }
{!this.state.loading && (
<MuiThemeProvider theme={getMuiTheme()}>
<MUIDataTable
......
This diff is collapsed.
......@@ -117,7 +117,7 @@ export default class TaxPlanningMR extends Component {
}
api.create().getHierarkiMontlyReportTP(payload).then(response => {
console.log(response);
// console.log(payload);
console.log(payload);
let dataTable = []
if (response.data) {
if (response.data.status == 'success') {
......@@ -289,9 +289,9 @@ export default class TaxPlanningMR extends Component {
order: i[0] === undefined ? "" : String(i[0]).trim(),
item_report_id: i[1] === undefined ? "" : String(i[1]).trim(),
item_report_name: i[2] === undefined ? "" : String(i[2]).trim(),
trial_balance_commercial: "",
fiscal_correction: i[3] === undefined ? "0" : reg.test(String(i[3])) === false ? "0" : String(i[2]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[3]).trim()).toFixed(2)) :String(Number(String(i[3]).trim()).toFixed(1)),
trial_balance_fiscal: "",
trial_balance_commercial: i[3] === undefined ? "0" : reg.test(String(i[3])) === false ? "0" : String(i[2]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[3]).trim()).toFixed(2)) :String(Number(String(i[3]).trim()).toFixed(1)),
fiscal_correction: i[4] === undefined ? "0" : reg.test(String(i[4])) === false ? "0" : String(i[2]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[4]).trim()).toFixed(2)) :String(Number(String(i[4]).trim()).toFixed(1)),
trial_balance_fiscal: i[5] === undefined ? "0" : reg.test(String(i[5])) === false ? "0" : String(i[2]).toLocaleUpperCase() == "CORPORATE INCOME TAX" ? String(Number(String(i[5]).trim()).toFixed(2)) :String(Number(String(i[5]).trim()).toFixed(1)),
trial_balance_fiscal_actual: "",
trial_balance_fiscal_mb: "",
})
......
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