Sales Tax Miscalculation?

Please check this Tax calculation. My settings is 12% rate, Tax Included in basic rate, On Net Total. Tax amount should be 313.25 and not what is calculated below. Can someone check on this? And hopefully find a solution? Thanks!

If you have tax included in the total, it seems to be correct calculation.

Total = 2610.45
Tax = 2610.45 - (2610.45 / 1.12) = 279.69
Net Total = 2610.45 - 279.69 = 2330.76

Test it using:

Total = 112.00
Tax = 112.00 - (112.00 / 1.12) = 12.00