gemcap-be-common 1.5.26 → 1.5.27
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
package/services/pdf.service.js
CHANGED
|
@@ -440,8 +440,10 @@ class PdfService {
|
|
|
440
440
|
emptyString,
|
|
441
441
|
...preparedTransactionsHeader,
|
|
442
442
|
preparedTransactions,
|
|
443
|
-
productForPeriod.length === index + 1 ? emptyString : pageBreaker,
|
|
444
443
|
];
|
|
444
|
+
const productPageEnd = productForPeriod.length === index + 1
|
|
445
|
+
? emptyString
|
|
446
|
+
: pageBreaker;
|
|
445
447
|
if (product.type === loan_types_enum_1.ELoanTypes.TERM) {
|
|
446
448
|
const { termLoanTableData, monthlyPrincipal, dueDate, } = await this.getTermLoan(product._id.toString(), new Date(start));
|
|
447
449
|
if (monthlyPrincipal !== null) {
|
|
@@ -465,9 +467,13 @@ class PdfService {
|
|
|
465
467
|
table: { widths: ['*', '*', '*', '*', '*', '*', '*', '*', '*'], body: termLoanTableData },
|
|
466
468
|
layout: 'lightHorizontalLines',
|
|
467
469
|
},
|
|
470
|
+
productPageEnd,
|
|
468
471
|
];
|
|
469
472
|
}
|
|
470
|
-
return
|
|
473
|
+
return [
|
|
474
|
+
...baseContent,
|
|
475
|
+
productPageEnd,
|
|
476
|
+
];
|
|
471
477
|
}));
|
|
472
478
|
const preparedTotal = Object.entries(totalGroupedData).map(([chargeType, amount]) => {
|
|
473
479
|
totalStatementValue = new decimal_js_1.default(totalStatementValue).add(amount).toNumber();
|
package/services/pdf.service.ts
CHANGED
|
@@ -522,9 +522,12 @@ export class PdfService {
|
|
|
522
522
|
emptyString,
|
|
523
523
|
...preparedTransactionsHeader,
|
|
524
524
|
preparedTransactions,
|
|
525
|
-
productForPeriod.length === index + 1 ? emptyString : pageBreaker,
|
|
526
525
|
];
|
|
527
526
|
|
|
527
|
+
const productPageEnd = productForPeriod.length === index + 1
|
|
528
|
+
? emptyString
|
|
529
|
+
: pageBreaker;
|
|
530
|
+
|
|
528
531
|
if (product.type === ELoanTypes.TERM) {
|
|
529
532
|
const {
|
|
530
533
|
termLoanTableData,
|
|
@@ -554,10 +557,14 @@ export class PdfService {
|
|
|
554
557
|
table: { widths: ['*', '*', '*', '*', '*', '*', '*', '*', '*'], body: termLoanTableData },
|
|
555
558
|
layout: 'lightHorizontalLines',
|
|
556
559
|
},
|
|
560
|
+
productPageEnd,
|
|
557
561
|
];
|
|
558
562
|
}
|
|
559
563
|
|
|
560
|
-
return
|
|
564
|
+
return [
|
|
565
|
+
...baseContent,
|
|
566
|
+
productPageEnd,
|
|
567
|
+
];
|
|
561
568
|
}));
|
|
562
569
|
|
|
563
570
|
const preparedTotal = Object.entries(totalGroupedData).map(([chargeType, amount]) => {
|