gemcap-be-common 1.5.14 → 1.5.15

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