Margin in Free products Line is zero although it shouldn't !

Hi,

Just want to raise a question in terms of Sales order placing in Sage X3.

When we enter a sales order for item X and get a free good of the same item, the free X will be entered through another line with price 0 and 100% discount ( this is pre-identified in the price list), knowing that items X has a price of $60 and cost of $10, then the margin should be $50.

Once we enter a free good of the same item on the second line; the price will be zero and the discount is 100%, cost is $10 for the 2nd line but once you will see the margin it will stay $50 for the 2 items ( X+Fee X), that means that the system is not calculating the cost of the free item. and the margin will be 50 while it should be 40 (60-(10+10)).

Is there a possible way to resolve this issue by having a built in formula to be adjusted for the way the system calculates the margin?

Thanks in advance