GWM:pd_errors

This commit is contained in:
sriramv 2023-04-03 13:06:36 +05:30
parent 2f66fe9bea
commit 567030b99e

View File

@ -18,7 +18,7 @@ exports.PullCreditPdData = async (req, res) => {
CreditGeneralInformationDataExist = await CreditGeneralInformation.findOne({ where : { ref_no : req.body.pdid ,product:req.body.product,case_no :req.body.caseno, is_active : 1 }}); CreditGeneralInformationDataExist = await CreditGeneralInformation.findOne({ where : { ref_no : req.body.pdid ,product:req.body.product,case_no :req.body.caseno, is_active : 1 }});
if(CreditGeneralInformationDataExist) if(CreditGeneralInformationDataExist)
{ {
CreditGeneralInformation.destroy({ where : { pd_id : CreditGeneralInformationDataExist.dataValues.pd_id}, await CreditGeneralInformation.destroy({ where : { pd_id : CreditGeneralInformationDataExist.dataValues.pd_id},
include : [ include : [
{model: CreditAddressDetail }, {model: CreditFuturePlans }, {model: CreditAddressDetail }, {model: CreditFuturePlans },
{model : CreditBorrowerAndGuarantorDetails }, {model : CreditBorrowerAndGuarantorDetails },