Pending financial transaction records remain in civicrm_financial_trxn and appear in batch search
Reproduced on dmaster.demo.civicrm.org as of 2/28/2022 and also occurring in CiviCRM 5.39.5. Steps to replicate:
- Create a membership with a pending payment.
- View the membership and record the payment.
- View the batch search results - both the completed payment record and the pending financial transaction are listed: https://www.screencast.com/t/XgNTPieRXz However, only the completed payment record shows up on the contribution record itself: https://www.screencast.com/t/MQToafE2V
Notes:
- This occurs whether or not the payment method of the original pending payment and the (later) recorded payment match - I've tested it both ways.
- Although I can't access the database for dmaster, I'm attaching a screenshot of what these records look like in civicrm_financial_trxn.
- The site in question has the option for always recording A/R transactions disabled.
Because this isn't, strictly speaking, a payment record or even an update of the transaction that would be exported to an accounting system, it does not seem to me that this should be included in the batch results. (Whether or not this entry should be left as pending is another question.)