Get paid in full for the 1st job. That is a separate PO and completed work with no issues
OR....Lien that job
As far as the 2nd job, Read in between their Policy lines. It probably says " We can hire any contractor to fix or warranty the work and deduct it from you "
This is the usual BS wording and rarely done.
They should have called you and told you to fix it and move forward.
Maybe it was a simple 15 minute job for you.
But the next guy was told " Don't worry about the cost, it is on the other company and charged it without any hesitation to cost.
Maybe the Original Company charged you 3 times what the repair company charged. Its all about making money.
If you can't get paid, Lien the job.
You have NO FRIENDS left at the Original Company,