You can only deduct an unpaid invoice, if you use the accrual method of accounting for tax purposes. This means that you claimed the income when you invoiced the customer. If you invoiced and claimed the income in 2016, you can take a deduction in 2017, when you determine it is uncollectible. But if the income has not been claimed on a tax return previous to 2017, you just leave it out of income, or leave out half of the invoice in this case.