A state Court of Appeal panel today affirmed City Controller Ron Galperin’s authority to audit two training institutes run by the powerful International Brotherhood of Electrical Workers, Local 18, and funded by ratepayer money through the Department of Water and Power.

The union has resisted efforts by city officials to audit the Joint Training Institute and the Joint Safety Institute. The DWP has transferred an estimated $40 million into the trusts since they were established in 2000.

The ruling affirmed a lower-court judgment that the controller had the right to audit the nonprofits’ books on an annual basis.