Financial transaction does not respect Payment Method when marking a contribution as Completed
How it currently works
Tested in the latest CiviCRM.
When marking a contribution to "Completed", a financial transaction is created. The transaction picks the default financial account as its debit account rather than taking the asset account assigned to the payment method specified in the contribution.
For example:
- payment method Credit Card has 1210 Credit Card Bank assigned to it
- CiviCRM has 1200 Payment Processor Account set as default account
- A pending contribution has payment method set to Credit Card
When editing the contribution and changing its status to Completed, a payment financial transaction is created and its debit account is 1200 Payment Processor Account.
How is should work
When a contribution is marked as "Completed" in the back office forms without using a payment processor, the financial transaction should use the account assigned to the contribution payment method as its debit account.
For example:
- payment method Credit Card has 1210 Credit Card Bank assigned to it
- CiviCRM has 1200 Payment Processor Account set as default account
- A pending contribution has payment method set to Credit Card
When editing the contribution and changing its status to Completed, a payment financial transaction is created and its debit account should be 1210 Credit Card Bank.