gemcap-be-common 1.4.72 → 1.4.73

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.4.72",
3
+ "version": "1.4.73",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -554,7 +554,8 @@ class LoanStatementService {
554
554
  async addBalancesToStatements(transactionDocs) {
555
555
  return await Promise.all(transactionDocs.map(async (item) => {
556
556
  const charge = await LoanCharges_model_1.LoanCharge.findById(item.chargeId).lean();
557
- const balances = await this.loanChargesService.getLoanProductBalance(charge.productId.toString(), item.date);
557
+ const balanceDate = dayjs_1.default.utc(item.date).add(1, 'day').subtract(1, 'second').toDate();
558
+ const balances = await this.loanChargesService.getLoanProductBalance(charge.productId.toString(), balanceDate);
558
559
  return { ...item, floatedBalance: balances.floatedBalance };
559
560
  }));
560
561
  }
@@ -635,7 +635,8 @@ export class LoanStatementService {
635
635
  async addBalancesToStatements(transactionDocs: ILoanStatementTransactionDoc[]) {
636
636
  return await Promise.all(transactionDocs.map(async (item) => {
637
637
  const charge = await LoanCharge.findById(item.chargeId).lean();
638
- const balances = await this.loanChargesService.getLoanProductBalance(charge.productId.toString(), item.date);
638
+ const balanceDate = dayjs.utc(item.date).add(1, 'day').subtract(1, 'second').toDate();
639
+ const balances = await this.loanChargesService.getLoanProductBalance(charge.productId.toString(), balanceDate);
639
640
  return { ...item, floatedBalance: balances.floatedBalance };
640
641
  }));
641
642
  }