Hi Ali,
Did I understand right that Qatar buy from UAE. And it's the margin on the invoice of the Sales order in the UAE company that you are interested in?
So surely the fact that UAE is selling on an intercompany sales order is irrelevant. The margin reported on the invoice in the UAE company will be based on the sales price on the sales order and the cost of the item in the UAE company.