Qurra bin Iyas reported,

The Messenger of Allah ﷺ said, "Whoever, when death approaches him, makes a will in accordance with the Book of Allah, his will serves as an expiation for the zakat he failed to pay during his lifetime."

Ibn Majah 2705

Daif

حدثنا يحيى بن عثمان بن سعيد بن كثير بن دينار الحمصي حدثنا بقية عن أبي حلبس عن خليد بن أبي خليد

عن معاوية بن قرة عن أبيه قال

قال رسول الله ﷺ من حضرته الوفاة فأوصى وكانت وصيته على كتاب الله كانت كفارة لما ترك من زكاته في حياته

ابن ماجه 2705ضعيف
Contents
Reference
Commentary
Ayat
Collection
Sunan Ibn Majah
Book
Bequests
Chapter
Injustice in bequests
Numbering
Darussalam 2705
Ibn Majah 2705