• I've solved this now simply by putting this statement within a SUM statement (the same as for charges and payments)

    (CASE WHEN t.LedgerType = 1 THEN t.LedgerAmount ELSE 0.00 END) * -1 AS Contracts

    that way we don't need to include the LedgerType or LedgerAmount in the select and group by's.

    I'm not really sure why that works but it does.