gemcap-be-common 1.5.13 → 1.5.14

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.13",
3
+ "version": "1.5.14",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -189,6 +189,7 @@ class LoanStatementService {
189
189
  let orderIndex = 0;
190
190
  for (const charge of charges) {
191
191
  if (charge.applyFrom.getTime() > statementDate.getTime()) {
192
+ console.debug('skipping', { charge, statementDate });
192
193
  return;
193
194
  }
194
195
  const statementDateFormat = (0, dayjs_1.default)(statementDate).format('YYYY-MM-DD');
@@ -293,9 +294,7 @@ class LoanStatementService {
293
294
  return fee;
294
295
  };
295
296
  fee = checkMinAmount(fee);
296
- if (charge.chargeType === loan_charge_type_enum_1.ELoanChargeType.ADMIN_FEE) {
297
- console.debug({ charge, statementDate, fee, isAfter: (0, dayjs_1.default)(statementDate).isSameOrAfter((0, dayjs_1.default)(charge.applyFrom)) });
298
- }
297
+ console.debug({ charge, statementDate, fee, isAfter: (0, dayjs_1.default)(statementDate).isSameOrAfter((0, dayjs_1.default)(charge.applyFrom)) });
299
298
  if (fee !== null && fee > 0) {
300
299
  if ((0, dayjs_1.default)(statementDate).isSameOrAfter((0, dayjs_1.default)(charge.applyFrom))) {
301
300
  const newStatement = {
@@ -231,6 +231,7 @@ export class LoanStatementService {
231
231
  let orderIndex = 0;
232
232
  for (const charge of charges) {
233
233
  if (charge.applyFrom.getTime() > statementDate.getTime()) {
234
+ console.debug('skipping', { charge, statementDate });
234
235
  return;
235
236
  }
236
237
  const statementDateFormat = dayjs(statementDate).format('YYYY-MM-DD');
@@ -341,9 +342,7 @@ export class LoanStatementService {
341
342
 
342
343
  fee = checkMinAmount(fee);
343
344
 
344
- if (charge.chargeType === ELoanChargeType.ADMIN_FEE) {
345
- console.debug({ charge, statementDate, fee, isAfter: dayjs(statementDate).isSameOrAfter(dayjs(charge.applyFrom)) });
346
- }
345
+ console.debug({ charge, statementDate, fee, isAfter: dayjs(statementDate).isSameOrAfter(dayjs(charge.applyFrom)) });
347
346
 
348
347
  if (fee !== null && fee > 0) {
349
348
  if (dayjs(statementDate).isSameOrAfter(dayjs(charge.applyFrom))) {