Looking at the raw output using ->OrOn, it does produce the wrong query. I need some way to group and can't find it in the docs.
SELECT *
FROM `statement_transactions` AS `st`
INNER JOIN `quickbooks_transactions` AS `qb`
ON `st`.`statement_id` = `qb`.`statement_id`
AND `st`.`invoice_nbr_clean` = `qb`.`invoice_nbr_clean`
AND `st`.`transaction_date` = `qb`.`transaction_date`
AND `st`.`transaction_type_id` = `qb`.`transaction_type_id`
AND `st`.`original_amount` = `qb`.`original_amount`
OR `st`.`balance` = `qb`.`balance`
WHERE `st`.`statement_id` = ?
AND `qb`.`found_in_quickbooks` = ?
AND `qb`.`quickbooks_ref_id` IS NOT NULL