Check the status of ship confirmed and receivable interface. If the receivable interface is interfaced then only auto invoice program will pickup your sales order number.