حَدَّثَنَا هِشَامُ بْنُ عَمَّارٍ، حَدَّثَنَا إِسْمَاعِيلُ بْنُ عَيَّاشٍ، عَنْ مُوسَى بْنِ عُقْبَةَ، عَنِ الزُّهْرِيِّ، عَنْ أَبِي بَكْرِ بْنِ عَبْدِ الرَّحْمَنِ بْنِ الْحَارِثِ بْنِ هِشَامٍ، عَنْ أَبِي هُرَيْرَةَ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ ‏"‏ أَيُّمَا رَجُلٍ بَاعَ سِلْعَةً فَأَدْرَكَ سِلْعَتَهُ بِعَيْنِهَا عِنْدَ رَجُلٍ وَقَدْ أَفْلَسَ وَلَمْ يَكُنْ قَبَضَ مِنْ ثَمَنِهَا شَيْئًا فَهِيَ لَهُ ‏.‏ وَإِنْ كَانَ قَبَضَ مِنْ ثَمَنِهَا شَيْئًا فَهُوَ أُسْوَةُ الْغُرَمَاءِ ‏"‏ ‏.‏

It was narrated from Abu Hurairah that the Prophet (PBUH) 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.” Translation Not Available

Book Ref: Sunan Ibn Majah Book 13 Hadith 2359
Web Ref:  Sunan Ibn Majah Vol 3 Book 13 Hadith 2359