gemcap-be-common 1.4.72 → 1.4.74
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/models/Prospect.model.js
CHANGED
package/models/Prospect.model.ts
CHANGED
|
@@ -534,6 +534,7 @@ export interface IProspectContact {
|
|
|
534
534
|
}
|
|
535
535
|
|
|
536
536
|
export interface IProspect extends IProspectBase, IProspectExternalNew {
|
|
537
|
+
isLocked: boolean;
|
|
537
538
|
probability: number;
|
|
538
539
|
businessDescription: string;
|
|
539
540
|
comments: string;
|
|
@@ -729,6 +730,9 @@ const ProspectInfoSchema = {
|
|
|
729
730
|
|
|
730
731
|
export const ProspectSchema = new mongoose.Schema<IProspect, ProspectModel>(
|
|
731
732
|
{
|
|
733
|
+
isLocked: {
|
|
734
|
+
type: Boolean,
|
|
735
|
+
},
|
|
732
736
|
isDeclined: {
|
|
733
737
|
type: Boolean,
|
|
734
738
|
},
|
package/package.json
CHANGED
|
@@ -554,7 +554,8 @@ class LoanStatementService {
|
|
|
554
554
|
async addBalancesToStatements(transactionDocs) {
|
|
555
555
|
return await Promise.all(transactionDocs.map(async (item) => {
|
|
556
556
|
const charge = await LoanCharges_model_1.LoanCharge.findById(item.chargeId).lean();
|
|
557
|
-
const
|
|
557
|
+
const balanceDate = dayjs_1.default.utc(item.date).add(1, 'day').subtract(1, 'second').toDate();
|
|
558
|
+
const balances = await this.loanChargesService.getLoanProductBalance(charge.productId.toString(), balanceDate);
|
|
558
559
|
return { ...item, floatedBalance: balances.floatedBalance };
|
|
559
560
|
}));
|
|
560
561
|
}
|
|
@@ -635,7 +635,8 @@ export class LoanStatementService {
|
|
|
635
635
|
async addBalancesToStatements(transactionDocs: ILoanStatementTransactionDoc[]) {
|
|
636
636
|
return await Promise.all(transactionDocs.map(async (item) => {
|
|
637
637
|
const charge = await LoanCharge.findById(item.chargeId).lean();
|
|
638
|
-
const
|
|
638
|
+
const balanceDate = dayjs.utc(item.date).add(1, 'day').subtract(1, 'second').toDate();
|
|
639
|
+
const balances = await this.loanChargesService.getLoanProductBalance(charge.productId.toString(), balanceDate);
|
|
639
640
|
return { ...item, floatedBalance: balances.floatedBalance };
|
|
640
641
|
}));
|
|
641
642
|
}
|