So the order record is created automatically when someone submits your order form? If so, why is the invoice not also created automatically - why do you have to generate it yourself?
When I tried, even if I set the order form not to create an invoice (so that I would have to generate it myself), it still applied the discount.
Perhaps if you explain step-by-step what you are doing, I might be able to reproduce the problem, eg:
1) Create a new discount record
2) Set the voucher code to 'ABC'
3) Set auto disable to 'yes'
5) Create an order form
6) Assign a product to one of the fields
7) Assign the 'discount voucher code' order value to a text field
8) Submit the form through the front end