Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Major
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.7.7
-
Fix Version/s: None
-
Component/s: None
-
Labels:None
-
Documentation Required?:None
-
Funding Source:Core Team Funds
Description
Originally reported directly to iATS on https://github.com/iATSPayments/com.iatspayments.civicrm/issues/134 - instructed to create corresponding ticket in JIRA and providing details as follows:
- To reproduce, create a recurring contribution with a non-IPN payment processor (e.g. iATS)
- The initial contribution will be recorded with all of the relevant data populated in the financial tables (civiccrm_contribute > civiccrm_line_item > civiccrm_financial_transaction > civiccrm_entity_financial_transaction > civiccrm_financial_item)
- Subsequent installments of the recurring subscription do not result in the creation of financial_items - when these transactions are added to an accounting batch, the user can view the transactions on screen, but the transactions do not get exported in the IIF file.
To manually correct the situation, I create the missing financial items as follows:
- Export data from, civicrm_contribution, civicrm_contribution_recur (to look up payment_processor_id to determine if iATS), civicrm_line_item (to link contribution to line item), civicrm_financial_item (to link line item to financial item)
- Where no financial item exists for a given line item, create one using the following SQL statement: INSERT INTO bethune_crm.civicrm_financial_item (id, created_date, transaction_date, contact_id, description, amount, currency, financial_account_id, status_id, entity_table, entity_id) VALUES
Another aspect of this is that at times, the payment instruments of Credit Card (AuthNet) (payment_instrument_id =1), iATS (payment_instrument_id =2) and EFT (payment_instrument_id =5) are configured to map to the payment processing account (financial_account_id=17), but occasionally get mapped to the bank deposit account (financial_account_id=11). To update:
- Run the following query: SELECT * FROM civicrm_financial_trxn WHERE trxn_date > '2016-03-31 00:00:00' AND payment_instrument_id =1 OR payment_instrument_id =2 OR payment_instrument_id =5
- Export to Excel to determine if any records need to be updated (i.e. financial_account_id=11 and not 17)
- Update using the following SQL statement: UPDATE civicrm_financial_trxn SET to_financial_account_id=17 where id=XXXXX or id=XXXXX ... (according to the record ids that need to be updated)
Thanks for the time you have already put into this issue and I will help wherever needed,
Tamar