- A contribution cannot have multiple line-items which share same price_field_id and/or price_field_value_id because there is a unique key defined for line-item table which expects unique combination of these attributes
- A contribution cannot have multiple line-items linked with price fields of different price-sets, otherwise it will cause a issue while doing 'Record Payment' as I tested on local by relaxing the crieria to allow user to add line-item linked to price fields of different price sets. Add after paying the addtional due amount, leads to incorrect financial entries and Contribution status still kept to 'Partially Paid'.
Keeping in mind both the limitations here's what my approach to support add multiple line-items.