diff --git a/app/controllers/excel.controller.js b/app/controllers/excel.controller.js index ed4c832..b4f6964 100644 --- a/app/controllers/excel.controller.js +++ b/app/controllers/excel.controller.js @@ -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)