All perfect praise be to Allaah, The Lord of the worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad , is His slave and messenger.
Scholars held different opinions regarding whether or not a debt cancels the Zakah that is due on wealth, especially what is apparent like crops. Some scholars viewed that debt cancels the Zakah of such wealth while others, who are the majority of scholars, viewed that debt does not cancel Zakah.
As-Suyooti explained in Al-Ashbaah wan Nathaa’ir, a book on Shaafi‘i Fiqh, the cases where debt cancels the obligation of Zakah and those where it does not, as he said, "Debt cancels Zakah on hidden wealth such as cash and trade goods but does not cancel it in the case of apparent wealth such as crops, fruits and cattle. This is regardless of whether the debt is imminent or deferred or from the same type of the wealth or not."
Moreover, Al-Hattaab, the Maaliki scholar said: "The Zakah of harvests, minerals and cattle is not waived on account of a debt."
The Hanbali scholars, according to a reported opinion, held that a debt cancels the Zakah on crops. It is also said that the money one borrows to cover the expenses of the crop also cancels the Zakah on crops. The opinion we see as preponderant is that which was adopted by the majority of scholars.
*Helped by fatwas of islamweb.net