Barter transactions

How are barter transactions reflected in IS? I thought they had to be reflected as a revenue and as a expense, so they cancelled each other… now I’m not so sure if this is correct…

anyone knows? thanks!