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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gemcap-be-common",
3
- "version": "1.5.6",
3
+ "version": "1.5.7",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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 = dayjs_1.default.utc(product.deactivationDate).isBefore(dayjs_1.default.utc(end)) ? dayjs_1.default.utc(product.deactivationDate) : dayjs_1.default.utc(end);
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 },
@@ -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 = dayjs.utc(product.deactivationDate).isBefore(dayjs.utc(end)) ? dayjs.utc(product.deactivationDate) : dayjs.utc(end);
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 },