Invoice partially paid by another company.

SOLVED

I am having a problem deciding how to post the following And would really appreciate some help. We are a construction co. Who did work for Company A And we invoiced them. After months of trying to collect our money we hired a layer to help us collect. Due to rising court costs, Company B paid us roughly 90% of the amount owing to us on Company A's behalf. Company B will continue legal proceedings to collect all monies owing, including money owed to us. My problem is, how do I post receipt of the money from Company B on company A 's behalf. I am using sage 50 premium, 2014.2