Compute margin on sale order

Some business wants the realtime computation of the margins so that sales manager or person can propose the best price to the customer.

Let’s take the business case, sales manager check the margin on order and decide whether we can allow additional discount to the customer or not.


Install the Sales Management application.

Sales Application


If you want to check Margin feature for Average Cost (AVCO) install Purchase Management. Installation of sales and purchase will install other applications such as Inventory Management and Invoicing Management.


Go to Sales / Configuration / Settings select Margins and apply the setting. This will show margins on orders.

Sales Settings


Enter the product Sales Price and Cost accordingly, enter the latest sales and cost price.

Sales Settings

I have entered $1200 sales price and $900 cost price, also defined the $900 purchase price on the vendor pricelist.


Product Cost will be computed automatically when you set the product costing method to Average Cost (AVCO) or First in First Out (FIFO). The FIFO method does not give you correct costing in some case.

Create Sales order

Let’s create a quotation, select the customer on quotation and product on order line. The margin will be computed as soon as you select the product, the difference between Unit Price and Cost is margin. The Margin be computed based on the difference for each lines on sale order.

Sales Settings

Now, it will be easy for the sales manager to check what’s the margin on quotation. For SO004 it is 25%, its a good deal to go with, let’s move forward and confirm the order.