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.
@@ -277,6 +277,7 @@ export interface IProspectContact {
277
277
  companyName: string;
278
278
  }
279
279
  export interface IProspect extends IProspectBase, IProspectExternalNew {
280
+ isLocked: boolean;
280
281
  probability: number;
281
282
  businessDescription: string;
282
283
  comments: string;
@@ -540,6 +540,9 @@ const ProspectInfoSchema = {
540
540
  },
541
541
  };
542
542
  exports.ProspectSchema = new mongoose_1.default.Schema({
543
+ isLocked: {
544
+ type: Boolean,
545
+ },
543
546
  isDeclined: {
544
547
  type: Boolean,
545
548
  },
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.4.72",
3
+ "version": "1.4.74",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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 balances = await this.loanChargesService.getLoanProductBalance(charge.productId.toString(), item.date);
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 balances = await this.loanChargesService.getLoanProductBalance(charge.productId.toString(), item.date);
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
  }