I'm pretty sure that usually, in the last situation with Arby's, the computer would automatically combine things that are part of a combo and apply the discount.
I think most point of sale systems have this built in when your order automatically gets a discount. Specially in supermarkets where the price changes with quantity.