Giles & Ransome had argued most of its sales occurred outside the township.

They spend most of their time in the field visiting customers, keep paperwork in the trunk of their cars and return to the office only when they need to send purchase orders back to headquarters, one of them testified.

Because very few of the sales they make actually occur in Whitehall, the Bucks County-based Caterpillar equipment dealer argued to a Pennsylvania appeals court, revenue generated by those salesmen isn't subject to the township's business privilege tax.

In a decision handed down Monday, Commonwealth Court judges Kevin Brobson and Bonnie Brigance Leadbetter agreed with Giles & Ransome, finding that the company isn't liable for nearly $338,000 in taxes the township claimed it owed for 2002 through 2006.

President Judge Dan Pellegrini sided with the township, noting in a dissenting opinion that he disagrees with the majority's interpretation of the Whitehall tax law, finding instead that the law imposes a tax on all business activity, not just transactions within the township.

Such split decisions often encourage the losing side to pursue a Supreme Court appeal, but an attorney for Whitehall Township did not return calls seeking comment on the decision.

The case, watched closely by tax accountants and municipal officials around the state, highlights confusion over Pennsylvania's patchwork system of local sales taxes and uncertainty over where businesses must pay tax on their earnings.

"It's like the wild west out there right now," said Jeff Berdah, chairman of the Greater Lehigh Valley Chamber of Commerce tax committee.

Although Pennsylvania courts have been working to interpret variations on local business privilege, transaction and mercantile taxes for more than a quarter century, the Commonwealth Court found the dispute between Giles & Ransome and Whitehall to be unique.

The Whitehall Township Tax Board ruled in 2010 that sales by three of the company's salesmen were subject to business privilege tax because they had offices at the company's Whitehall location and used it to pursue sales of heavy equipment, hold meetings, and store brochures, equipment and files.

A two-judge majority of the Commonwealth Court panel reasoned that Whitehall's claim against the Caterpillar dealer isn't supported by a 1986 state Supreme Court ruling that allowed Pittsburgh to collect a privilege tax on an architecture firm's earnings for a project outside the city.

In that decision, the high court ruled that if a business has a "base of operations" where it solicits business, receives mail, holds meetings and stores supplies, the municipality where that office is located can collect a business privilege tax on services even outside the municipality.

Judge Kevin P. Brobson wrote that the tax board and Lehigh County court overlooked the clear language of Whitehall Township's tax ordinance, which unlike Pittsburgh's law, says the tax should be calculated on sales, service, rentals and other transactions only "within the territorial limits of the township."

Brobson reviewed the testimony of salesman John Siano, who said that while he has a place to work in Whitehall, he does most of his work on the road using a cellphone and laptop.

Giles & Ransome also noted that only staff in its Bensalem Township, Bucks County, headquarters can approve sales.

The township argued that the presence of heavy equipment on the company's lot supported its claim that the sales occurred in the township, but the Commonwealth Court majority noted there was no specific evidence of sales at the location.

Varner noted that the company does pay the business privilege tax on sales of parts, repairs and on heavy equipment that is delivered to the Whitehall Township location.

Berdah said the chamber of commerce has taken the position that such uncertainty is bad for business.

"It becomes an administrative nightmare for the smaller guys, especially the mom and pop outfits that are bopping around from township to township," he said.

State Sen. Pat Browne, R-Lehigh, sponsored a bill in 2011 aimed at removing ambiguities from the section of the Local Tax Enabling Act that authorizes local business privilege taxes, but the measure died at the end of the 2012 session.