Showing Line Items for Contributions with Default Price Sets
Overview
In scenarios like data migration, multiple membership lines might be added to a contribution via the default priceset. The current mechanism prevents these lines from being shown when looking at a contributions detail view (CRM_Contribute_Form_ContributionView). It makes sense that quick config priceset do not show up in the priceset configuration pages but there are more cons than pros to not show the lines on the actual contributions.
How it Works Currently
To decide if line items should be shown for the contribution, line items are fetched, ordered by their price field's weight. Then, the price set for the first line item is checked. If the price set's quick_config
flag is set, then the line items are NOT shown. If the falg is NOT set, the list of line items is shown.
How it Should Work
List of line items should always be shown, especially if there is more than one of them, even if they're added using the default price set. Not sure what the logic is behind having the list of line items depend on the price set, but it could be better to have the contribution say if it should be shown with line items or not, by adding a new flag, show_line_items
to the Contribution entity.