The profit margin calculation formula:
(PricePerUnit x Quantity) - SalesTax - CurrentStockValue
Example:
The level of TEST_SS7052 in "My Inventory" is 5 and the Stock Value is 100.
The Stock Value of one item is 100/5 = 20.
The order #100003 includes 1 item.
According to the formula: 50 * 1 - 8.33 - 20 = 21.67 (profit margin)