Hmmm...another one....

Just before the problematic (?) SELECT, there is another strange thing...
PHP Code:
SUM(tr.tax_rate) AS tax_rate 
I have no idea why it sums the tax rate, especially since this returned column (tax_rate) is not used anywhere below

Any ideas to close this are most welcomed....

John