fin_info_table_error:GWM
This commit is contained in:
parent
c414b9bf69
commit
ea1ac0e7c2
@ -96,10 +96,12 @@ exports.PullCreditPdData = async (req, res) => {
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
if(ObjectValue == "" && OverallKey == "Financial Information"){ delete OverallValue[ObjectKey]; }
|
||||||
|
else {
|
||||||
Object.assign(obj, { [ObjectKey]: ObjectValue });
|
Object.assign(obj, { [ObjectKey]: ObjectValue });
|
||||||
if (OverallKey == "Borrower & Guarantor Details" && ObjectKey == "common_remarks") { Object.assign(GenInfoObj,{remarks : ObjectValue}) };
|
if (OverallKey == "Borrower & Guarantor Details" && ObjectKey == "common_remarks") { Object.assign(GenInfoObj,{remarks : ObjectValue}) };
|
||||||
if (OverallKey == "Loan details" && ObjectKey == "loan_amount") { Object.assign(GenInfoObj,{loan_amount : ObjectValue}) };
|
if (OverallKey == "Loan details" && ObjectKey == "loan_amount") { Object.assign(GenInfoObj,{loan_amount : ObjectValue}) };
|
||||||
if (OverallKey == "Officer Details") { Object.assign(GenInfoObj,{[ObjectKey] : ObjectValue}) };
|
if (OverallKey == "Officer Details") { Object.assign(GenInfoObj,{[ObjectKey] : ObjectValue}) };}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// DB Insertion
|
// DB Insertion
|
||||||
|
|||||||
@ -39,9 +39,11 @@ catch (error) {
|
|||||||
async function OBJECT(OverAllobject , objectKey , ParticularObj) {
|
async function OBJECT(OverAllobject , objectKey , ParticularObj) {
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
const DumpObject = {"address_type" : "address_type" , "pd_locality" : "locality_name", "pd_location" : "description" , "comment_locality" : "rating" , "relationship" : "name" , "company_relation" : "name"} ;
|
const DumpObject = {"address_type" : "address_type" , "pd_locality" : "locality_name", "pd_location" : "description" , "comment_locality" : "rating" , "relationship" : "name" , "company_relation" : "name"} ;
|
||||||
return new Promise((resolve, reject) =>
|
return new Promise((resolve, reject) =>
|
||||||
{
|
{
|
||||||
|
// if(OverAllobject[objectKey] == ""){delete OverAllobject[objectKey];}
|
||||||
Objkey = DumpObject[objectKey];
|
Objkey = DumpObject[objectKey];
|
||||||
Object.assign(OverAllobject , { [objectKey] : ParticularObj[Objkey]})
|
Object.assign(OverAllobject , { [objectKey] : ParticularObj[Objkey]})
|
||||||
resolve(OverAllobject)
|
resolve(OverAllobject)
|
||||||
@ -86,6 +88,7 @@ async function ARRAY(Array , GenInfoObj , OverallKey) {
|
|||||||
{
|
{
|
||||||
Array.forEach(async(element,index,array) => {
|
Array.forEach(async(element,index,array) => {
|
||||||
for (var [Key, Value] of Object.entries(element)) {
|
for (var [Key, Value] of Object.entries(element)) {
|
||||||
|
// if(Value == ""){delete element[Key];}
|
||||||
if (typeof Value === "object" && ( Value !== null )) {
|
if (typeof Value === "object" && ( Value !== null )) {
|
||||||
Obj = await OBJECT( element, Key , Value );
|
Obj = await OBJECT( element, Key , Value );
|
||||||
Object.assign(ArrayObj, Obj )
|
Object.assign(ArrayObj, Obj )
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user