There was no choice but to write off the debt.

Literal

Debt [topic-は] write-off [make-にする] only had.

帳消しにする means 'to write off / to cancel.' ~しかなかった (had no choice but to) expresses that canceling the debt was the only remaining option.