Skeletion_merge:GWM
This commit is contained in:
parent
0375343e82
commit
fb042292b2
@ -339,7 +339,7 @@ exports.createFinancialYear = async (req, res) => {
|
|||||||
const Y2_st_type = Entityfinyearsdata.dataValues.Y1_st_type;
|
const Y2_st_type = Entityfinyearsdata.dataValues.Y1_st_type;
|
||||||
const Y3_st_type = Entityfinyearsdata.dataValues.Y2_st_type;
|
const Y3_st_type = Entityfinyearsdata.dataValues.Y2_st_type;
|
||||||
const Y4_st_type = Entityfinyearsdata.dataValues.Y3_st_type;
|
const Y4_st_type = Entityfinyearsdata.dataValues.Y3_st_type;
|
||||||
Financials.update({ Y1:Y1,Y2:Y2,Y3:Y3,Y4:Y4,Y1_st_type:Y1_st_type,Y2_st_type:Y2_st_type,Y3_st_type:Y3_st_type,Y4_st_type:Y4_st_type },{ where: { id: id }})
|
Entityfinyears.update({ Y1:Y1,Y2:Y2,Y3:Y3,Y4:Y4,Y1_st_type:Y1_st_type,Y2_st_type:Y2_st_type,Y3_st_type:Y3_st_type,Y4_st_type:Y4_st_type },{ where: { id: id }})
|
||||||
.then(UpdatedEntityfinyearsdata => {
|
.then(UpdatedEntityfinyearsdata => {
|
||||||
|
|
||||||
// generate new financials data array for given FY with entity_id
|
// generate new financials data array for given FY with entity_id
|
||||||
@ -351,15 +351,16 @@ exports.createFinancialYear = async (req, res) => {
|
|||||||
}
|
}
|
||||||
//bulk financials data create
|
//bulk financials data create
|
||||||
Financials.bulkCreate(fin_data_array);
|
Financials.bulkCreate(fin_data_array);
|
||||||
|
//response
|
||||||
|
res.send({'status':200,'message':"success",'data':"No data"});
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
res.status(404).send({'status':404,
|
res.status(404).send({'status':404,
|
||||||
message: err.message || "Some error occurred while insertinging statements." ,'data': "No data" });
|
message: err.message || "Some error occurred while insertinging statements." ,'data': "No data" });
|
||||||
});
|
}); // end of update Entityfinyears
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
res.status(404).send({'status':404,
|
res.status(404).send({'status':404,
|
||||||
message: err.message || "Some error occurred while insertinging statements." ,'data': "No data" });
|
message: err.message || "Some error occurred while insertinging statements." ,'data': "No data" });
|
||||||
});
|
}); // end of findOne Entityfinyears
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user