Bad debt deduction
The following is the rule on deduction of bad debts:
To take the bad debt deduction, there must be a true creditor-debtor relationship between you and the person or organization that owes you money. That person or organization must have a legal obligation to pay you a fixed sum of money
A bad debt may be claimed only if the income that the debt represents had been included in income in the year of deduction or in an earlier year. This would not be the case if the debt arose from a sale you made or services you performed and under your accounting system, you do not show income from the sale or service until you receive it. If this was a personal loan, it would qualify for the deduction.
You must show that the debt is worthless and will remain that way. You must have taken reasonable steps to collect the debt.
Since the debt was discharged in bankruptcy, you have no problem showing the debt is worthless and that you have taken reasonable steps to collect.