formulaobj:GWM
This commit is contained in:
parent
7e46320941
commit
71e24b07b8
@ -288,6 +288,7 @@ sequelize.query("select a.losid,a.entityid,a.FY,a.st_type as st_type_id, b.state
|
|||||||
const additional_year_type = EntityfinyearData[0][0].additional_year_type;
|
const additional_year_type = EntityfinyearData[0][0].additional_year_type;
|
||||||
if(EntitiesData.dataValues.entity_type == "COMPANY"){entity_type_key = "pvtltd"} else if(EntitiesData.dataValues.entity_type == "INDIVIDUAL"){entity_type_key = "llp"} else {entity_type_key = "others"}
|
if(EntitiesData.dataValues.entity_type == "COMPANY"){entity_type_key = "pvtltd"} else if(EntitiesData.dataValues.entity_type == "INDIVIDUAL"){entity_type_key = "llp"} else {entity_type_key = "others"}
|
||||||
const years = {losid:EntitiesData.dataValues.losid,entityid:EntitiesData.dataValues.id,entity_type_key:entity_type_key,probe42_data_status:probe42_data_status,additional_year_type:additional_year_type};
|
const years = {losid:EntitiesData.dataValues.losid,entityid:EntitiesData.dataValues.id,entity_type_key:entity_type_key,probe42_data_status:probe42_data_status,additional_year_type:additional_year_type};
|
||||||
|
formula_obj = {};
|
||||||
// below function call is for calculation of additional new year flag generation
|
// below function call is for calculation of additional new year flag generation
|
||||||
add_new_FY_flag = financialControllerHelper.addNewFyFlag(year_1);
|
add_new_FY_flag = financialControllerHelper.addNewFyFlag(year_1);
|
||||||
// below code for constructing query for dynamic financial years
|
// below code for constructing query for dynamic financial years
|
||||||
@ -301,6 +302,8 @@ sequelize.query("select a.losid,a.entityid,a.FY,a.st_type as st_type_id, b.state
|
|||||||
years["Y"+year_count+"_st_type_id"] = value.st_type_id;
|
years["Y"+year_count+"_st_type_id"] = value.st_type_id;
|
||||||
years["Y"+year_count+"_st_type_name"] = value.st_type_name;
|
years["Y"+year_count+"_st_type_name"] = value.st_type_name;
|
||||||
years["Y"+year_count+"_probe42_data_fetched"] = value.probe42_data_status;
|
years["Y"+year_count+"_probe42_data_fetched"] = value.probe42_data_status;
|
||||||
|
// formula helper obj construct here for FE calculation
|
||||||
|
formula_obj[value.FY] = {"value_key" : "Y"+year_count+"_value"};
|
||||||
// fin_query construction
|
// fin_query construction
|
||||||
if(key != 0)
|
if(key != 0)
|
||||||
{
|
{
|
||||||
@ -333,7 +336,7 @@ sequelize.query("select a.losid,a.entityid,a.FY,a.st_type as st_type_id, b.state
|
|||||||
if(formVariableResult.type){ camunda_status = {"process_status":"NULL"}; } else { camunda_status =JSON.parse(form_result); }
|
if(formVariableResult.type){ camunda_status = {"process_status":"NULL"}; } else { camunda_status =JSON.parse(form_result); }
|
||||||
setTimeout(function()
|
setTimeout(function()
|
||||||
{
|
{
|
||||||
res.send({'status':200,'message':"success",'data':{"years" : years ,"add_new_finyear_flag" : add_new_FY_flag , status:camunda_status,"summary" : is_summary_item_array , "fin_summary" : summary } });
|
res.send({'status':200,'message':"success",'data':{"years" : years , formula_obj : formula_obj ,"add_new_finyear_flag" : add_new_FY_flag , status:camunda_status,"summary" : is_summary_item_array , "fin_summary" : summary } });
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}); // enf of formVariable api call
|
}); // enf of formVariable api call
|
||||||
}); // enf of taskid api call
|
}); // enf of taskid api call
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user