diff --git a/src/bin/BinyardDisplay.tsx b/src/bin/BinyardDisplay.tsx index a29c482..667b558 100644 --- a/src/bin/BinyardDisplay.tsx +++ b/src/bin/BinyardDisplay.tsx @@ -668,8 +668,19 @@ export default function BinyardDisplay(props: Props) { } }; - const grainQuantityDisplay = (custom?: pond.CustomInventory) => { - + const grainQuantityDisplay = (bushels: number, custom?: pond.CustomInventory) => { + if (custom && custom.bushelsPerTonne <= 1) { + return bushels; + } + + switch (getGrainUnit()) { + case pond.GrainUnit.GRAIN_UNIT_TONNE: + return " mT"; + case pond.GrainUnit.GRAIN_UNIT_TON: + return " t"; + default: + return bushels; + } } const binUtilizationList = () => { @@ -746,6 +757,8 @@ export default function BinyardDisplay(props: Props) { cap = cap * 35.239; unit = " L"; }else{ + amount + cap unit = grainUnitDisplay(inv) }