diff --git a/src/app/(app)/orders/page.tsx b/src/app/(app)/orders/page.tsx index 44b6fe0..b321ff6 100644 --- a/src/app/(app)/orders/page.tsx +++ b/src/app/(app)/orders/page.tsx @@ -755,6 +755,50 @@ function OrderCard({ {order.potential_delivery_note_number} )} + {/* Order-number-duplicate pill — set by + suggestOrderNumberDuplicate when another order (any + status, no time limit) shares this exact order_number. + Red — this is the one most likely to indicate an + actual accident (a repeated internal ORD- number, or + an operator not realizing a PO was already entered), + as opposed to the item-duplicate pill below which is + routinely legitimate (split PO deliveries). */} + {order.order_number_duplicate && ( + + Dup # + + )} + {/* Item-duplicate pill — set by suggestOrderDuplicate when + this order's line items exactly match another order + for the same company within the last 60 days, + regardless of status. Amber, distinct from the DN + pill's blue (a repeat ORDER, not a repeat DELIVERY) + and from the order-number pill's red (this one is + routinely legitimate — a customer re-ordering the + same basket — not necessarily a mistake). */} + {order.potential_duplicate_order_number && ( + + Dup of {order.potential_duplicate_order_number} + + )} {complete && } ·