If you receive the publishing error "Duplicate Document Number Error: You must specify a different number. This number has already been used." this means that the invoice number already exists in your QBO account.
You can easily fix it by following these steps:
1.Open your QBO and navigate to Settings >> Account and Settings >> Sales
2.Check that 'Custom transaction numbers' is turned OFF
3.Back to QBO Settings >> Account and Settings >> Advanced
4.Check that 'Warn if duplicate check/bill number is used' is also turned OFF