In order to generate branch wise fine in Koha, run this SQL Syntax.
It will through the output in excel file which you can filter branch wise.
SELECT p.surname, p.firstname, p.cardnumber, p.address, p.categorycode, p.email, p.emailpro, p.B_email,
format(sum(a.amountoutstanding),2) AS Total_Fine
FROM borrowers p
LEFT JOIN accountlines a USING (borrowernumber)
WHERE a.amountoutstanding > 0 AND p.branchcode=<<Branch|branches>>
GROUP BY a.borrowernumber
Thanks
DP Tripathi