Hello dinaart,
Where you enter the cost depends on the costing method you are using. Most businesses use a moving average cost. Actual costs of inventory that are transfered to the GL are calculated when items are received into inventory.
You mention you are having problems with the cost per items, although you do not mention where the problem is occurring.
If you allow inventory to go negative (an option in the company profile), then you will be allowed to ship an item before any have been received and costs calculated. This will result in your inventory valuation report not agreeing with the figure in your general ledger.