Macy sued The City over a previous tax structure that required businesses that operated in San Francisco to figure out if their taxes would be higher based on gross receipts or on payroll expense —and then pay the higher amount. The trial court ruling said The City had violated the state and federal constitutions by taxing companies unequally. The City changed its business tax system in 2001, using only payroll taxes as the basis for a business to calculate its tax liability.

The original decision, by a trial court judge, ordered The City to refund all of the taxes Macy’s had paid between 1995 and 2000 — $13 million — not just the difference between the higher and lower tax calculations.

In its appeal, The City did not argue that the previous tax structure was fair, but fought against the amount of the refund.

"The issue is about the remedy," Dorsey said, "We know we’d have to give them a refund."

In court, one of the experts whom Macy’s legal team called upon argued that a partial refund "would not serve to sufficiently deter local governments from enacting invalid tax measures," according to background information found in the Court of Appeal ruling.

Macy’s was not the only company that went to court with The City over the business tax system. Dozens of other corporations, including Chevron, the Gap, Levi Strauss, General Motors, Safeway, the Giants, Nordstrom and PG&E, also sued, but eventually reached settlements that cost The City an estimated total of about $80 million.

Board of Supervisors President Aaron Peskin said Macy’s didn’t settle because "they were being just plain greedy."

"The appeals court reversed a preposterous decision by the trial court," Peskin said. "Macy’s contention that they were owed $13 million rather than a fraction of that amount was wrong from the beginning."

Calls and e-mails to Macy’s lawyers were not responded to in time for press.