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,
......@@ -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")))}
/>
}
/>
......
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