This commit is contained in:
sriramv 2023-03-18 16:40:00 +05:30
parent a1acdf6f7a
commit a833a0ead5
2 changed files with 13 additions and 2 deletions

View File

@ -79,7 +79,7 @@ exports.PullCreditPdData = async (req, res) => {
console.log(tableName);
await tableName.create(element)
.then((successData)=>{logMsg.info(tableName+" insert success ,PdId= "+successData.dataValues.pd_id);})
.catch((err)=>{ logMsg.info(tableName+" insert failed ,PdId = "+PDID.dataValues.pd_id+ " ERR =" + err); });
.catch((err)=>{ logMsg.info(tableName+" insert failed ,PdId = "+PDID.dataValues.pd_id+ " ERR =" + err ); });
});
}

View File

@ -94,6 +94,17 @@ async function ARRAY(Array , GenInfoObj , OverallKey) {
Object.assign(ArrayObj,{ [Key] : Value })
if (OverallKey == "Borrower & Guarantor Details" && Key == "borrower_name" && element.borrower_type == "Main Applicant") { Object.assign(GenInfoObj,{name : element.borrower_name}); }
}
if (OverallKey == "Borrower & Guarantor Details" && Key == "numbers_of_years_business_running" )
{
if(typeof element.numbers_of_years_business_running === 'number')
{
//RoundOfValue = Math.round(element.numbers_of_years_business_running,2).toString();
RoundOfValue = Number((element.numbers_of_years_business_running).toFixed(2).toString());
Object.assign(ArrayObj,{ numbers_of_years_business_running : RoundOfValue });
}
}
}
tempArr.push(ArrayObj)
ArrayObj = { };