Error in the ledger account (debit) to the registrar a partial payment.
When registering the payment of a contribution with more than one means of payment, the accounting account (debit) is not correctly registered.
The ledger account is defined here: https://lab.civicrm.org/dev/core/-/blob/5.48.2/CRM/Financial/BAO/Payment.php#L73
https://lab.civicrm.org/dev/core/-/blob/5.48.2/CRM/Contribute/BAO/Contribution.php#L918-919
- First check that $params['payment_instrument_id'] is not null
- Then the ledger account is obtained, but using $contribution['payment_instrument_id'] instead of $params['payment_instrument_id']