Proposal: Allow different "EntityFinancialAccount" records for financial types based on payment method
As a bookkeeper, I want to record a contribution and have the financial account mapping be correct.
Because "payment method" influences the financial accounts, it's evolved from its original purpose of recording "cash, check, or credit card" to also defining the bank account. I.e. if you have two bank accounts (and use accounting integration), you can't record payment method as "check"; you need "check - bank A" and "check - bank B".
However, changing the payment method should (but can't) potentially change the expense account code. At present, expense accounts are tied to the financial type only.
In Raiser's Edge, you can specify an unlimited number of "EntityFinancialAccount" mappings for a "Financial Type". The mapping used is a combination of "Financial Type" and "Payment Method".
Proposal:
- We add a new optional field to
civicrm_entity_financial_account
calledpayment_instrument_id
. -
CRM_Financial_BAO_FinancialAccount::getFinancialAccountForFinancialTypeByRelationship()
takes an optional third parameter ofpayment_instrument_id
. If the value isn'tNULL
, it returns a different set of financial accounts.
Alternate proposal
While researching, I saw this comment by @eileen that suggested that others also have a desire to modify the financial accounts recorded based on other factors (e.g. Campaign ID). So perhaps a hook in CRM_Financial_BAO_FinancialAccount::getFinancialAccountForFinancialTypeByRelationship()
would be better. We'd need to pass in additional context for it to be meaningful. A contribution ID, or possibly a line item ID.
Pinging some folks I know maintain installs with complex finances - @lcdweb @JoeMurray