You have to create one sales invoice the sale and one purchase invoice for the commission you paid.
If the company who sold your item/service for you transferred the reduced amount (sale minus commission) to your bank account, then you should create a dummy bank account where you tag the sale and the commission to. You also have to make a ‘transfer between accounts’ in which you ‘transfer’ the amount from your current account (or wherever the money arrived) to that dummy account. That should level out everything
Hope that helps
And if you like it it