You must have a way in Zoho Books of identifying whether an item is commissionable or not. Then, you start the SQL at the invoice item level and filter out anything that is not commissionable.