diff --git a/web/src/components/ProductDetail.tsx b/web/src/components/ProductDetail.tsx index 4c5ca89..4bb84c1 100644 --- a/web/src/components/ProductDetail.tsx +++ b/web/src/components/ProductDetail.tsx @@ -77,11 +77,11 @@ export function ProductDetail({ ["Bin", isCheckedOut ? "In your custody" : bin ? bin.name : ], ["Audit cadence", `Every ${cfg?.cadenceDays ?? "—"} days · ${cfg?.auditMode ?? "—"}`], [ - "Cost per gram", + item.kind === "discrete" ? `Cost per ${cfg?.unit ?? "ct"}` : "Cost per gram", item.kind === "bulk" && item.weight > 0 ? fmt.money(item.price / item.weight) - : item.kind === "discrete" && item.unitWeight > 0 - ? `${fmt.money(item.price / (item.countOriginal * item.unitWeight))} (effective)` + : item.kind === "discrete" && item.countOriginal > 0 + ? fmt.money(item.price / item.countOriginal) : "—", ], ];