susee , loanDetail api

This commit is contained in:
suseendhiran17 2022-06-30 13:30:51 +05:30
parent f68f6e396c
commit 60d252a110
2 changed files with 1 additions and 29 deletions

View File

@ -953,13 +953,7 @@ exports.updateLoanDetail = async (req, res) =>
delete req.body.id;
delete req.body.updatedby;
// update old value is_active = 0 where requested id
await LoanDetail.update({ updatedby : updatedby ,is_active : 0 },{ where: { id: id }});
// create new entry
LoanDetail.create(req.body).then(data =>
{
res.send({'status':200,'message':"success",'data':data});
})
await LoanDetail.update(req.body,{ where: { id: id }})
.catch(err => {
res.send({'status':404,
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });

View File

@ -30,25 +30,3 @@ exports.Welcome = (req, res) =>
// IF(
// AND( variance_in_mv1_and_mv2 > 10% , OR (mark_valuation_1 = "",mark_valuation_1 = 0, mark_valuation_2 ="",mark_valuation_2 =0,third_val_not_req="",third_val_not_req=0) ),
// "Inputs Required",
// IF(
// OR( override="", override ="Average"),
// IF( variance_in_mv1_and_mv2 <= 10% ,
// ( mark_valuation_1 + mark_valuation_2 )/2 ,
// ( third_val_not_req + mark_valuation_2 + mark_valuation_1 - MAX(third_val_not_req , mark_valuation_2, mark_valuation_1))/2),
// IF( override ="Lower",
// IF(variance_in_mv1_and_mv2 <= 10% ,
// MIN(mark_valuation_1, mark_valuation_2 ),
// MIN(third_val_not_req ,mark_valuation_2,mark_valuation_1)),
// IF( override ="Higher"
// ,IF(variance_in_mv1_and_mv2 <= 10% ,
// MAX(mark_valuation_1,mark_valuation_2),
// MAX(third_val_not_req ,mark_valuation_2,mark_valuation_1))))
// )
// )