gemcap-be-common 1.3.178 → 1.3.179
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
|
@@ -375,6 +375,7 @@ class TermLoanService {
|
|
|
375
375
|
const totalPayment = monthPayments.length > 0 ? monthPayments.reduce((acc, p) => acc + Math.abs(p.amount), 0) : lastMonthPrincipal;
|
|
376
376
|
const totalDisbursements = monthDisbursements.length > 0 ? monthDisbursements.reduce((acc, p) => acc + Math.abs(p.amount), 0) : 0;
|
|
377
377
|
const closingBalance = new decimal_js_1.default(monthOpeningBalance).sub(totalPayment).add(totalDisbursements).toDP(2).toNumber();
|
|
378
|
+
openingBalance = closingBalance;
|
|
378
379
|
const monthlyResult = {
|
|
379
380
|
termLoanId: termLoan._id,
|
|
380
381
|
openingBalance: monthOpeningBalance,
|
|
@@ -453,7 +453,7 @@ export class TermLoanService {
|
|
|
453
453
|
const totalPayment = monthPayments.length > 0 ? monthPayments.reduce((acc, p) => acc + Math.abs(p.amount), 0) : lastMonthPrincipal;
|
|
454
454
|
const totalDisbursements = monthDisbursements.length > 0 ? monthDisbursements.reduce((acc, p) => acc + Math.abs(p.amount), 0) : 0;
|
|
455
455
|
const closingBalance = new Decimal(monthOpeningBalance).sub(totalPayment).add(totalDisbursements).toDP(2).toNumber();
|
|
456
|
-
|
|
456
|
+
openingBalance = closingBalance;
|
|
457
457
|
const monthlyResult: ITermLoanCalculated = {
|
|
458
458
|
termLoanId: termLoan._id,
|
|
459
459
|
openingBalance: monthOpeningBalance,
|