gemcap-be-common 1.5.188 → 1.5.190

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.
@@ -45,6 +45,10 @@ export type TFileUploadContext = {
45
45
  } | {
46
46
  type: 'temporary';
47
47
  userId: string;
48
+ } | {
49
+ type: 'data-room';
50
+ userId: string;
51
+ dataRoomId: string;
48
52
  };
49
53
  export type TUploadedFile = {
50
54
  fieldname: string;
@@ -13,7 +13,8 @@ export type TFileUploadContext =
13
13
  | { type: 'analysis'; userId: string; taskId: string }
14
14
  | { type: 'prospect'; userId: string; prospectId: string }
15
15
  | { type: 'borrower'; userId: string; borrowerId: string }
16
- | { type: 'temporary'; userId: string };
16
+ | { type: 'temporary'; userId: string }
17
+ | { type: 'data-room'; userId: string; dataRoomId: string };
17
18
 
18
19
  export type TUploadedFile = {
19
20
  fieldname: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.5.188",
3
+ "version": "1.5.190",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -182,7 +182,7 @@ class LoanStatementService {
182
182
  const product = await this.loanChargesService.getLoanProductById(productId);
183
183
  const borrowerFinanceSettings = await BorrowerFinanceSettings_model_1.BorrowerFinanceSettings.findOne({ borrowerId: product.borrowerId }).lean().exec();
184
184
  // If borrower accrual is enabled, skip everything early
185
- if (borrowerFinanceSettings && borrowerFinanceSettings.accrualEnabled && (0, dayjs_1.default)(statementDate).isSameOrAfter((0, dayjs_1.default)(borrowerFinanceSettings.accrualAppliedFrom))) {
185
+ if (borrowerFinanceSettings && !borrowerFinanceSettings.accrualEnabled && (0, dayjs_1.default)(statementDate).isSameOrAfter((0, dayjs_1.default)(borrowerFinanceSettings.accrualAppliedFrom))) {
186
186
  return;
187
187
  }
188
188
  // If product is already deactivated for this statement date (inclusive) — skip everything early
@@ -222,7 +222,7 @@ export class LoanStatementService {
222
222
  const borrowerFinanceSettings = await BorrowerFinanceSettings.findOne({ borrowerId: product.borrowerId }).lean().exec();
223
223
 
224
224
  // If borrower accrual is enabled, skip everything early
225
- if (borrowerFinanceSettings && borrowerFinanceSettings.accrualEnabled && dayjs(statementDate).isSameOrAfter(dayjs(borrowerFinanceSettings.accrualAppliedFrom))) {
225
+ if (borrowerFinanceSettings && !borrowerFinanceSettings.accrualEnabled && dayjs(statementDate).isSameOrAfter(dayjs(borrowerFinanceSettings.accrualAppliedFrom))) {
226
226
  return;
227
227
  }
228
228