susee , loanDetail api
This commit is contained in:
parent
f68f6e396c
commit
60d252a110
@ -953,13 +953,7 @@ exports.updateLoanDetail = async (req, res) =>
|
|||||||
delete req.body.id;
|
delete req.body.id;
|
||||||
delete req.body.updatedby;
|
delete req.body.updatedby;
|
||||||
// update old value is_active = 0 where requested id
|
// update old value is_active = 0 where requested id
|
||||||
await LoanDetail.update({ updatedby : updatedby ,is_active : 0 },{ where: { id: id }});
|
await LoanDetail.update(req.body,{ where: { id: id }})
|
||||||
// create new entry
|
|
||||||
LoanDetail.create(req.body).then(data =>
|
|
||||||
{
|
|
||||||
res.send({'status':200,'message':"success",'data':data});
|
|
||||||
|
|
||||||
})
|
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
res.send({'status':404,
|
res.send({'status':404,
|
||||||
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
|
message: err.message || "Some error occurred while retrieving statements." ,'data': "No data" });
|
||||||
|
|||||||
@ -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))))
|
|
||||||
// )
|
|
||||||
// )
|
|
||||||
Loading…
Reference in New Issue
Block a user