Much of local government is financed from the central budget. Article 53 of the budget act lists how much each municipality receives — 265 rows a year, since 2018. This page shows that table and orders it two ways.
Sofia receives €718m, Treklyano €2.2m. Per resident that is €564 against €5,028: the ranking inverts ninefold. Both are true and neither is the whole story — a municipality of 434 people still needs a mayor's office and a school, and those costs do not shrink with the population. So the page offers both bases and says why they differ.
Separately from this page the site shows what municipalities owe — commitments, liabilities and arrears under art. 130g of the Public Finance Act. That is a different corpus at a different grain; adding the two produces a number that means nothing.
See also municipal financial standing and the municipal investment programme.