gemcap-be-common 1.5.15 → 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
|
@@ -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,7 +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
|
-
|
|
191
|
+
continue;
|
|
193
192
|
}
|
|
194
193
|
const statementDateFormat = (0, dayjs_1.default)(statementDate).format('YYYY-MM-DD');
|
|
195
194
|
let calculateFee = false;
|
|
@@ -293,9 +292,6 @@ class LoanStatementService {
|
|
|
293
292
|
return fee;
|
|
294
293
|
};
|
|
295
294
|
fee = checkMinAmount(fee);
|
|
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
|
-
}
|
|
299
295
|
if (fee !== null && fee > 0) {
|
|
300
296
|
if ((0, dayjs_1.default)(statementDate).isSameOrAfter((0, dayjs_1.default)(charge.applyFrom))) {
|
|
301
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,7 +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
|
-
|
|
232
|
+
continue;
|
|
235
233
|
}
|
|
236
234
|
const statementDateFormat = dayjs(statementDate).format('YYYY-MM-DD');
|
|
237
235
|
let calculateFee = false;
|
|
@@ -341,10 +339,6 @@ export class LoanStatementService {
|
|
|
341
339
|
|
|
342
340
|
fee = checkMinAmount(fee);
|
|
343
341
|
|
|
344
|
-
if (ELoanChargeType[charge.chargeType] === ELoanChargeType.ADMIN_FEE) {
|
|
345
|
-
console.debug({ charge, statementDate, fee, isAfter: dayjs(statementDate).isSameOrAfter(dayjs(charge.applyFrom)) });
|
|
346
|
-
}
|
|
347
|
-
|
|
348
342
|
if (fee !== null && fee > 0) {
|
|
349
343
|
if (dayjs(statementDate).isSameOrAfter(dayjs(charge.applyFrom))) {
|
|
350
344
|
const newStatement: ILoanStatementTransaction = {
|