/** Received vs expected qty display tone for the received-qty column. */
export type PoWorkbenchReceivedQtyTone = "complete" | "variance" | "none";

/** complete = on target or over; variance = under only; none = not received (purchase UoM). */
export function getPoWorkbenchReceivedQtyTone(
  receivedQtyPurchase: number,
  expectedQty: number,
): PoWorkbenchReceivedQtyTone {
  if (receivedQtyPurchase <= 0) return "none";
  if (receivedQtyPurchase >= expectedQty) return "complete";
  return "variance";
}
