entity_type

This commit is contained in:
sriramv 2023-08-03 11:02:39 +05:30
parent d4629c3b72
commit 5bf6f37330

View File

@ -27,8 +27,13 @@ exports.ImportExcelData = async (req, res , filename) =>
const resultArray = [];
if(SheetLevelData.length != 0)
{
EntityData = await Entities.findOne({raw:true, where: { losid : losid , cin : sheetName } }).catch(err => {});
if(sheetName.toUpperCase() == 'PROPRIETORSHIP'){
where_Condition = { losid : losid , entity_type : 'PROPRIETORSHIP' }
}else{
where_Condition = { losid : losid , cin : sheetName }
}
EntityData = await Entities.findOne({raw:true, where: where_Condition }).catch(err => {});
if(EntityData)
{
for (const obj of SheetLevelData)