diff --git a/packages/web/components/InputsTab.tsx b/packages/web/components/InputsTab.tsx index 2d2119f..ccbb284 100644 --- a/packages/web/components/InputsTab.tsx +++ b/packages/web/components/InputsTab.tsx @@ -683,7 +683,13 @@ export function InputsTab({ scenarioId, inputsJson, onSaved }: Props) { const solarTotalCr = computeCostWithTax(costItems, "SolarOnly"); const windTotalCr = computeCostWithTax(costItems, "WindOnly"); const bessTotalCr = computeCostWithTax(costItems, "BESSOnly"); - const totalCostCr = solarTotalCr + windTotalCr + bessTotalCr; + + // Calculate upfront lease cost based on user inputs (acres * rate * years) + const leaseRate = gv(inputs, "project", "land_lease_rate", 0.4); + const leaseYears = gv(inputs, "project", "land_lease_years", 5); + const upfrontLeaseCostCr = effectiveLandAcres * leaseRate * leaseYears; + + const totalCostCr = solarTotalCr + windTotalCr + bessTotalCr + upfrontLeaseCostCr; // COD sync helper function handlePlantCodChange(v: string) { @@ -967,7 +973,7 @@ export function InputsTab({ scenarioId, inputsJson, onSaved }: Props) { - {/* ── Land & Common ────────────────────────────────────── */} + {/* ── Land & Common ────────────────────────────────────── */} upd("project", "land_lease_rate", v)} step={0.05} min={0} @@ -990,7 +996,7 @@ export function InputsTab({ scenarioId, inputsJson, onSaved }: Props) { upd("project", "land_lease_years", v)} step={1} min={1} @@ -998,7 +1004,7 @@ export function InputsTab({ scenarioId, inputsJson, onSaved }: Props) { suffix="yr" />
- Upfront Lease Cost: {effectiveLandAcres * (gv(inputs, "project", "land_lease_rate", 0.4) || 0) * (gv(inputs, "project", "land_lease_years", 5) || 0)} Cr + Upfront Lease Cost (included in Total Project Cost): {upfrontLeaseCostCr.toFixed(2)} Cr