[FIX] Fixes #4026 on discount barcode in POS

Cf the bug report #4026 for detailed explainations about the scenario of the bug.