diff --git a/app/controllers/excel.controller.js b/app/controllers/excel.controller.js index b4f6964..d9757df 100644 --- a/app/controllers/excel.controller.js +++ b/app/controllers/excel.controller.js @@ -29,6 +29,8 @@ exports.ImportExcelData = async (req, res , filename) => { if(sheetName.toUpperCase() == 'PROPRIETORSHIP'){ where_Condition = { losid : losid , entity_type : 'PROPRIETORSHIP' } + }else if(sheetName.toUpperCase() == 'PARTNERSHIP'){ + where_Condition = { losid : losid , entity_type : 'PARTNERSHIP' } }else{ where_Condition = { losid : losid , cin : sheetName } } diff --git a/app/controllers/financial.controller.js b/app/controllers/financial.controller.js index a9a44ee..13fd0fe 100644 --- a/app/controllers/financial.controller.js +++ b/app/controllers/financial.controller.js @@ -97,15 +97,12 @@ exports.MenuList = async (req, res) => { const cin = Entitydata.dataValues.cin; if(cin != "") { - + const entityid = Entitydata.dataValues.id; if(Entitydata.dataValues.entity_type == 'PROPRIETORSHIP') { // create skeleton here financialControllerHelper.createSkeleton(losid,entityid); - }else if(Entitydata.dataValues.entity_type == 'PARTNERSHIP' && Entitydata.dataValues.bizname.slice(-3) != 'LLP'){ - // create skeleton here - financialControllerHelper.createSkeleton(losid,entityid); } @@ -176,12 +173,15 @@ exports.MenuList = async (req, res) => { } // end of probe42 api responce success else condition });//end of probe42 api call } else { - + console.log(Entitydata.dataValues.bizname.slice(-3)); if(Entitydata.dataValues.entity_type == 'PROPRIETORSHIP') { // create skeleton here financialControllerHelper.createSkeleton(losid,Entitydata.dataValues.id); - } + }else if(Entitydata.dataValues.entity_type == 'PARTNERSHIP' && Entitydata.dataValues.bizname.slice(-3) != 'LLP'){ + // create skeleton here + financialControllerHelper.createSkeleton(losid,Entitydata.dataValues.id); + } // resolve here if (key === array.length -1) { resolve(); } logMsg.info("CIN no not exist for losid = "+losid+" and entity name ="+Entitydata.dataValues.bizname);