gemcap-be-common 1.5.6 → 1.5.7
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
|
@@ -236,7 +236,9 @@ class PdfService {
|
|
|
236
236
|
}],
|
|
237
237
|
[{ text: 'Commitment amount' }, { text: (0, numbers_helper_1.formatNumbers)(product.commitment), alignment: 'right' }],
|
|
238
238
|
];
|
|
239
|
-
const endDate =
|
|
239
|
+
const endDate = product.deactivationDate
|
|
240
|
+
? (0, dayjs_1.default)(product.deactivationDate).isBefore((0, dayjs_1.default)(end.slice(0, 10))) ? (0, dayjs_1.default)(product.deactivationDate) : (0, dayjs_1.default)(end.slice(0, 10))
|
|
241
|
+
: (0, dayjs_1.default)(end.slice(0, 10));
|
|
240
242
|
const preparedStatementHeader = [
|
|
241
243
|
{ text: `STATEMENT FOR PRODUCT: ${product.name}`, bold: true },
|
|
242
244
|
{ text: `Client: ${borrower.code}`, bold: true },
|
package/services/pdf.service.ts
CHANGED
|
@@ -272,7 +272,9 @@ export class PdfService {
|
|
|
272
272
|
[{ text: 'Commitment amount' }, { text: formatNumbers(product.commitment), alignment: 'right' }],
|
|
273
273
|
];
|
|
274
274
|
|
|
275
|
-
const endDate =
|
|
275
|
+
const endDate = product.deactivationDate
|
|
276
|
+
? dayjs(product.deactivationDate).isBefore(dayjs(end.slice(0, 10))) ? dayjs(product.deactivationDate) : dayjs(end.slice(0, 10))
|
|
277
|
+
: dayjs(end.slice(0, 10));
|
|
276
278
|
|
|
277
279
|
const preparedStatementHeader = [
|
|
278
280
|
{ text: `STATEMENT FOR PRODUCT: ${product.name}`, bold: true },
|