Sunan Ibn Majah, Book 13, Hadith 52 (Ibn Majah 2359)

It was narrated from Abu Hurairah that the Prophet (ﷺ) said:

“Any man who sells a product with the man who has become bankrupt, and he has not taken any of its price, it belongs to him, but if he had taken any of its price, then he is like any other creditor.”