How to link invoice with partial payment in Cust. Ledger Entry?

I think one way is to link Invoice with Full Payment is Closed by Entry No. Correct me if am wrong?

Then how we can link Partial Payment with Invoice , which is still open. is there is any way to link, so that we can pick correct Document No for the Partial Payment Done.

Same with Credit memo? How we can link with Invoice and Payment with Credit memo? Could any one can help?