From af90e8893c5b72c14f63f11422effc3bdacadf70 Mon Sep 17 00:00:00 2001 From: csawatzky Date: Tue, 10 Feb 2026 16:58:20 -0600 Subject: [PATCH] fixing an issue with the break evens where if the bushel price or yield target were not set it would try to divide by 0 and get infinity, now it will just display 0 if not set --- src/harvestPlan/HarvestPlanDisplay.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/harvestPlan/HarvestPlanDisplay.tsx b/src/harvestPlan/HarvestPlanDisplay.tsx index ab16547..6917332 100644 --- a/src/harvestPlan/HarvestPlanDisplay.tsx +++ b/src/harvestPlan/HarvestPlanDisplay.tsx @@ -58,25 +58,25 @@ export default function HarvestPlanDisplay(props: Props) { - Break Even Yield: + Break Even Yield (acre): - {( + {plan.bushelPrice() !== 0 ? ( (plan.totalEquipmentCost() + plan.totalMaterialCost()) / plan.bushelPrice() - ).toFixed(2)}{" "} + ).toFixed(2) : 0}{" "} BU - Break Even Sales Price + Break Even Sales Price (BU): $ - {( + {plan.yieldTarget() !== 0 ? ( (plan.totalEquipmentCost() + plan.totalMaterialCost()) / plan.yieldTarget() - ).toFixed(2)} + ).toFixed(2) : 0}