It my understanding that, if you had resigned and opted for "PF and Gratuity Withdrawal option", and the cheque issued was against the full and final settlement, and if it has been en-cashed, means that you have broken the continuity of your service.
If you had continued after discussing with the partner, Did they cancel your resignation or have their re-appointed you as new employee? Hows was your PF and Gratuity being deducted after your re-joined them or otherwise?
If new appointment, then you will not be able to claim for 22 years but only 17 years due to break in sevice, and besides, previous 5 years Gratuity have already paid.
11th August 2012 From Saudi Arabia, Riyadh