First identify what kind of costing is used during manufacturing process. For example, if you use absorption costing, all overheads will be absorbed into the cost of unit. The disadvantage here is, if other batches and orders are manufactured perpendicularly, then the costing is not accurate as other products costs will be allocated to this product. So, keep track of batch costing and add a markup for profits. I believe you must be like a wholesaler distributing finished goods to retailers and hence profit margins vary as yours will be lower than the actual selling price.
Next, the ledger accounts needed for production and sales are:
Debtors
Creditors
Inventory
Purchases
Sales
Fixed overheads
Variable overheads
When they have paid for it, COGS, the purchases, closing and opening inventory, direct material entries will be zero. The rest is the same, account for expenses and overhead costs. Eg
Add: Direct Materials Used
Add: Direct Labor Used
Add: Manufacturing Overhead
Add: Beginning Work in Process (WIP) Inventory
Deduct: Ending Work in Process (WIP) Inventory
= COGM
Add this to COGS along with depreciation. It should work out.