gemcap-be-common 1.5.5 → 1.5.6
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,11 +236,12 @@ class PdfService {
|
|
|
236
236
|
}],
|
|
237
237
|
[{ text: 'Commitment amount' }, { text: (0, numbers_helper_1.formatNumbers)(product.commitment), alignment: 'right' }],
|
|
238
238
|
];
|
|
239
|
+
const endDate = dayjs_1.default.utc(product.deactivationDate).isBefore(dayjs_1.default.utc(end)) ? dayjs_1.default.utc(product.deactivationDate) : dayjs_1.default.utc(end);
|
|
239
240
|
const preparedStatementHeader = [
|
|
240
241
|
{ text: `STATEMENT FOR PRODUCT: ${product.name}`, bold: true },
|
|
241
242
|
{ text: `Client: ${borrower.code}`, bold: true },
|
|
242
243
|
{
|
|
243
|
-
text: `PERIOD FROM ${
|
|
244
|
+
text: `PERIOD FROM ${dayjs_1.default.utc(start).format(defaultDateFormat)} TO ${endDate.format(defaultDateFormat)}`,
|
|
244
245
|
bold: true,
|
|
245
246
|
},
|
|
246
247
|
{
|
package/services/pdf.service.ts
CHANGED
|
@@ -272,11 +272,13 @@ export class PdfService {
|
|
|
272
272
|
[{ text: 'Commitment amount' }, { text: formatNumbers(product.commitment), alignment: 'right' }],
|
|
273
273
|
];
|
|
274
274
|
|
|
275
|
+
const endDate = dayjs.utc(product.deactivationDate).isBefore(dayjs.utc(end)) ? dayjs.utc(product.deactivationDate) : dayjs.utc(end);
|
|
276
|
+
|
|
275
277
|
const preparedStatementHeader = [
|
|
276
278
|
{ text: `STATEMENT FOR PRODUCT: ${product.name}`, bold: true },
|
|
277
279
|
{ text: `Client: ${borrower.code}`, bold: true },
|
|
278
280
|
{
|
|
279
|
-
text: `PERIOD FROM ${dayjs(start
|
|
281
|
+
text: `PERIOD FROM ${dayjs.utc(start).format(defaultDateFormat)} TO ${endDate.format(defaultDateFormat)}`,
|
|
280
282
|
bold: true,
|
|
281
283
|
},
|
|
282
284
|
{
|