The explanation for this is that there's a setting in QuickBooks (Under "Account & Settings" ==> "Sales" ) called "Custom Transaction Numbers" and if you have this switched on, then QuickBooks does not create an invoice number.
This screen looks like:
The easiest solution is to just switch that feature off in QuickBooks, and then things will start working the way you'd expect.