gemcap-be-common 1.4.236 → 1.4.239
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/db/new-summary.ts +2 -2
- package/models/BorrowerCompliance.model.d.ts +41 -18
- package/models/BorrowerCompliance.model.js +2 -4
- package/models/BorrowerCompliance.model.ts +36 -12
- package/models/_index.d.ts +6 -6
- package/package.json +1 -1
- package/services/compliance-borrowers.service.d.ts +24 -24
- package/services/compliance-borrowers.service.js +9 -6
- package/services/compliance-borrowers.service.ts +12 -9
- package/services/financial-compliance.service.ts +3 -3
- package/services/loan-transactions.service.ts +4 -4
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import { LoanProduct } from '../models/LoanProducts.model';
|
|
28
28
|
import { ILoanProductDoc } from '../models/LoanProducts.model';
|
|
29
29
|
import { BorrowerModel } from '../models/Borrower.model';
|
|
30
|
-
import { BorrowerCompliance,
|
|
30
|
+
import { BorrowerCompliance, IComplianceBorrowerDoc } from '../models/BorrowerCompliance.model';
|
|
31
31
|
import {
|
|
32
32
|
ILoanStatementTransaction,
|
|
33
33
|
LOAN_STATEMENT_TRANSACTION_FIELDS,
|
|
@@ -996,7 +996,7 @@ export class LoanTransactionsService {
|
|
|
996
996
|
await Promise.all(productIds.map(async (productId) => {
|
|
997
997
|
const product = await LoanProduct.findById(productId);
|
|
998
998
|
if (product) {
|
|
999
|
-
const foundBorrower:
|
|
999
|
+
const foundBorrower: IComplianceBorrowerDoc = await BorrowerCompliance.findOne({ borrower: product.borrowerId.toString() });
|
|
1000
1000
|
const isActive = foundBorrower.isEmailingActive && foundBorrower.isDailyTransactionsEmailingActive;
|
|
1001
1001
|
borrowerIdsSet.set(product.borrowerId.toString(), isActive);
|
|
1002
1002
|
}
|
|
@@ -1029,7 +1029,7 @@ export class LoanTransactionsService {
|
|
|
1029
1029
|
console.log('unknown borrower', borrowerId);
|
|
1030
1030
|
return;
|
|
1031
1031
|
}
|
|
1032
|
-
const foundBorrower:
|
|
1032
|
+
const foundBorrower: IComplianceBorrowerDoc = await BorrowerCompliance.findOne({ borrower: borrowerId });
|
|
1033
1033
|
if (!foundBorrower) {
|
|
1034
1034
|
return;
|
|
1035
1035
|
}
|
|
@@ -1063,7 +1063,7 @@ export class LoanTransactionsService {
|
|
|
1063
1063
|
if (!borrower.active) {
|
|
1064
1064
|
return;
|
|
1065
1065
|
}
|
|
1066
|
-
const foundBorrower:
|
|
1066
|
+
const foundBorrower: IComplianceBorrowerDoc = await BorrowerCompliance.findOne({ borrower: borrower._id.toString() });
|
|
1067
1067
|
if (!foundBorrower) {
|
|
1068
1068
|
return;
|
|
1069
1069
|
}
|