gemcap-be-common 1.3.124 → 1.3.126
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/package.json +1 -1
- package/services/compliance-borrowers.service.d.ts +1 -1
- package/services/loan-payments.service.d.ts +2 -0
- package/services/loan-payments.service.js +2 -0
- package/services/loan-payments.service.ts +2 -0
- package/services/loan-statement.service.d.ts +4 -4
- package/services/loan-statement.service.js +6 -6
- package/services/loan-statement.service.ts +6 -6
- package/tsconfig.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -45,7 +45,7 @@ export declare class ComplianceBorrowersService {
|
|
|
45
45
|
};
|
|
46
46
|
};
|
|
47
47
|
getFullComplianceBorrowerById(complianceBorrowerId: any): Promise<any>;
|
|
48
|
-
getAllBorrowersShortened(userAccess: any): Promise<(Pick<IComplianceBorrowerDocument, "
|
|
48
|
+
getAllBorrowersShortened(userAccess: any): Promise<(Pick<IComplianceBorrowerDocument, "borrower" | "fundingStatus" | "items"> | {
|
|
49
49
|
items: {
|
|
50
50
|
instances: any[];
|
|
51
51
|
item: import("../models/ComplianceItem.model").IComplianceItemDocument;
|
|
@@ -415,6 +415,8 @@ class LoanPaymentsService {
|
|
|
415
415
|
borrowerTitle: borrower.name,
|
|
416
416
|
totalDue: dueAmounts.total,
|
|
417
417
|
productTotals: dueAmounts.productTotals,
|
|
418
|
+
revolverBalance: dueAmounts.revolverBalance,
|
|
419
|
+
termBalance: dueAmounts.termBalance,
|
|
418
420
|
};
|
|
419
421
|
}));
|
|
420
422
|
return { borrowers: borrowersData, isCalculated: !!isCalculated };
|
|
@@ -462,6 +462,8 @@ export class LoanPaymentsService {
|
|
|
462
462
|
borrowerTitle: borrower.name,
|
|
463
463
|
totalDue: dueAmounts.total,
|
|
464
464
|
productTotals: dueAmounts.productTotals,
|
|
465
|
+
revolverBalance: dueAmounts.revolverBalance,
|
|
466
|
+
termBalance: dueAmounts.termBalance,
|
|
465
467
|
};
|
|
466
468
|
}),
|
|
467
469
|
);
|
|
@@ -166,8 +166,8 @@ export declare class LoanStatementService {
|
|
|
166
166
|
total: number;
|
|
167
167
|
totalPaid: number;
|
|
168
168
|
dueDate: any;
|
|
169
|
-
|
|
170
|
-
|
|
169
|
+
revolverBalance: number;
|
|
170
|
+
termBalance: number;
|
|
171
171
|
}>;
|
|
172
172
|
private getOutstandingStatements;
|
|
173
173
|
getOutstandingStatementsExcel(borrowerIds: string[], selectedDate: Date, fullMonth: boolean): Promise<any>;
|
|
@@ -178,8 +178,8 @@ export declare class LoanStatementService {
|
|
|
178
178
|
total: number;
|
|
179
179
|
totalPaid: number;
|
|
180
180
|
dueDate: any;
|
|
181
|
-
|
|
182
|
-
|
|
181
|
+
revolverBalance: number;
|
|
182
|
+
termBalance: number;
|
|
183
183
|
}>;
|
|
184
184
|
getProductsTotals(productIds: string[]): Promise<{
|
|
185
185
|
[productId: string]: number;
|
|
@@ -723,18 +723,18 @@ class LoanStatementService {
|
|
|
723
723
|
total: 0,
|
|
724
724
|
totalPaid: 0,
|
|
725
725
|
dueDate: null,
|
|
726
|
-
|
|
727
|
-
|
|
726
|
+
revolverBalance: 0,
|
|
727
|
+
termBalance: 0,
|
|
728
728
|
};
|
|
729
729
|
await Promise.all(products.map(async (product) => {
|
|
730
730
|
const lastTransaction = await this.loanTransactionsService.getLastTransactionForDate(product._id.toString(), end.toDate());
|
|
731
731
|
if (lastTransaction) {
|
|
732
732
|
switch (product.type) {
|
|
733
|
-
case loan_types_enum_1.ELoanTypes.TERM: {
|
|
734
|
-
data.balanceTerm = lastTransaction.balance ?? 0;
|
|
735
|
-
}
|
|
736
733
|
case loan_types_enum_1.ELoanTypes.REVOLVER: {
|
|
737
|
-
data.
|
|
734
|
+
data.revolverBalance = lastTransaction.balance ?? 0;
|
|
735
|
+
}
|
|
736
|
+
case loan_types_enum_1.ELoanTypes.TERM: {
|
|
737
|
+
data.termBalance = lastTransaction.balance ?? 0;
|
|
738
738
|
}
|
|
739
739
|
}
|
|
740
740
|
}
|
|
@@ -816,18 +816,18 @@ export class LoanStatementService {
|
|
|
816
816
|
total: 0,
|
|
817
817
|
totalPaid: 0,
|
|
818
818
|
dueDate: null,
|
|
819
|
-
|
|
820
|
-
|
|
819
|
+
revolverBalance: 0,
|
|
820
|
+
termBalance: 0,
|
|
821
821
|
};
|
|
822
822
|
await Promise.all(products.map(async (product) => {
|
|
823
823
|
const lastTransaction = await this.loanTransactionsService.getLastTransactionForDate(product._id.toString(), end.toDate());
|
|
824
824
|
if (lastTransaction) {
|
|
825
825
|
switch (product.type) {
|
|
826
|
-
case ELoanTypes.TERM: {
|
|
827
|
-
data.balanceTerm = lastTransaction.balance ?? 0;
|
|
828
|
-
}
|
|
829
826
|
case ELoanTypes.REVOLVER: {
|
|
830
|
-
data.
|
|
827
|
+
data.revolverBalance = lastTransaction.balance ?? 0;
|
|
828
|
+
}
|
|
829
|
+
case ELoanTypes.TERM: {
|
|
830
|
+
data.termBalance = lastTransaction.balance ?? 0;
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
833
|
}
|