merge latest dev
This commit is contained in:
1 file changed
+4
@@ -129,6 +129,10 @@ async function calculateProgress(plan, assets, users, userId) {
|
|||||||
|
|
||||||
const percentageCalculated = (totalUserAssetValue / (totalUserPlanValue + totalCostOfRetirement)) * 100;
|
const percentageCalculated = (totalUserAssetValue / (totalUserPlanValue + totalCostOfRetirement)) * 100;
|
||||||
|
|
||||||
|
if (monthsUntilRetirement <= 0) {
|
||||||
|
return { monthlyInvestment: 0, totalCostOfRetirement: totalCostOfRetirement, monthsUntilRetirement: 0, yearsRetired: yearsRetired, yearsUntilRetirement: 0, percentage: 0 };
|
||||||
|
}
|
||||||
|
|
||||||
const progress = {};
|
const progress = {};
|
||||||
|
|
||||||
progress.monthlyInvestment = Math.round(monthlyInvestment);
|
progress.monthlyInvestment = Math.round(monthlyInvestment);
|
||||||
|
|||||||
Reference in new issue
Block a user