you can use "pricelist" feature which based on cost field of product template
Note: you have to specifiy costing method on product category (AVCO), and inventory valuation as (automated)
1. Create product category, costing method "AVCO", Inventory valution "automated.
Note: you need this option in order to automatically update costs in product template.
2. Create your product "product A" for example.
3. create purchase order, add product A to order lines and set purchase price as "100"
Note: after confirming and recieving products in inventory the cost will automatically updated on product template
4. Activate "advanced pricelist rules" feature, and create pricelist based on cost price.
Note: you can create more advanced options, but this is basic idea
the additional price on top of cost is 10$ => sales price would be 100 + 10 = 110$
4. create sales order N#1
Note: first you should select the right pricelist, you can put this pricelist as default to use by reordering pricelists and put customized pricelist on top
5. create purshase order and change purchase price to "200"
6. create sales order N#2
Note: this has been computed based on average costing of "product A" + 10$ from specified pricelist
Hope this will help.