fix tax report under MySQL, RT#17856