gemcap-be-common 1.5.25 → 1.5.26
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
|
@@ -404,6 +404,8 @@ class PdfService {
|
|
|
404
404
|
[p._id.toString()]: 0,
|
|
405
405
|
}), {});
|
|
406
406
|
let totalStatementValue = 0;
|
|
407
|
+
const principalData = [];
|
|
408
|
+
let paymentDueDate = null;
|
|
407
409
|
const docContent = await Promise.all(productForPeriod.map(async (product, index) => {
|
|
408
410
|
const { startStatementBalance, preparedStatementHeader, preparedStatement, preparedTransactionsHeader, preparedTransactions, groupedData, otherStatements, } = await this.getProductStatementData(product._id.toString(), start, end);
|
|
409
411
|
totalOverDueStatementBalance = new decimal_js_1.default(totalOverDueStatementBalance).add(startStatementBalance).toNumber();
|
|
@@ -482,8 +484,6 @@ class PdfService {
|
|
|
482
484
|
{ text: '' }
|
|
483
485
|
]
|
|
484
486
|
: [];
|
|
485
|
-
const principalData = [];
|
|
486
|
-
let paymentDueDate = null;
|
|
487
487
|
const totalOwed = new decimal_js_1.default(totalStatementValue).add(totalOverDueStatementBalance).toNumber();
|
|
488
488
|
if (getOnlyTotal) {
|
|
489
489
|
return { total: totalOwed, dueDate: paymentDueDate, productTotals };
|
package/services/pdf.service.ts
CHANGED
|
@@ -473,6 +473,8 @@ export class PdfService {
|
|
|
473
473
|
}), {});
|
|
474
474
|
|
|
475
475
|
let totalStatementValue = 0;
|
|
476
|
+
const principalData = [];
|
|
477
|
+
let paymentDueDate: Date = null;
|
|
476
478
|
|
|
477
479
|
const docContent = await Promise.all(productForPeriod.map(async (product, index) => {
|
|
478
480
|
const {
|
|
@@ -574,9 +576,6 @@ export class PdfService {
|
|
|
574
576
|
{ text: '' }]
|
|
575
577
|
: [];
|
|
576
578
|
|
|
577
|
-
const principalData = [];
|
|
578
|
-
let paymentDueDate: Date = null;
|
|
579
|
-
|
|
580
579
|
const totalOwed = new Decimal(totalStatementValue).add(totalOverDueStatementBalance).toNumber();
|
|
581
580
|
|
|
582
581
|
if (getOnlyTotal) {
|