gemcap-be-common 1.5.133 → 1.5.134

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.
@@ -167,8 +167,9 @@ class ReportsService {
167
167
  signsService;
168
168
  uploadsService;
169
169
  investorSummaryService;
170
+ financialIndexesService;
170
171
  margin = pdf_service_1.defaultPDFPageMarginSize;
171
- constructor(availabilityService, borrowerService, collateralAdjustmentsService, collateralsService, equipmentService, loanChargesService, loanTransactionsService, signsService, uploadsService, investorSummaryService) {
172
+ constructor(availabilityService, borrowerService, collateralAdjustmentsService, collateralsService, equipmentService, loanChargesService, loanTransactionsService, signsService, uploadsService, investorSummaryService, financialIndexesService) {
172
173
  this.availabilityService = availabilityService;
173
174
  this.borrowerService = borrowerService;
174
175
  this.collateralAdjustmentsService = collateralAdjustmentsService;
@@ -179,6 +180,7 @@ class ReportsService {
179
180
  this.signsService = signsService;
180
181
  this.uploadsService = uploadsService;
181
182
  this.investorSummaryService = investorSummaryService;
183
+ this.financialIndexesService = financialIndexesService;
182
184
  }
183
185
  async getCollateralAdjustmentsForLastSignedBBC(borrowerId, date) {
184
186
  const lastSignedBBC = await this.signsService.getLatestSignedBBCDate(borrowerId, date);
@@ -522,7 +524,7 @@ class ReportsService {
522
524
  startDate,
523
525
  };
524
526
  const options = { showBalances: showFloatedBalance, showFloatedBalance };
525
- return (0, reports_db_1.getLedger)(params, options);
527
+ return (0, reports_db_1.getLedger)(params, options, { getFinancialIndexValue: (index, date) => this.financialIndexesService.getFinancialIndexValue(index, date) });
526
528
  }
527
529
  async getInvestorSummaryReport(selectedBorrowerIds, start, end) {
528
530
  const startFormatted = (0, dayjs_1.default)(start).format(date_helper_1.defaultDateFormat);
@@ -27,6 +27,7 @@ import { LoanChargesService } from './loan-charges.service';
27
27
  import { LoanTransactionsService } from './loan-transactions.service';
28
28
  import { SignsService } from './signs.service';
29
29
  import { UploadsService } from './uploads.service';
30
+ import { FinancialIndexesService } from './financial-indexes.service';
30
31
 
31
32
  export interface IBankReportData {
32
33
  borrowerId?: string;
@@ -240,7 +241,6 @@ const getOtherValue = (reserves: IReserveSummary) => {
240
241
  };
241
242
 
242
243
 
243
-
244
244
  export class ReportsService {
245
245
 
246
246
  margin = defaultPDFPageMarginSize;
@@ -256,6 +256,7 @@ export class ReportsService {
256
256
  private readonly signsService: SignsService,
257
257
  private readonly uploadsService: UploadsService,
258
258
  private readonly investorSummaryService: InvestorSummaryService,
259
+ private readonly financialIndexesService: FinancialIndexesService,
259
260
  ) {
260
261
  }
261
262
 
@@ -636,7 +637,7 @@ export class ReportsService {
636
637
  startDate,
637
638
  };
638
639
  const options: ReportLedgerOptions = { showBalances: showFloatedBalance, showFloatedBalance };
639
- return getLedger(params, options);
640
+ return getLedger(params, options, { getFinancialIndexValue: (index, date) => this.financialIndexesService.getFinancialIndexValue(index, date) });
640
641
  }
641
642
 
642
643
  async getInvestorSummaryReport(selectedBorrowerIds: string[], start: Date, end: Date) {