Idea for a Custom Function: Auto Calculate Margin on a Quote

Idea for a Custom Function: Auto Calculate Margin on a Quote

Hi,

The regular custom function posts are great. It would be great if you could post one that calculates the Margin on an quote, sales order or invoice.

It would have to check each item cost and corresponding selling price on the quote and then calculate the margin and adds it to a "Margin" field (while taking into account discount field)

This field could then be used within reports to average out Sales Reps profitability. Even better as it would be possible to add to dashboards for live updates.


Many thanks in advance!