For those who want to do this via the UI I believe this is as simple as going to civicrm/admin/financial/financialType?reset=1 and mousing over or clicking on Edit for each Financial Type and the ID will show in the url
i would do the following. use a single price set based on Memberships. add the donation line item in to it with its own financial type.
then the Extended Report extension should solve your last issue of how much is donation v member fee
As per this old issue and PR
you want to specify the price_field_value_id or else CiviCRM will try and be clever and guess one for you and will often get it wrong. I think it's using the same mechanism it uses when you specify values for a payment page without using a real price set - ...
For the second part of the question, the Edit Line Item extension is the answer: https://civicrm.org/extensions/line-item-editor. Only a few of our transactions had to be completely deleted and recreated (they didn't understand the line item options) and since we only have about 100 to edit, the manual editing of line items is acceptable. For larger datasets,...
I could say try price set where you will have two different Financial type - one for donation and one for membership
For the record which you wanted to correct which has been already completed - you need to delete the records and create it against manually using price set that should be the best option
I guess this helps!!!
For anyone else looking for this, you can use the getFields action on the Contribution entity to locate the options for the Financial Type ID.
$fields = \Civi\Api4\Contribution::getFields()
->addWhere('options', '!=', FALSE)