From 3d55a2b0d031814ad0e92cd64abadbca15057087 Mon Sep 17 00:00:00 2001 From: nicoagostini Date: Thu, 22 May 2025 10:37:05 -0700 Subject: [PATCH] fix/ vehicle depreciation capped at one thousand --- src/util/calculations.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/calculations.js b/src/util/calculations.js index 81ff6bf..979de45 100644 --- a/src/util/calculations.js +++ b/src/util/calculations.js @@ -55,6 +55,9 @@ async function calculateTotalAssetValue(assets) { asset.year = new Date(asset.year).getFullYear(); let age = today.getFullYear() - asset.year; let value = asset.value * Math.pow(0.85, age); + if (value < 1000) { + value = 1000; + } totalAssetValue += value; } else { totalAssetValue += asset.value;