gemcap-be-common 1.5.11 → 1.5.12

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.11",
3
+ "version": "1.5.12",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -293,7 +293,8 @@ class LoanStatementService {
293
293
  };
294
294
  fee = checkMinAmount(fee);
295
295
  if (fee !== null && fee > 0) {
296
- if ((0, dayjs_1.default)(statementDate).isSame((0, dayjs_1.default)(charge.applyFrom)) || (0, dayjs_1.default)(statementDate).isAfter((0, dayjs_1.default)(charge.applyFrom))) {
296
+ console.debug({ charge, statementDate });
297
+ if ((0, dayjs_1.default)(statementDate).isSameOrAfter((0, dayjs_1.default)(charge.applyFrom))) {
297
298
  const newStatement = {
298
299
  order: orderIndex,
299
300
  date: statementDate,
@@ -204,7 +204,6 @@ export class LoanStatementService {
204
204
  statementDate = dayjs().utc().startOf('day').toDate();
205
205
  }
206
206
 
207
-
208
207
  const primeRate = await this.financialIndexesService.getFinancialIndexValue(EFinancialIndex.PRIME_RATE, statementDate);
209
208
  if (!primeRate) {
210
209
  return;
@@ -341,7 +340,8 @@ export class LoanStatementService {
341
340
  fee = checkMinAmount(fee);
342
341
 
343
342
  if (fee !== null && fee > 0) {
344
- if (dayjs(statementDate).isSame(dayjs(charge.applyFrom)) || dayjs(statementDate).isAfter(dayjs(charge.applyFrom))) {
343
+ console.debug({ charge, statementDate });
344
+ if (dayjs(statementDate).isSameOrAfter(dayjs(charge.applyFrom))) {
345
345
  const newStatement: ILoanStatementTransaction = {
346
346
  order: orderIndex,
347
347
  date: statementDate,