should I just deduct the amount owed from the gross profit
No, because that would give you a double deduction. Since the amount would have been included in purchases
and creditors. In fact, you would make an addition to profit (through adjusting purchases), rather than a deduction from profit. That is because you would have bought stock which had not yet been used in generating income. You mention "cost of sales", but do you know how it is calculated?
Opening stock plus purchases less closing stock = cost of sales.
If you don't understand the basics, or if you can't work it out from information in forums such as this and HMRC's guidance notes, then you need professional help.