The Qabooliyat (acceptance) of some kinds of Ta’at (obedience/worship), abstention from sin is conditional. Some kinds of Ta’at, for qubooliyat are not reliant on this condition.
The kinds of sins which negate the validity of Ta’at are of two types:
The first type absolutely nullifies the good deed. Validity of the good deed is dependent on absence of the sin, e.g. kufr. In the presence of kufr, no good deed is accepted by Allah Ta’laa.
Also, this type of sin nullifies previous good deeds. For example, if a Muslim becomes a murtad by committing kufr, all his previous virtuous deeds are nullified. Those who blurt out statements should derive warning and lesson from this fact.
For example, someone says: “Those who have no food at home can fast.” One who makes such a statement becomes a kaafir. His nikaah is also nullified. He should renew his Kalimah and nikah and also Hajj if he has the means. All his previous good deeds are nullified by this utterance of kufr. As long as as he does not repent, all future deeds of virtue will be null and void.
The second type of sin is similar to kufr since it is established on the basis of Nass Qat’i (Proof of absolute certitude.) Commission of such an act will nullify good deeds. For example, causing grief to Rasullullah Sallallahu Alaihi Wa Sallam even if it is committed unintentionally due to a lackadaisical attitude.
(Thus both classes of kufr eliminate Imaan and good deeds. Herein is a sombre warning for the modernists of our age, who mock and reject many Ahkaam (Laws) and A’maal (practices) of the Deen, example of the beard, purdah/hijaab, hurmat of pictures of animate objects, Miswaak, wearing the trousers above the ankles, etc.
Transgression, if believed to be sinful, is fisq and kufr. But mocking any rule or practice of the Deen or rejecting it, is kufr which invalidates Imaan)
Malfoothaat Of Moulana Ashraf Ali Thaanwi Rahmatullahi Alaihi Part 5