Changing state type for bad invoice subtotal result."R" by "T".
And the error shift is 2 instead 1