gemcap-be-common 1.5.24 → 1.5.25
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
|
@@ -403,6 +403,7 @@ class PdfService {
|
|
|
403
403
|
...acc,
|
|
404
404
|
[p._id.toString()]: 0,
|
|
405
405
|
}), {});
|
|
406
|
+
let totalStatementValue = 0;
|
|
406
407
|
const docContent = await Promise.all(productForPeriod.map(async (product, index) => {
|
|
407
408
|
const { startStatementBalance, preparedStatementHeader, preparedStatement, preparedTransactionsHeader, preparedTransactions, groupedData, otherStatements, } = await this.getProductStatementData(product._id.toString(), start, end);
|
|
408
409
|
totalOverDueStatementBalance = new decimal_js_1.default(totalOverDueStatementBalance).add(startStatementBalance).toNumber();
|
|
@@ -466,7 +467,6 @@ class PdfService {
|
|
|
466
467
|
}
|
|
467
468
|
return baseContent;
|
|
468
469
|
}));
|
|
469
|
-
let totalStatementValue = 0;
|
|
470
470
|
const preparedTotal = Object.entries(totalGroupedData).map(([chargeType, amount]) => {
|
|
471
471
|
totalStatementValue = new decimal_js_1.default(totalStatementValue).add(amount).toNumber();
|
|
472
472
|
return [
|
package/services/pdf.service.ts
CHANGED
|
@@ -472,6 +472,8 @@ export class PdfService {
|
|
|
472
472
|
[p._id.toString()]: 0,
|
|
473
473
|
}), {});
|
|
474
474
|
|
|
475
|
+
let totalStatementValue = 0;
|
|
476
|
+
|
|
475
477
|
const docContent = await Promise.all(productForPeriod.map(async (product, index) => {
|
|
476
478
|
const {
|
|
477
479
|
startStatementBalance,
|
|
@@ -556,7 +558,6 @@ export class PdfService {
|
|
|
556
558
|
return baseContent;
|
|
557
559
|
}));
|
|
558
560
|
|
|
559
|
-
let totalStatementValue = 0;
|
|
560
561
|
const preparedTotal = Object.entries(totalGroupedData).map(([chargeType, amount]) => {
|
|
561
562
|
totalStatementValue = new Decimal(totalStatementValue).add(amount).toNumber();
|
|
562
563
|
return [
|