Fine, they get paid their contracted price for work installed properly and they eat the rest while restoring the unsatisfactory work back the way it was. Period.
You are dealing with a incompetent contractor. They only get paid for what they did right per the contract and eat the cost of putting the improper work back to where they started.
Stop being a slave to the contract and negotiate your deal forward out of this mess.