Commit 2104d044 authored by Riri Novita's avatar Riri Novita

tanggal excel

parent 82b1f8fd
......@@ -435,7 +435,7 @@ export default class ListOfCreditFacilities extends Component {
fileHandler = (event) => {
let fileObj = event
ExcelRenderer(fileObj, (err, resp) => {
// console.log(resp)
console.log(resp)
if (err) {
console.log(err);
}
......@@ -446,9 +446,15 @@ export default class ListOfCreditFacilities extends Component {
let reg = /^[-+]?(?:[0-9]+,)*[0-9]+(?:\.[0-9]+)?$/;
isi.map((i, index) => {
if (i.length > 0) {
let excelDate = i[5]
let excelBaseDate = new Date('1900-01-01');
let javascriptBaseDate = new Date('1970-01-01');
let daysBetween = excelDate - 1;
let javascriptDate = new Date(excelBaseDate.getTime() + (daysBetween * 24 * 60 * 60 * 1000));
let tgl = String(i[5]).split('-')
console.log(i[5])
console.log(tgl)
console.log(javascriptDate);
payload.push({
"item_report_id": i[1],
"borrower_comp_name": this.props.company.company_name,
......@@ -1675,7 +1681,7 @@ export default class ListOfCreditFacilities extends Component {
}
})
if (column == 22) {
totalLoan = valuez
totalLoan = valuez
}
} else {
if (column == 21) {
......@@ -1687,9 +1693,9 @@ export default class ListOfCreditFacilities extends Component {
} else if (column == 24) {
valuez = Number(tableMeta.rowData[13]) - Number(tableMeta.rowData[22])
}
}
dataTable2[tableMeta.rowIndex][column] = valuez
dataTable2[tableMeta.rowIndex][column] = valuez
return valuez
}
......@@ -3295,7 +3301,7 @@ export default class ListOfCreditFacilities extends Component {
placeholder=""
disabled={true}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={this.props.defaultCurrency.id == 1 ? (fixNumber(Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")), 2)) : (Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")) == 0 ? "0.0" : Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")) )}
value={this.props.defaultCurrency.id == 1 ? (fixNumber(Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")), 2)) : (Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")) == 0 ? "0.0" : Number(handleTableRatio(tableMeta.rowData[32], tableMeta, 32, "EBITDA to Interest - YTD")))}
/>
}
/>
......@@ -3507,7 +3513,7 @@ export default class ListOfCreditFacilities extends Component {
fixedDecimalScale={this.props.defaultCurrency.id == 1 ? true : false}
// decimalScale={2}
decimalScale={this.props.defaultCurrency.id == 1 ? 2 : 16}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[37]), 2) : Number(tableMeta.rowData[37]) == 0 ? "0.0" : Number(tableMeta.rowData[37])}
value={this.props.defaultCurrency.id == 1 ? fixNumber(Number(tableMeta.rowData[37]), 2) : Number(tableMeta.rowData[37]) == 0 ? "0.0" : Number(tableMeta.rowData[37])}
onBlur={(event) => {
handleChange(event.target.value, tableMeta, 37)
}}
......
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