Details
-
Type: Sub-task
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.3.0
-
Fix Version/s: 4.3.0
-
Component/s: Accounting Integration, CiviContribute
-
Labels:None
Description
If you enter a Pay Later contribution, and then update it to completed - when you view the contribution the 'Received Into' field shows 'Accounts Receivable' (rather than Deposit Bank Account or other asset account for a completed payment). This is a result of the fact that CRM_Core_BAO_FinancialTrxn::getFinancialTrxnIds is only grabbing a single financial transaction (and in this case it's grabbing the 1st one).
We could decide to grab the 'latest' (highest ID) for this purpose (which i think is decent since user will see the latest dispensation .... OR return a list of to_financial_account titles - e.g.:
Received Into: 'Accounts Receivable, Deposit Bank Account'
---- lines 68-73 ContributionView.php ------
// get to_financial_type from civicrm_financial_trxn
$financialTrxnId = CRM_Core_BAO_FinancialTrxn::getFinancialTrxnIds($values['contribution_id']);
if (CRM_Utils_Array::value( 'financialTrxnId', $financialTrxnId))