Commit b053abcf authored by Deni Rinaldi's avatar Deni Rinaldi

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

parents 710caf29 161a2e6c
......@@ -290,7 +290,7 @@ export default class ProfitLoss extends Component {
fileHandler = (event) => {
let fileObj = event
ExcelRenderer(fileObj, (err, resp) => {
// console.log(resp)
console.log(resp)
if (err) {
// console.log(err);
}
......@@ -330,7 +330,7 @@ export default class ProfitLoss extends Component {
report_id: this.props.report_id,
profit_loss: payload
}
// console.log(body)
console.log(isi)
this.setState({ payload: body, judul: resp.rows[1][0], judulColumn: resp.rows[2] })
}
});
......@@ -548,12 +548,9 @@ export default class ProfitLoss extends Component {
}
const handleValue = (value, data) => {
let total = 0
if (this.state.fromUpload) {
return value
} else {
dataTable2.map((item, index) => {
if (data.rowData[1] == item[2]) {
total = item[data.columnIndex] == undefined ? (Number(total) + 0) : (Number(total) + Number(item[data.columnIndex]))
total = item[data.columnIndex] == undefined ? (Number(total) + 0) : (Number(total) + Number(String(item[data.columnIndex]).includes('-')? Number(String(item[data.columnIndex]).substr(1, String(item[data.columnIndex]).length)) * -1 : Number(item[data.columnIndex])))
}
})
let indexParent = dataTable2.findIndex((val) => val[1] == dataTable2[data.rowIndex][2])
......@@ -561,7 +558,6 @@ export default class ProfitLoss extends Component {
// console.log(indexParent);
return a
}
}
const handleFormula = (data, tableMeta, month) => {
let arrayFormula = tableMeta.rowData[3].match(/[a-zA-Z]+|[0-9]+|[-!$%^&*()_+|~=`{}\[\]:";'<>?,.\/]+(?:\.[0-9]+@|)/g)
let arrayJumlah = []
......@@ -621,7 +617,7 @@ export default class ProfitLoss extends Component {
} else if (opt == "bagi") {
total = R.equals((Number(total) / Number(item)), NaN) ? '0' : Number(total) / Number(item)
} else {
total += item
total += Number(item)
}
}
})
......
This diff is collapsed.
......@@ -3844,7 +3844,7 @@ export default class BalanceSheetOLPA extends Component {
this.setState({ uploadStatus: 'idle', percentage: '0' })
}}
onUpload={() => {
this.state.judul === "OUTLOOK PA - BALANCE SHEET" ?
String(this.state.judul).includes('OUTLOOK PA - BALANCE') ?
this.checkUpload() :
this.setState({ alert: true, messageAlert: "Invalid Template", tipeAlert: 'warning' })
}}
......
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