Transportation-in or freight-in costs are part of the cost of goods purchased. The cost of goods (or any asset) includes all costs necessary to get an asset in place and ready for use. Transportation-in costs are allocated to the products purchased and will "cling" to the products. Those products in inventory (items not yet sold) will include their share of the transportation-in costs (as part of the inventory cost). The products that have been sold, will include their share of the transportation-in costs (as part of the cost of goods sold).
Transportation-out or freight-out costs are not product costs and are not inventoriable. Transportation-out costs are costs of selling the products and will appear as a selling expense (perhaps as Delivery Expense) in the period in which they occur.