@Dusan
QBO gets confused on this sometimes and I've had the same issue myself. Here's what works for me:
Receive a $48K payment for Invoice 1, click save and close. Then, receive a $62K payment for the $2K left on Invoice 1 and the $50K on Invoice 2.