gemcap-be-common 1.5.14 → 1.5.16

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.5.14",
3
+ "version": "1.5.16",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -179,7 +179,6 @@ class LoanStatementService {
179
179
  await loanStatementEffectsService.saveMonthData(productId, statementDate);
180
180
  const charges = await this.loanChargesService.getLoanChargeForProduct(productId);
181
181
  const product = await this.loanChargesService.getLoanProductById(productId);
182
- console.debug({ charges });
183
182
  // If product is already deactivated for this statement date (inclusive) — skip everything early
184
183
  if (product.deactivationDate && (0, dayjs_1.default)(statementDate).isSameOrAfter((0, dayjs_1.default)(product.deactivationDate))) {
185
184
  return;
@@ -189,8 +188,7 @@ class LoanStatementService {
189
188
  let orderIndex = 0;
190
189
  for (const charge of charges) {
191
190
  if (charge.applyFrom.getTime() > statementDate.getTime()) {
192
- console.debug('skipping', { charge, statementDate });
193
- return;
191
+ continue;
194
192
  }
195
193
  const statementDateFormat = (0, dayjs_1.default)(statementDate).format('YYYY-MM-DD');
196
194
  let calculateFee = false;
@@ -294,7 +292,6 @@ class LoanStatementService {
294
292
  return fee;
295
293
  };
296
294
  fee = checkMinAmount(fee);
297
- console.debug({ charge, statementDate, fee, isAfter: (0, dayjs_1.default)(statementDate).isSameOrAfter((0, dayjs_1.default)(charge.applyFrom)) });
298
295
  if (fee !== null && fee > 0) {
299
296
  if ((0, dayjs_1.default)(statementDate).isSameOrAfter((0, dayjs_1.default)(charge.applyFrom))) {
300
297
  const newStatement = {
@@ -219,8 +219,6 @@ export class LoanStatementService {
219
219
  const charges = await this.loanChargesService.getLoanChargeForProduct(productId);
220
220
  const product = await this.loanChargesService.getLoanProductById(productId);
221
221
 
222
- console.debug({ charges });
223
-
224
222
  // If product is already deactivated for this statement date (inclusive) — skip everything early
225
223
  if (product.deactivationDate && dayjs(statementDate).isSameOrAfter(dayjs(product.deactivationDate))) {
226
224
  return;
@@ -231,8 +229,7 @@ export class LoanStatementService {
231
229
  let orderIndex = 0;
232
230
  for (const charge of charges) {
233
231
  if (charge.applyFrom.getTime() > statementDate.getTime()) {
234
- console.debug('skipping', { charge, statementDate });
235
- return;
232
+ continue;
236
233
  }
237
234
  const statementDateFormat = dayjs(statementDate).format('YYYY-MM-DD');
238
235
  let calculateFee = false;
@@ -342,8 +339,6 @@ export class LoanStatementService {
342
339
 
343
340
  fee = checkMinAmount(fee);
344
341
 
345
- console.debug({ charge, statementDate, fee, isAfter: dayjs(statementDate).isSameOrAfter(dayjs(charge.applyFrom)) });
346
-
347
342
  if (fee !== null && fee > 0) {
348
343
  if (dayjs(statementDate).isSameOrAfter(dayjs(charge.applyFrom))) {
349
344
  const newStatement: ILoanStatementTransaction = {