Sales orders can only be deleted if no items have been shipped from the sales order. If any items have been shipped, the corresponding invoice/sale must be removed before the sales order can be deleted. In this case, the sales order should be closed. See Closing a Sales Order. Closing a sales order will remove all remaining 'quantity on sales order' quantities from inventory.
When a Sales Order is deleted, the journal entry is removed from the database and the quantity on sales order values are readjusted. This action will not affect the income statement or balance sheet since a sales order represents an allocation of inventory and not an actual sale (monetary transaction).