Good day, Karmi.
The cash transactions will show in the unrealized gain or loss once they have been completed. Which means, the money should be collected or paid first.
You can check the articles my colleague, Catherine_B, provided at the top for more information.
Let us know if you have other questions. We'd be pleased to answer them.