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

Merge branch 'didam' into 'master'

update

See merge request !589
parents 99da639e b0d765e0
...@@ -87,7 +87,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -87,7 +87,7 @@ export default class FixedAssetsMovement extends Component {
"submission_id": this.props.submissionID "submission_id": this.props.submissionID
} }
api.create().getDetailReportMB(payload).then(response => { api.create().getDetailReportMB(payload).then(response => {
// console.log(response); // // console.log(response);
let dataTable = [] let dataTable = []
if (response.data) { if (response.data) {
let res = response.data.data let res = response.data.data
...@@ -180,7 +180,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -180,7 +180,7 @@ export default class FixedAssetsMovement extends Component {
}) })
let indexParent = this.state.dataTable.findIndex((val) => val[1] == this.state.dataTable[data.rowIndex][2]) let indexParent = this.state.dataTable.findIndex((val) => val[1] == this.state.dataTable[data.rowIndex][2])
let a = this.state.dataTable[data.rowIndex][data.columnIndex] = total let a = this.state.dataTable[data.rowIndex][data.columnIndex] = total
// console.log(indexParent); // // console.log(indexParent);
return a return a
} }
...@@ -189,7 +189,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -189,7 +189,7 @@ export default class FixedAssetsMovement extends Component {
let data = this.state.dataTable let data = this.state.dataTable
let indexParent = data.findIndex((val) => val[1] == data[tableMeta.rowIndex][2]) let indexParent = data.findIndex((val) => val[1] == data[tableMeta.rowIndex][2])
if (indexParent > 0) { if (indexParent > 0) {
// console.log(indexParent) // // console.log(indexParent)
let a = data[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) let a = data[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
let jagain = data[indexParent][tableMeta.columnIndex] let jagain = data[indexParent][tableMeta.columnIndex]
a = data[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (jagain + Number(val)) a = data[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (jagain + Number(val))
...@@ -229,7 +229,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -229,7 +229,7 @@ export default class FixedAssetsMovement extends Component {
"status": type, "status": type,
"fixed_asset_movement": data "fixed_asset_movement": data
} }
// console.log(data); // // console.log(data);
this.props.saveToMasterBudget(payload) this.props.saveToMasterBudget(payload)
this.props.onClickClose() this.props.onClickClose()
} }
...@@ -239,7 +239,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -239,7 +239,7 @@ export default class FixedAssetsMovement extends Component {
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}` `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // // console.log(res)
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
...@@ -252,13 +252,13 @@ export default class FixedAssetsMovement extends Component { ...@@ -252,13 +252,13 @@ export default class FixedAssetsMovement extends Component {
fileHandler = (event) => { fileHandler = (event) => {
let fileObj = event let fileObj = event
ExcelRenderer(fileObj, (err, resp) => { ExcelRenderer(fileObj, (err, resp) => {
// console.log(resp) // // console.log(resp)
if (err) { if (err) {
console.log(err); // console.log(err);
} }
else { else {
let isi = resp.rows.slice(3) let isi = resp.rows.slice(3)
// console.log(resp.rows[2]); // // console.log(resp.rows[2]);
let payload = [] let payload = []
let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/; let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/;
isi.map((i, index) => { isi.map((i, index) => {
...@@ -291,7 +291,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -291,7 +291,7 @@ export default class FixedAssetsMovement extends Component {
report_id: this.props.report_id, report_id: this.props.report_id,
fixed_asset_movement: payload fixed_asset_movement: payload
} }
// console.log(body) // // console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] }) this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
} }
}); });
...@@ -299,8 +299,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -299,8 +299,8 @@ export default class FixedAssetsMovement extends Component {
checkUpload() { checkUpload() {
api.create().checkUploadMB(this.state.payload).then(response => { api.create().checkUploadMB(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload)); // // console.log(JSON.stringify(this.state.payload));
// console.log(response) // // console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleFixedAssetsMovement: false, loading: true }) this.setState({ visibleUpload: false, visibleFixedAssetsMovement: false, loading: true })
...@@ -336,11 +336,11 @@ export default class FixedAssetsMovement extends Component { ...@@ -336,11 +336,11 @@ export default class FixedAssetsMovement extends Component {
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => { this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
this.state.dataTable.map(item => { this.state.dataTable.map(item => {
if (item[24].length > 0) { if (item[24].length > 0) {
// console.log('masuk') // // console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true }) this.setState({ buttonError: true, errorPreview: true, editable: true })
} }
}) })
// console.log(this.state.dataTable); // // console.log(this.state.dataTable);
}) })
} }
} }
...@@ -378,9 +378,9 @@ export default class FixedAssetsMovement extends Component { ...@@ -378,9 +378,9 @@ export default class FixedAssetsMovement extends Component {
fixed_asset_movement: data, fixed_asset_movement: data,
status: type status: type
} }
// console.log(JSON.stringify(body)); // // console.log(JSON.stringify(body));
api.create('UPLOAD').uploadMasterBudget(body).then(response => { api.create('UPLOAD').uploadMasterBudget(body).then(response => {
// console.log(response); // // console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.onClickClose() this.props.onClickClose()
...@@ -397,7 +397,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -397,7 +397,7 @@ export default class FixedAssetsMovement extends Component {
async downloadAllData() { async downloadAllData() {
// let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` // let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
// console.log(url); // // console.log(url);
let resReal = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` let resReal = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let resNull = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` let resNull = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let res = await fetch( let res = await fetch(
...@@ -416,7 +416,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -416,7 +416,7 @@ export default class FixedAssetsMovement extends Component {
handleValidate() { handleValidate() {
let data = [] let data = []
// console.log(this.state.dataTable) // // console.log(this.state.dataTable)
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
item_report_id: i[1], item_report_id: i[1],
...@@ -438,7 +438,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -438,7 +438,7 @@ export default class FixedAssetsMovement extends Component {
total_more_year: i[0] === 3 && i[21] === "" ? "0" : String(i[21]) total_more_year: i[0] === 3 && i[21] === "" ? "0" : String(i[21])
}) })
}) })
// console.log(JSON.stringify(data)) // // console.log(JSON.stringify(data))
let payload = { let payload = {
"submission_id": this.props.submissionID, "submission_id": this.props.submissionID,
"company_id": this.props.company.company_id, "company_id": this.props.company.company_id,
...@@ -448,7 +448,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -448,7 +448,7 @@ export default class FixedAssetsMovement extends Component {
"status": "submitted" "status": "submitted"
} }
api.create().validateSubmitReport(payload).then((response) => { api.create().validateSubmitReport(payload).then((response) => {
// console.log(response) // // console.log(response)
if (response.data.data.result) { if (response.data.data.result) {
this.setState({ loading: false, buttonError: false, editable: false }) this.setState({ loading: false, buttonError: false, editable: false })
} else { } else {
...@@ -482,12 +482,16 @@ export default class FixedAssetsMovement extends Component { ...@@ -482,12 +482,16 @@ export default class FixedAssetsMovement extends Component {
}) })
// if (tableMeta.columnIndex == 18) { // if (tableMeta.columnIndex == 18) {
// console.log(splitFormula) // // console.log(splitFormula)
// console.log(baru) // // console.log(baru)
// } // }
// console.log(baru) // // console.log(baru)
let tambahan = false
let opet = ""
baru.map((item, index) => { baru.map((item, index) => {
if (item == '-' || item == '+' || item == '/' || item == '*') { if (item == 'X') {
tambahan = true
} else if (item == '-' || item == '+' || item == '/' || item == '*') {
anjay.push(item) anjay.push(item)
} else { } else {
if (String(item).includes('#')) { if (String(item).includes('#')) {
...@@ -495,42 +499,49 @@ export default class FixedAssetsMovement extends Component { ...@@ -495,42 +499,49 @@ export default class FixedAssetsMovement extends Component {
let tst = String(item).replace('[M-1]', '') let tst = String(item).replace('[M-1]', '')
let data = tableMeta.columnIndex == 7 ? 18 : tableMeta.columnIndex - 1 let data = tableMeta.columnIndex == 7 ? 18 : tableMeta.columnIndex - 1
let period = data == 18 ? Number(this.props.periode) - 1 : this.props.periode let period = data == 18 ? Number(this.props.periode) - 1 : this.props.periode
// console.log(tableMeta.columnIndex)
let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period) let indexID = tableMeta.rowData[data].formula.findIndex((val) => val.item_formula == String(`@${tst}`) && val.periode == period)
// console.log(indexID)
if (indexID !== -1) { if (indexID !== -1) {
let valuezz = tableMeta.rowData[data].formula[indexID].value let valuezz = tableMeta.rowData[data].formula[indexID].value
// baru.push(valuezz)
anjay.push(valuezz == "" ? 0 : valuezz) anjay.push(valuezz == "" ? 0 : valuezz)
// console.log(valuezz)
} }
} else { } else {
let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode)) let indexID = value.formula.findIndex((val) => val.item_formula == String(`@${item}`) && val.periode == Number(this.props.periode))
// console.log(indexID) // // console.log(indexID)
if (indexID !== -1) { if (indexID !== -1) {
// console.log(value.formula[indexID].value) // // console.log(value.formula[indexID].value)
let valuezz = value.formula[indexID].value let valuezz = value.formula[indexID].value
anjay.push(valuezz == "" ? 0 : valuezz) anjay.push(valuezz == "" ? 0 : valuezz)
} }
} }
} else { } else {
// console.log(item) // // console.log(item)
let indexID = dataTable2.findIndex((val) => val[22] == item) let indexID = dataTable2.findIndex((val) => val[22] == item)
// console.log(dataTable2[indexID]) if (item == 'X-1') {
if (indexID !== -1) { anjay.push(-1)
let valuezz = dataTable2[indexID][tableMeta.columnIndex].value == undefined ? dataTable2[indexID][tableMeta.columnIndex] : dataTable2[indexID][tableMeta.columnIndex].value } else if (tambahan) {
anjay.push(valuezz == "" ? 0 : valuezz) if (item == '-' || item == '+' || item == '/' || item == '*') {
} else { opet = item
if (item === '(-1)') { } else {
anjay.push(-1) anjay.push(opet == ''? Number(item) : Number(String(opet + String(item))))
tambahan = false
opet = ""
}
} else {
if (indexID !== -1) {
let valuezz = dataTable2[indexID][tableMeta.columnIndex].value == undefined ? dataTable2[indexID][tableMeta.columnIndex] : dataTable2[indexID][tableMeta.columnIndex].value
anjay.push(valuezz == "" ? 0 : valuezz)
} else {
if (item === '(-1)') {
anjay.push(-1)
}
// // console.log(item);
} }
// console.log(item);
} }
} }
} }
}) })
// console.log(baru) // // console.log(baru)
// console.log(anjay) // // console.log(anjay)
let total = 0 let total = 0
let opt = "" let opt = ""
...@@ -559,8 +570,8 @@ export default class FixedAssetsMovement extends Component { ...@@ -559,8 +570,8 @@ export default class FixedAssetsMovement extends Component {
} }
}) })
total = R.equals(total, NaN) ? "0.0" : total total = R.equals(total, NaN) ? "0.0" : total
// console.log(dataTable2[tableMeta.rowIndex][22]) // // console.log(dataTable2[tableMeta.rowIndex][22])
// console.log(tableMeta.rowData[5]) // // console.log(tableMeta.rowData[5])
// if (tableMeta.rowData[5] == 'Beginning Balance') { // if (tableMeta.rowData[5] == 'Beginning Balance') {
// console.log(baru) // console.log(baru)
// console.log(anjay) // console.log(anjay)
...@@ -568,7 +579,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -568,7 +579,7 @@ export default class FixedAssetsMovement extends Component {
// } // }
if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value == undefined) { if (dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value == undefined) {
// console.log([tableMeta.rowIndex][tableMeta.columnIndex]) // // console.log([tableMeta.rowIndex][tableMeta.columnIndex])
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = total
} else { } else {
dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = total dataTable2[tableMeta.rowIndex][tableMeta.columnIndex].value = total
...@@ -584,7 +595,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -584,7 +595,7 @@ export default class FixedAssetsMovement extends Component {
} else { } else {
let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2]) let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2])
if (indexParent > 0) { if (indexParent > 0) {
// console.log(indexParent) // // console.log(indexParent)
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
let jagain = dataTable2[indexParent][tableMeta.columnIndex] let jagain = dataTable2[indexParent][tableMeta.columnIndex]
a = dataTable2[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (jagain + Number(val)) a = dataTable2[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (jagain + Number(val))
...@@ -596,15 +607,15 @@ export default class FixedAssetsMovement extends Component { ...@@ -596,15 +607,15 @@ export default class FixedAssetsMovement extends Component {
const handleForecast = (tableMeta, periode) => { const handleForecast = (tableMeta, periode) => {
let total = 0 let total = 0
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'gain/ (loss) on fixed assets' || String(tableMeta.rowData[5]).toLocaleLowerCase() == 'ending balance' || String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') { if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'gain/ (loss) on fixed assets' || String(tableMeta.rowData[5]).toLocaleLowerCase() == 'ending balance' || String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
// console.log(dataTable2[tableMeta.rowIndex][23]) // // console.log(dataTable2[tableMeta.rowIndex][23])
// console.log() // // console.log()
let indexID = dataTable2[tableMeta.rowIndex][23].findIndex((val) => val.periode == periode) let indexID = dataTable2[tableMeta.rowIndex][23].findIndex((val) => val.periode == periode)
if (indexID !== -1) { if (indexID !== -1) {
total = dataTable2[tableMeta.rowIndex][23][indexID].value total = dataTable2[tableMeta.rowIndex][23][indexID].value
} }
} else { } else {
total = handleValueFormula(tableMeta.columnIndex, tableMeta) total = handleValueFormula(tableMeta.columnIndex, tableMeta)
// console.log(dataTable2[tableMeta.rowIndex]) // // console.log(dataTable2[tableMeta.rowIndex])
} }
// if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') { // if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'beginning balance') {
// total = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex - 1] // total = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex - 1]
...@@ -616,7 +627,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -616,7 +627,7 @@ export default class FixedAssetsMovement extends Component {
const handleTotal = (tableMeta) => { const handleTotal = (tableMeta) => {
let total = 0 let total = 0
// if (tableMeta.rowData[5] == 'Beginning balance') { // if (tableMeta.rowData[5] == 'Beginning balance') {
// console.log(tableMeta.rowData) // // console.log(tableMeta.rowData)
// } // }
if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'ending balance') { if (String(tableMeta.rowData[5]).toLocaleLowerCase() == 'ending balance') {
total = dataTable2[tableMeta.rowIndex][18].value total = dataTable2[tableMeta.rowIndex][18].value
...@@ -634,7 +645,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -634,7 +645,7 @@ export default class FixedAssetsMovement extends Component {
dataTable2[tableMeta.rowIndex][19] = total dataTable2[tableMeta.rowIndex][19] = total
} }
return total return total
// console.log(total); // // console.log(total);
} }
const handleValue = (data) => { const handleValue = (data) => {
let total = 0 let total = 0
...@@ -645,7 +656,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -645,7 +656,7 @@ export default class FixedAssetsMovement extends Component {
}) })
let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[data.rowIndex][2]) let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[data.rowIndex][2])
let a = dataTable2[data.rowIndex][data.columnIndex] = Number(total) let a = dataTable2[data.rowIndex][data.columnIndex] = Number(total)
// console.log(indexParent); // // console.log(indexParent);
return a return a
} }
const handleFormula = (data, tableMeta, month) => { const handleFormula = (data, tableMeta, month) => {
...@@ -681,7 +692,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -681,7 +692,7 @@ export default class FixedAssetsMovement extends Component {
"formula": rilFormula "formula": rilFormula
} }
api.create().countingFormula(body).then(response => { api.create().countingFormula(body).then(response => {
// console.log(response); // // console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
setTimeout(() => { setTimeout(() => {
...@@ -700,7 +711,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -700,7 +711,7 @@ export default class FixedAssetsMovement extends Component {
"formula": rilFormula "formula": rilFormula
} }
api.create().countingFormula(body).then(response => { api.create().countingFormula(body).then(response => {
// console.log(response) // // console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
setTimeout(() => { setTimeout(() => {
...@@ -880,7 +891,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -880,7 +891,7 @@ export default class FixedAssetsMovement extends Component {
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -969,7 +980,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -969,7 +980,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1058,7 +1069,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1058,7 +1069,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1147,7 +1158,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1147,7 +1158,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1236,7 +1247,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1236,7 +1247,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1325,7 +1336,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1325,7 +1336,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1414,7 +1425,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1414,7 +1425,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1503,7 +1514,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1503,7 +1514,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1592,7 +1603,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1592,7 +1603,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1681,7 +1692,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1681,7 +1692,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1770,7 +1781,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1770,7 +1781,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1859,7 +1870,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1859,7 +1870,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1986,7 +1997,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -1986,7 +1997,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -2064,7 +2075,7 @@ export default class FixedAssetsMovement extends Component { ...@@ -2064,7 +2075,7 @@ export default class FixedAssetsMovement extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
......
...@@ -57,7 +57,7 @@ export default class ProfitLoss extends Component { ...@@ -57,7 +57,7 @@ export default class ProfitLoss extends Component {
componentDidMount() { componentDidMount() {
this.getItemHierarki() this.getItemHierarki()
this.getLatestUpdate() this.getLatestUpdate()
// console.log(this.props); // // console.log(this.props);
} }
getLatestUpdate() { getLatestUpdate() {
...@@ -89,7 +89,7 @@ export default class ProfitLoss extends Component { ...@@ -89,7 +89,7 @@ export default class ProfitLoss extends Component {
"submission_id": this.props.submissionID "submission_id": this.props.submissionID
} }
api.create().getDetailReportMB(payload).then(response => { api.create().getDetailReportMB(payload).then(response => {
// console.log(response); // // console.log(response);
let dataTable = [] let dataTable = []
this.setState({ visibleProfitLoss: true }) this.setState({ visibleProfitLoss: true })
if (response.data) { if (response.data) {
...@@ -167,8 +167,10 @@ export default class ProfitLoss extends Component { ...@@ -167,8 +167,10 @@ export default class ProfitLoss extends Component {
} }
} }
}) })
// console.log(dataTable) // // console.log(dataTable)
this.setState({ dataTable, loading: false, buttonError: true, editable: true }) this.setState({ dataTable, loading: false, buttonError: true, editable: true }, () => {
// console.log(dataTable)
})
} else { } else {
this.setState({ dataTable, loading: false, buttonError: true, editable: true }) this.setState({ dataTable, loading: false, buttonError: true, editable: true })
} }
...@@ -185,7 +187,7 @@ export default class ProfitLoss extends Component { ...@@ -185,7 +187,7 @@ export default class ProfitLoss extends Component {
}) })
let indexParent = this.state.dataTable.findIndex((val) => val[1] == this.state.dataTable[data.rowIndex][2]) let indexParent = this.state.dataTable.findIndex((val) => val[1] == this.state.dataTable[data.rowIndex][2])
let a = this.state.dataTable[data.rowIndex][data.columnIndex] = total let a = this.state.dataTable[data.rowIndex][data.columnIndex] = total
// console.log(indexParent); // // console.log(indexParent);
return a return a
} }
...@@ -194,7 +196,7 @@ export default class ProfitLoss extends Component { ...@@ -194,7 +196,7 @@ export default class ProfitLoss extends Component {
let data = this.state.dataTable let data = this.state.dataTable
let indexParent = data.findIndex((val) => val[1] == data[tableMeta.rowIndex][2]) let indexParent = data.findIndex((val) => val[1] == data[tableMeta.rowIndex][2])
if (indexParent > 0) { if (indexParent > 0) {
// console.log(indexParent) // // console.log(indexParent)
let a = data[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) let a = data[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
let jagain = data[indexParent][tableMeta.columnIndex] let jagain = data[indexParent][tableMeta.columnIndex]
a = data[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (jagain + Number(val)) a = data[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (jagain + Number(val))
...@@ -235,7 +237,7 @@ export default class ProfitLoss extends Component { ...@@ -235,7 +237,7 @@ export default class ProfitLoss extends Component {
"status": type, "status": type,
"profit_loss": data "profit_loss": data
} }
// console.log(data); // // console.log(data);
this.setState({ loading: false }) this.setState({ loading: false })
this.props.saveToMasterBudget(payload) this.props.saveToMasterBudget(payload)
this.props.onClickClose() this.props.onClickClose()
...@@ -246,7 +248,7 @@ export default class ProfitLoss extends Component { ...@@ -246,7 +248,7 @@ export default class ProfitLoss extends Component {
`https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}` `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/download_template?report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // // console.log(res)
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
...@@ -259,13 +261,13 @@ export default class ProfitLoss extends Component { ...@@ -259,13 +261,13 @@ export default class ProfitLoss extends Component {
fileHandler = (event) => { fileHandler = (event) => {
let fileObj = event let fileObj = event
ExcelRenderer(fileObj, (err, resp) => { ExcelRenderer(fileObj, (err, resp) => {
// console.log(resp) // // console.log(resp)
if (err) { if (err) {
// console.log(err); // // console.log(err);
} }
else { else {
let isi = resp.rows.slice(3) let isi = resp.rows.slice(3)
// console.log(resp.rows[2]); // // console.log(resp.rows[2]);
let payload = [] let payload = []
let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/; let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/;
isi.map((i, index) => { isi.map((i, index) => {
...@@ -299,7 +301,7 @@ export default class ProfitLoss extends Component { ...@@ -299,7 +301,7 @@ export default class ProfitLoss extends Component {
report_id: this.props.report_id, report_id: this.props.report_id,
profit_loss: payload profit_loss: payload
} }
// console.log(body) // // console.log(body)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] }) this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
} }
}); });
...@@ -307,8 +309,8 @@ export default class ProfitLoss extends Component { ...@@ -307,8 +309,8 @@ export default class ProfitLoss extends Component {
checkUpload() { checkUpload() {
api.create().checkUploadMB(this.state.payload).then(response => { api.create().checkUploadMB(this.state.payload).then(response => {
// console.log(JSON.stringify(this.state.payload)); // // console.log(JSON.stringify(this.state.payload));
// console.log(response) // // console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleProfitLoss: false, loading: true }) this.setState({ visibleUpload: false, visibleProfitLoss: false, loading: true })
...@@ -344,11 +346,11 @@ export default class ProfitLoss extends Component { ...@@ -344,11 +346,11 @@ export default class ProfitLoss extends Component {
this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => { this.setState({ dataTable, dataLoaded: true, loading: false, buttonError: false, editable: true }, () => {
this.state.dataTable.map(item => { this.state.dataTable.map(item => {
if (item[24].length > 0) { if (item[24].length > 0) {
// console.log('masuk') // // console.log('masuk')
this.setState({ buttonError: true, errorPreview: true, editable: true }) this.setState({ buttonError: true, errorPreview: true, editable: true })
} }
}) })
// console.log(this.state.buttonError) // // console.log(this.state.buttonError)
}) })
} }
} }
...@@ -387,9 +389,9 @@ export default class ProfitLoss extends Component { ...@@ -387,9 +389,9 @@ export default class ProfitLoss extends Component {
profit_loss: data, profit_loss: data,
status: type status: type
} }
// console.log(data); // // console.log(data);
api.create('UPLOAD').uploadMasterBudget(body).then(response => { api.create('UPLOAD').uploadMasterBudget(body).then(response => {
// console.log(response); // // console.log(response);
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.props.onClickClose() this.props.onClickClose()
...@@ -409,7 +411,7 @@ export default class ProfitLoss extends Component { ...@@ -409,7 +411,7 @@ export default class ProfitLoss extends Component {
async downloadAllData() { async downloadAllData() {
let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` let url = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=${this.props.submissionID}&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
let sub_null = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}` let sub_null = `https://tia.eksad.com/tia-reporting-dev/public/transaction/master_budget/export_master_budget?submission_id=&&report_id=${this.props.report_id}&&company_id=${this.props.company.company_id}&&year=${this.props.periode}&&revision=${this.props.revision}`
// console.log(url); // // console.log(url);
let res = await fetch( let res = await fetch(
this.props.submissionID == null ? sub_null : url this.props.submissionID == null ? sub_null : url
) )
...@@ -426,7 +428,7 @@ export default class ProfitLoss extends Component { ...@@ -426,7 +428,7 @@ export default class ProfitLoss extends Component {
handleValidate() { handleValidate() {
let data = [] let data = []
// console.log(this.state.dataTable) // // console.log(this.state.dataTable)
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
item_report_id: i[1], item_report_id: i[1],
...@@ -457,9 +459,9 @@ export default class ProfitLoss extends Component { ...@@ -457,9 +459,9 @@ export default class ProfitLoss extends Component {
"profit_loss": data, "profit_loss": data,
"status": "submitted" "status": "submitted"
} }
// console.log(payload) // // console.log(payload)
api.create().validateSubmitReport(payload).then((response) => { api.create().validateSubmitReport(payload).then((response) => {
// console.log(response) // // console.log(response)
if (response.data.data.result) { if (response.data.data.result) {
this.setState({ loading: false, buttonError: false, editable: false }) this.setState({ loading: false, buttonError: false, editable: false })
} else { } else {
...@@ -481,7 +483,7 @@ export default class ProfitLoss extends Component { ...@@ -481,7 +483,7 @@ export default class ProfitLoss extends Component {
} else { } else {
// let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2]) // let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[tableMeta.rowIndex][2])
// if (indexParent > 0) { // if (indexParent > 0) {
// // // console.log(indexParent) // // // // console.log(indexParent)
// let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val) // let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = Number(val)
// let jagain = dataTable2[indexParent][tableMeta.columnIndex] // let jagain = dataTable2[indexParent][tableMeta.columnIndex]
// a = dataTable2[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (Number(jagain) + Number(val)) // a = dataTable2[indexParent][tableMeta.columnIndex] = jagain == undefined ? (0 + Number(val)) : (Number(jagain) + Number(val))
...@@ -512,12 +514,12 @@ export default class ProfitLoss extends Component { ...@@ -512,12 +514,12 @@ export default class ProfitLoss extends Component {
dataTable2[tableMeta.rowIndex][20] = total dataTable2[tableMeta.rowIndex][20] = total
return total return total
} }
// console.log(total); // // console.log(total);
} }
const handleNotes = (value, tableMeta) => { const handleNotes = (value, tableMeta) => {
// console.log(value) // // console.log(value)
let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value let a = dataTable2[tableMeta.rowIndex][tableMeta.columnIndex] = value
// console.log(dataTable2[tableMeta.rowIndex]); // // console.log(dataTable2[tableMeta.rowIndex]);
} }
const handleValue = (data) => { const handleValue = (data) => {
let total = 0 let total = 0
...@@ -528,23 +530,43 @@ export default class ProfitLoss extends Component { ...@@ -528,23 +530,43 @@ export default class ProfitLoss extends Component {
}) })
let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[data.rowIndex][2]) let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[data.rowIndex][2])
let a = dataTable2[data.rowIndex][data.columnIndex] = Number(total) let a = dataTable2[data.rowIndex][data.columnIndex] = Number(total)
// console.log(indexParent); // // console.log(indexParent);
return a return a
} }
const handleFormula = (data, tableMeta, month) => { const handleFormula = (data, tableMeta, month) => {
let arrayFormula = tableMeta.rowData[3].match(/[a-zA-Z]+|[0-9]+|[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]+(?:\.[0-9]+@|)/g) let arrayFormula = tableMeta.rowData[3].match(/[a-zA-Z]+|[0-9]+|[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]+(?:\.[0-9]+@|)/g)
let arrayJumlah = [] let arrayJumlah = []
let tambahan = false
let opet = ""
arrayFormula.map((item, indexs) => { arrayFormula.map((item, indexs) => {
let index = dataTable2.findIndex((val) => val[23] == item) if (item == 'X') {
if (index > 0) { tambahan = true
arrayJumlah.push(dataTable2[index][tableMeta.columnIndex]) } else if (item == '-' || item == '+' || item == '/' || item == '*') {
} else {
arrayJumlah.push(item) arrayJumlah.push(item)
} else {
let index = dataTable2.findIndex((val) => val[23] == item)
if (tambahan) {
if (item == '-' || item == '+' || item == '/' || item == '*') {
opet = item
} else {
arrayJumlah.push(opet == ''? Number(item) : Number(String(opet + String(item))))
tambahan = false
opet = ""
}
} else {
if (index != -1) {
arrayJumlah.push(dataTable2[index][tableMeta.columnIndex])
}
}
} }
// if (indexs % 2 !== 0) { // if (indexs % 2 !== 0) {
// operator.push(item) // operator.push(item)
// } // }
}) })
// console.log(arrayFormula)
// console.log(arrayJumlah)
let array = arrayJumlah let array = arrayJumlah
let total = 0 let total = 0
let opt = "" let opt = ""
...@@ -667,7 +689,7 @@ export default class ProfitLoss extends Component { ...@@ -667,7 +689,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleNotes(event.target.value, tableMeta) handleNotes(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -741,7 +763,7 @@ export default class ProfitLoss extends Component { ...@@ -741,7 +763,7 @@ export default class ProfitLoss extends Component {
value={Number(value).toFixed(1)} value={Number(value).toFixed(1)}
onBlur={(event) => { onBlur={(event) => {
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -831,7 +853,7 @@ export default class ProfitLoss extends Component { ...@@ -831,7 +853,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -921,7 +943,7 @@ export default class ProfitLoss extends Component { ...@@ -921,7 +943,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1011,7 +1033,7 @@ export default class ProfitLoss extends Component { ...@@ -1011,7 +1033,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1101,7 +1123,7 @@ export default class ProfitLoss extends Component { ...@@ -1101,7 +1123,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1191,7 +1213,7 @@ export default class ProfitLoss extends Component { ...@@ -1191,7 +1213,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1281,7 +1303,7 @@ export default class ProfitLoss extends Component { ...@@ -1281,7 +1303,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1371,7 +1393,7 @@ export default class ProfitLoss extends Component { ...@@ -1371,7 +1393,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1461,7 +1483,7 @@ export default class ProfitLoss extends Component { ...@@ -1461,7 +1483,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1551,7 +1573,7 @@ export default class ProfitLoss extends Component { ...@@ -1551,7 +1573,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1641,7 +1663,7 @@ export default class ProfitLoss extends Component { ...@@ -1641,7 +1663,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1731,7 +1753,7 @@ export default class ProfitLoss extends Component { ...@@ -1731,7 +1753,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1868,7 +1890,7 @@ export default class ProfitLoss extends Component { ...@@ -1868,7 +1890,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1958,7 +1980,7 @@ export default class ProfitLoss extends Component { ...@@ -1958,7 +1980,7 @@ export default class ProfitLoss extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
......
...@@ -188,15 +188,15 @@ class HomePage extends Component { ...@@ -188,15 +188,15 @@ class HomePage extends Component {
["5", "PUNINAR INFINITE RAYA", "Budget Tahunan 2021", "0 (20 Oktober 2020)", "Belum Disetujui"], ["5", "PUNINAR INFINITE RAYA", "Budget Tahunan 2021", "0 (20 Oktober 2020)", "Belum Disetujui"],
] ]
const options = { const options = {
filter: false, filter: true,
sort: false, sort: false,
responsive: "scroll", responsive: "scroll",
print: false, print: false,
download: false, download: false,
selectableRows: false, selectableRows: false,
viewColumns: false, viewColumns: true,
rowsPerPage: 5, rowsPerPage: 5,
search: false search: true
} }
const columnsMB = ["Company", "Master Budget & CAT", "Operating Indicator"] const columnsMB = ["Company", "Master Budget & CAT", "Operating Indicator"]
......
...@@ -71,7 +71,7 @@ export default class BalanceSheet extends Component { ...@@ -71,7 +71,7 @@ export default class BalanceSheet extends Component {
"periode": this.props.data.periode, "periode": this.props.data.periode,
} }
api.create().getLastestUpdateOI(payload).then(response => { api.create().getLastestUpdateOI(payload).then(response => {
// console.log(response.data) // // console.log(response.data)
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
this.setState({ this.setState({
...@@ -86,7 +86,7 @@ export default class BalanceSheet extends Component { ...@@ -86,7 +86,7 @@ export default class BalanceSheet extends Component {
// this.getItemHierarki() // this.getItemHierarki()
this.getDataDetail() this.getDataDetail()
this.getLatestUpdate() this.getLatestUpdate()
// console.log(this.props); // // console.log(this.props);
} }
getDataDetail() { getDataDetail() {
...@@ -97,12 +97,12 @@ export default class BalanceSheet extends Component { ...@@ -97,12 +97,12 @@ export default class BalanceSheet extends Component {
"company_id": this.props.data.company.company_id, "company_id": this.props.data.company.company_id,
"periode": this.props.data.periode "periode": this.props.data.periode
} }
// console.log(payload) // // console.log(payload)
api.create().getOperatingIndDetail(payload).then(response => { api.create().getOperatingIndDetail(payload).then(response => {
console.log(response) // console.log(response)
let dataTable = [] let dataTable = []
let res = response.data.data let res = response.data.data
// // console.log(res) // // // console.log(res)
const handlePushChild = (item) => { const handlePushChild = (item) => {
let indexIDzz = dataTable.findIndex((val) => val[1] === item.id) let indexIDzz = dataTable.findIndex((val) => val[1] === item.id)
if (indexIDzz === -1) { if (indexIDzz === -1) {
...@@ -210,8 +210,8 @@ export default class BalanceSheet extends Component { ...@@ -210,8 +210,8 @@ export default class BalanceSheet extends Component {
"status": type, "status": type,
"master_budget": payloadMB "master_budget": payloadMB
} }
// console.log('=========================') // // console.log('=========================')
// console.log(JSON.stringify(payload)) // // console.log(JSON.stringify(payload))
this.props.saveOperatingInd(payload) this.props.saveOperatingInd(payload)
this.props.onClickClose() this.props.onClickClose()
} }
...@@ -225,7 +225,7 @@ export default class BalanceSheet extends Component { ...@@ -225,7 +225,7 @@ export default class BalanceSheet extends Component {
}) })
let indexParent = this.state.dataTable.findIndex((val) => val[1] == this.state.dataTable[data.rowIndex][2]) let indexParent = this.state.dataTable.findIndex((val) => val[1] == this.state.dataTable[data.rowIndex][2])
let a = this.state.dataTable[data.rowIndex][data.columnIndex] = total let a = this.state.dataTable[data.rowIndex][data.columnIndex] = total
// // console.log(indexParent); // // // console.log(indexParent);
return a return a
} }
...@@ -274,7 +274,7 @@ export default class BalanceSheet extends Component { ...@@ -274,7 +274,7 @@ export default class BalanceSheet extends Component {
// "status": type, // "status": type,
// "balance_sheet": data // "balance_sheet": data
// } // }
// // // console.log(data); // // // // console.log(data);
// this.props.saveToMasterBudget(payload) // this.props.saveToMasterBudget(payload)
this.props.onClickClose() this.props.onClickClose()
} }
...@@ -284,7 +284,7 @@ export default class BalanceSheet extends Component { ...@@ -284,7 +284,7 @@ export default class BalanceSheet extends Component {
`https://tia.eksad.com/tia-reporting-dev/public/transaction/operating_indicator/download_template?report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}` `https://tia.eksad.com/tia-reporting-dev/public/transaction/operating_indicator/download_template?report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // // console.log(res)
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
let a = document.createElement('a'); let a = document.createElement('a');
...@@ -295,15 +295,15 @@ export default class BalanceSheet extends Component { ...@@ -295,15 +295,15 @@ export default class BalanceSheet extends Component {
} }
async downloadAllData() { async downloadAllData() {
// // console.log('masuk') // // // console.log('masuk')
let bram = [this.props.data.operatingIndID, this.props.report_id, this.props.data.company.company_id, this.props.data.periode] let bram = [this.props.data.operatingIndID, this.props.report_id, this.props.data.company.company_id, this.props.data.periode]
// console.log(bram) // // console.log(bram)
let res = await fetch( let res = await fetch(
`https://tia.eksad.com/tia-reporting-dev/public/transaction/operating_indicator/export_operating_indicator?operating_indicator_id=${this.props.data.operatingIndID == null ? "" : this.props.data.operatingIndID}&&report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}` `https://tia.eksad.com/tia-reporting-dev/public/transaction/operating_indicator/export_operating_indicator?operating_indicator_id=${this.props.data.operatingIndID == null ? "" : this.props.data.operatingIndID}&&report_id=${this.props.data.report_id}&&company_id=${this.props.data.company.company_id}&&year=${this.props.data.periode}`
) )
res = await res.blob() res = await res.blob()
// console.log(res) // // console.log(res)
this.setState({ loading: false }) this.setState({ loading: false })
if (res.size > 0) { if (res.size > 0) {
let url = window.URL.createObjectURL(res); let url = window.URL.createObjectURL(res);
...@@ -317,13 +317,13 @@ export default class BalanceSheet extends Component { ...@@ -317,13 +317,13 @@ export default class BalanceSheet extends Component {
fileHandler = (event) => { fileHandler = (event) => {
let fileObj = event let fileObj = event
ExcelRenderer(fileObj, (err, resp) => { ExcelRenderer(fileObj, (err, resp) => {
// // console.log(resp) // // // console.log(resp)
if (err) { if (err) {
// console.log(err); // // console.log(err);
} }
else { else {
let isi = resp.rows.slice(3) let isi = resp.rows.slice(3)
// console.log(isi); // // console.log(isi);
let payload = [] let payload = []
let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/; let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/;
isi.map((i, index) => { isi.map((i, index) => {
...@@ -356,18 +356,18 @@ export default class BalanceSheet extends Component { ...@@ -356,18 +356,18 @@ export default class BalanceSheet extends Component {
report_id: this.props.data.report_id, report_id: this.props.data.report_id,
master_budget: payload master_budget: payload
} }
// console.log(resp.rows[1][0]) // // console.log(resp.rows[1][0])
this.setState({ payload: body, buttonError: false, judul: resp.rows[1][0] }) this.setState({ payload: body, buttonError: false, judul: resp.rows[1][0] })
} }
}); });
} }
checkUpload() { checkUpload() {
// console.log(JSON.stringify(this.state.payload)) // // console.log(JSON.stringify(this.state.payload))
api.create().checkUploadOperatingInd(this.state.payload).then(response => { api.create().checkUploadOperatingInd(this.state.payload).then(response => {
// // console.log(JSON.stringify(this.state.payload)); // // // console.log(JSON.stringify(this.state.payload));
// console.log('===============') // // console.log('===============')
console.log(response) // console.log(response)
if (response.data) { if (response.data) {
if (response.data.status === 'success') { if (response.data.status === 'success') {
this.setState({ visibleUpload: false, visibleOI: false, loading: true }) this.setState({ visibleUpload: false, visibleOI: false, loading: true })
...@@ -410,7 +410,7 @@ export default class BalanceSheet extends Component { ...@@ -410,7 +410,7 @@ export default class BalanceSheet extends Component {
uploadOI(type) { uploadOI(type) {
let data = [] let data = []
// console.log(this.state.dataTable) // // console.log(this.state.dataTable)
this.state.dataTable.map(i => { this.state.dataTable.map(i => {
data.push({ data.push({
"item_report_id": i[1], "item_report_id": i[1],
...@@ -439,10 +439,10 @@ export default class BalanceSheet extends Component { ...@@ -439,10 +439,10 @@ export default class BalanceSheet extends Component {
status: type, status: type,
master_budget: data master_budget: data
} }
// console.log(data); // // console.log(data);
// console.log(JSON.stringify(body)) // // console.log(JSON.stringify(body))
api.create('UPLOAD').uploadOperatingInd(body).then(response => { api.create('UPLOAD').uploadOperatingInd(body).then(response => {
// console.log(response); // // console.log(response);
this.setState({ loading: false }) this.setState({ loading: false })
if (response.data) { if (response.data) {
if (response.data.status === "success") { if (response.data.status === "success") {
...@@ -474,7 +474,7 @@ export default class BalanceSheet extends Component { ...@@ -474,7 +474,7 @@ export default class BalanceSheet extends Component {
// } // }
// }) // })
// dataTable2[tableMeta.rowIndex][20] = total // dataTable2[tableMeta.rowIndex][20] = total
// console.log(dataTable2[tableMeta.rowIndex]) // // console.log(dataTable2[tableMeta.rowIndex])
} }
const handleValue = (value, tableMeta) => { const handleValue = (value, tableMeta) => {
...@@ -492,13 +492,13 @@ export default class BalanceSheet extends Component { ...@@ -492,13 +492,13 @@ export default class BalanceSheet extends Component {
} }
const handleParent = (tableMeta) => { const handleParent = (tableMeta) => {
// console.log(tableMeta) // // console.log(tableMeta)
let total = 0 let total = 0
dataTable2.map((item, index) => { dataTable2.map((item, index) => {
if (item[2] == tableMeta.rowData[1]) { if (item[2] == tableMeta.rowData[1]) {
// console.log(total) // // console.log(total)
// console.log(item[tableMeta.columnIndex]) // // console.log(item[tableMeta.columnIndex])
total += Number(item[tableMeta.columnIndex]) total += Number(item[tableMeta.columnIndex])
} }
}) })
...@@ -510,25 +510,35 @@ export default class BalanceSheet extends Component { ...@@ -510,25 +510,35 @@ export default class BalanceSheet extends Component {
const handleFormula = (tableMeta) => { const handleFormula = (tableMeta) => {
let arrayFormula = tableMeta.rowData[3].match(/[a-zA-Z]+|[0-9]+|[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]+(?:\.[0-9]+@|)/g) let arrayFormula = tableMeta.rowData[3].match(/[a-zA-Z]+|[0-9]+|[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]+(?:\.[0-9]+@|)/g)
let arrayFormulaConvert = [] let arrayFormulaConvert = []
// // console.log(arrayFormula) // // // console.log(arrayFormula)
let opet = ""
let tambahan = false
arrayFormula.map((item, indexs) => { arrayFormula.map((item, indexs) => {
if (item == '-' || item == '+' || item == '/' || item == '*') { if (item == 'X') {
tambahan = true
} else if (item == '-' || item == '+' || item == '/' || item == '*') {
arrayFormulaConvert.push(item) arrayFormulaConvert.push(item)
} else { } else {
let indexID = dataTable2.findIndex((val) => val[21] == item) let indexID = dataTable2.findIndex((val) => val[21] == item)
// console.log(item) if (tambahan) {
// console.log(indexID) if (item == '-' || item == '+' || item == '/' || item == '*') {
if (indexID !== -1) { opet = item
let valuezz = dataTable2[indexID][tableMeta.columnIndex] } else {
// // console.log(dataTable2[indexID]) arrayFormulaConvert.push(opet == ''? Number(item) : Number(String(opet + String(item))))
arrayFormulaConvert.push(valuezz == "" ? 0 : valuezz) tambahan = false
} else { opet = ""
arrayFormulaConvert.push(Number(item)) }
} else {
if (indexID !== -1) {
let valuezz = dataTable2[indexID][tableMeta.columnIndex]
// // // console.log(dataTable2[indexID])
arrayFormulaConvert.push(valuezz == "" ? 0 : valuezz)
}
} }
} }
}) })
// console.log(arrayFormula) // // console.log(arrayFormula)
// console.log(arrayFormulaConvert) // // console.log(arrayFormulaConvert)
let array = arrayFormulaConvert let array = arrayFormulaConvert
let total = 0 let total = 0
let opt = "" let opt = ""
...@@ -693,10 +703,10 @@ export default class BalanceSheet extends Component { ...@@ -693,10 +703,10 @@ export default class BalanceSheet extends Component {
value={value} value={value}
disabled={true} disabled={true}
// onBlur={(event) => { // onBlur={(event) => {
// // console.log(event.target.value) // // // console.log(event.target.value)
// // updateValue(event.target.value) // // updateValue(event.target.value)
// handleChangeText(event.target.value, tableMeta) // handleChangeText(event.target.value, tableMeta)
// // console.log(dataTable2) // // // console.log(dataTable2)
// }} // }}
/> />
} }
...@@ -784,7 +794,7 @@ export default class BalanceSheet extends Component { ...@@ -784,7 +794,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -807,7 +817,7 @@ export default class BalanceSheet extends Component { ...@@ -807,7 +817,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -870,7 +880,7 @@ export default class BalanceSheet extends Component { ...@@ -870,7 +880,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -893,7 +903,7 @@ export default class BalanceSheet extends Component { ...@@ -893,7 +903,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -955,7 +965,7 @@ export default class BalanceSheet extends Component { ...@@ -955,7 +965,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -978,7 +988,7 @@ export default class BalanceSheet extends Component { ...@@ -978,7 +988,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1040,7 +1050,7 @@ export default class BalanceSheet extends Component { ...@@ -1040,7 +1050,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1063,7 +1073,7 @@ export default class BalanceSheet extends Component { ...@@ -1063,7 +1073,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1125,7 +1135,7 @@ export default class BalanceSheet extends Component { ...@@ -1125,7 +1135,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1148,7 +1158,7 @@ export default class BalanceSheet extends Component { ...@@ -1148,7 +1158,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1210,7 +1220,7 @@ export default class BalanceSheet extends Component { ...@@ -1210,7 +1220,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1233,7 +1243,7 @@ export default class BalanceSheet extends Component { ...@@ -1233,7 +1243,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1295,7 +1305,7 @@ export default class BalanceSheet extends Component { ...@@ -1295,7 +1305,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1318,7 +1328,7 @@ export default class BalanceSheet extends Component { ...@@ -1318,7 +1328,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1380,7 +1390,7 @@ export default class BalanceSheet extends Component { ...@@ -1380,7 +1390,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1403,7 +1413,7 @@ export default class BalanceSheet extends Component { ...@@ -1403,7 +1413,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1465,7 +1475,7 @@ export default class BalanceSheet extends Component { ...@@ -1465,7 +1475,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1488,7 +1498,7 @@ export default class BalanceSheet extends Component { ...@@ -1488,7 +1498,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1550,7 +1560,7 @@ export default class BalanceSheet extends Component { ...@@ -1550,7 +1560,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1573,7 +1583,7 @@ export default class BalanceSheet extends Component { ...@@ -1573,7 +1583,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1635,7 +1645,7 @@ export default class BalanceSheet extends Component { ...@@ -1635,7 +1645,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1658,7 +1668,7 @@ export default class BalanceSheet extends Component { ...@@ -1658,7 +1668,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1720,7 +1730,7 @@ export default class BalanceSheet extends Component { ...@@ -1720,7 +1730,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1743,7 +1753,7 @@ export default class BalanceSheet extends Component { ...@@ -1743,7 +1753,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1805,7 +1815,7 @@ export default class BalanceSheet extends Component { ...@@ -1805,7 +1815,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
...@@ -1828,7 +1838,7 @@ export default class BalanceSheet extends Component { ...@@ -1828,7 +1838,7 @@ export default class BalanceSheet extends Component {
onBlur={(event) => { onBlur={(event) => {
// updateValue(event.target.value) // updateValue(event.target.value)
handleChange(event.target.value, tableMeta) handleChange(event.target.value, tableMeta)
// console.log(dataTable2) // // console.log(dataTable2)
}} }}
/> />
} }
......
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