Tens of thousands of people who want to wipe out their debts in bankruptcy court would have to work out repayment plans instead under legislation Congress approved Thursday.

A 302-126 vote by the House sent the legislation to President Bush, who is eager to sign it, the biggest rewrite of the bankruptcy code in a quarter-century. It marks the second major change in law to benefit business since Republicans increased their House and Senate majorities in last fall’s elections.