«من صام رمضان إيمانا واحتسابا غفر له ما تقدم من ذنبه»
The Prophet (peace and blessings be upon him) said:
"Whoever fasts Ramadan out of faith and seeking reward (with the intention of earning reward), all his past sins are forgiven."
Hadith Referenceصحیح الجامع الصغیر / حرف الميم / 6326