Discount Item only if barcode scanned

you could use ticket discount but use a fixed calculation and update with expression that uses only the values of applicable products.
I do this for my food and drink discount loyalty setup and also for llanned eat out to help out in UK
See that topic for ideas