Qur'an 47:4 is as follows:
So when you meet those who disbelieve [in battle], strike [their] necks until, when you have inflicted slaughter upon them, then secure their bonds, and either [confer] favor afterwards or ransom [them] until the war lays down its burdens. That [is the command]. And if Allah had willed, He could have taken vengeance upon them [Himself], but [He ordered armed struggle] to test some of you by means of others. And those who are killed in the cause of Allah - never will He waste their deeds. [47:4]
According to this verse, Allah commands us to leave prisoners of war either out of generosity or for a ransom. If the only way to obtain slaves is capturing them at war, how can one obtain new slaves in the light of this verse?
Essentially, doesn't this verse effectively put an end to slavery ?