Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-19585 Sales tax issues
  3. CRM-20260

Incorrect information is stored in civicrm_financial_item table


    • 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?:
    • Sprint:
      4.7.14 Financial
    • Funding Source:
      Needs Funding
    • Verified?:


      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

      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.


        1. AfterUpdate.png
          105 kB
          Pradeep Nayak
        2. beforeUpdate.png
          88 kB
          Pradeep Nayak
        3. Screenshot 2017-03-15 20.27.42.png
          116 kB
          Eileen McNaughton



            • Assignee:
              joemurray Joe Murray
              pradeep.nayak Pradeep Nayak
            • Votes:
              1 Vote for this issue
              3 Start watching this issue


              • Created: