Details
-
Type: Sub-task
-
Status: In Quality Assurance
-
Priority: Trivial
-
Resolution: Unresolved
-
Affects Version/s: 4.7.15
-
Fix Version/s: 4.7.18
-
Component/s: None
-
Labels:
-
Versioning Impact:Patch (backwards-compatible bug fixes)
-
Documentation Required?:None
-
Sprint:4.7.14 Financial
-
Funding Source:Needs Funding
-
Verified?:No
Description
When there is a change in Contribution line item like Payment instrument, Financial Type etc, an entry is created in civicrm_financial_item table for the change with -ve (using previous financial item) +ve (new financial item) as per
https://wiki.civicrm.org/confluence/display/CRM/CiviAccounts+Data+Flow
If there is a tax associated with contribution the entries in financial item are incorrect in several ways. Note the negative amounts on a couple of entries.
Current incorrect entries (see AfterUpdate.png attached):
3: description='Sales Tax', amount=110, financial_account_id=15
4: description='Sales Tax', amount=20, financial_account_id=15
Spec according to process for changes to financial type:
3: description='Contribution Amount', amount=-100, financial_account_id=1 (ie reversal 1)
4: description='Sales Tax', amount=-10, financial_account_id=15 (ie reversal 2)
5: description='Contribution Amount', amount=200, financial_account_id=1 (ie new entry 1)
6: description='Sales Tax', amount= 20, financial_account_id=15 (ie new entry 2)
Please review if the entity_financial_trxn entries linking the 4 new financial_items are correct.
To replicate:
1. Enable Sales tax
2. Define sales tax relationship between Financial Type and Financial Account (Having 10% tax rate)
4. Added contribution $100 using contribution form. (Total amount will be 100 + 10 = 110) (beforeUpdate.png)
5. Update contribution using offline contribution form by changing total amount to 200 (200 + 20 tax) (AfterUpdate.png)
Could you provide an explanation of how PR 9589 helps fix this.
Note, with new description above based on CiviAccounts Data Flow, additional changes are required.