Hi,
Yes system is calculating right, it will check PTaxBasis only not the gross accordingly it will deduct for the month. And state is month wise right, if Ptaxbasis is more also it will deduct the specified month deduction amount only.
Best Regards