Philadelphia was never in fact “missing” $33 million. Just $528,000 — for now at least.

After eight months of digging through years of backed-up accounting books, city-hired consultants say various errors — payments made from incorrect accounts and duplicate entries — made it look like the city’s main cash bank account was short tens of million of dollars. But not so.

According to the consultants' report, released Friday, almost all the money in question has been accounted for, and the half-million remainder is expected to be resolved by the Treasurer’s Office and the Reconciliation Task Force created to oversee the process.

The Center City accounting firm of Horsey, Buckner & Heffler LLP was hired on a $500,000 contract to help the city resolve the discrepancy in balances in its main cash bank account and accounting system. In June 2017, the discrepancy was as high as $40.1 million. The Horsey team reviewed about 17,000 deposit transactions and 8,500 payment transactions, all of which were of more than $100,000 each, spanning three years starting in 2014.

The Horsey report says there are eight unmatched deposits left and the discrepancy of $528,000. But city officials say the difference might be because of the timing of transactions.

“There will often be timing differences at the end of months that can result in small differences between the amount shown in the city’s accounting system and the amounts shown in bank statements,” city spokesperson Mike Dunn said.

Nevertheless, Dunn said, the task force will work to resolve the variance.

The issue of the city’s books not matching its bank account came to light in April during City Council budget hearings. Councilman Allan Domb asked the city’s finance director and treasurer why they didn’t seem to have any urgency in finding out why there was a $33 million discrepancy in its accounts, per the city’s Comprehensive Annual Financial Report (CAFR).

City Treasurer Rasheia Johnson, who was appointed by Mayor Jim Kenney in 2016, said she discovered soon after starting the job that some accounts had not been reconciled in years. She hired a new accountant to work on the backlog, and sometime after that, officials discovered the $40 million discrepancy between its books and the main account.

By the time the CAFR was printed in February, the difference was down to $33 million.

After a “flabbergasted” Domb brought up the issue in April, the administration hired Horsey Buckner to help resolve the problem faster. Two months later, the mayor created the task force, co-chaired by Johnson and former City Controller Jonathan Saidel, to oversee the process.

Also, City Controller Rebecca Rhynhart released an audit in June that said Philadelphia had the worst accounting practices among the nation’s 10 largest cities, in which she noted the issue of reconciliation.

The team of accountants had a breakthrough in November when they found that seven debt payments totaling $21 million had been paid from the wrong account, throwing off the books. Since then, the team has resolved $1.6 million more in discrepancies.

Domb, who has been critical of the city’s initial response to the problem, said it shouldn’t have taken a task force and $500,000 for an auditing firm to reconcile accounts.

“I don’t think a level of importance was placed on it,” he said. “Once light was on top of it, then it became an issue that became resolved.”

The Horsey report had several recommendations for the city, including better communication between the Treasurer’s Office and other departments that handle revenue; improving its document retention policy; and a review of the city’s 300 bank accounts to determine “whether they are truly necessary and/or required.”

In response to Horsey’s report, city Finance Director Rob Dubow said, “The credit goes to the task force that the mayor put together and to the team that the city treasurer put together, which included Horsey. The project would not have been completed without everybody’s contributions."