Intercompany Transactions Help?

I don't feel Yeager explained this well and so I would like someone's advice on if I am doing this correctly. This is the method I made up and it seems to work but I would like confirmation. It has worked with the 2 questions I have found on it so far: A sells 60 of merch to B. A cogs is 40. His profit is 20. B ending inventory is 30. Summary: A sales = 60 A cogs = 40 A GP % = 1/3% B Ending Inventory = 30 With that said, all I do is multiply the GP % by the EI to derecognize the profit and this will be my EI journal entry. The JE would be: sales 60 EI 10 cogs 50 [plug] dr sales 60 (this is obvious cause I always dr sales for whatever the total sales amount is) cr EI 10 (from calculation above) cr cogs (plug) Thanks!