Ibn Mubarak (may Allah have mercy on him) narrates from Yunus (may Allah have mercy on him), who said: I asked al-Zuhri (may Allah have mercy on him) about a man who takes advance loans against his orchard and his crops amounting to the whole of what his land produces. He said: We do not know of anything in the Sunnah by which the crops or fruit of a man who owes a debt on them are left so that he does not pay zakah; rather, he pays zakah even though he owes his debt. But as for the man who has gold and silver on which he owes a debt, he does not pay zakah until the debt is paid off.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الزكاة / 7615