How Invoices Relate to Payments
Invoices have Invoice Detail records that represent each line item that makes up the invoice total. Payments have Payment Detail records that represent the line items paid for that makes up the total payment. When someone pays for that line item on an invoice, the Invoice Detail and Payment Detail records are linked.
For example, someone registers online for both the Women's Conference ($100 Total, $25 Deposit) and Mother's Day Out ($35 Total, $5 Deposit). The $30 payment she makes at the time of registration covers the deposit for each event. Two weeks later, she receives an email reminding her to pay the outstanding balance. She makes a $105 payment from My Purchase History page to cover the remaining balance for each event.
The created records and their connections would look something like the following: