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

Update to Contribution with multiple priceset via api updates the total amount and tax amount

    Details

    • Type: Sub-task
    • Status: Open
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.7.16
    • 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

      To replicate:
      1. Enable Sales tax
      2. Define sales tax relationship between Financial Type and Financial Account (Having 10% tax rate)
      3. Add Priceset having Checkbox, Radio, Text and Select field as price fields with Financial Type having sales tax rate.
      4. Added contribution using contribution form using priceset(#3).
      5. Update the contribution with
      5.a
      civicrm_api3('Contribution', 'create', array(
      'id' => 1,
      'financial_type_id' => "Donation", (choose the same FT)
      ));
      Result: Contribution Total, Financial Trxn, Financial Item - Correct
      Line Item(tax_amount) entries - InCorrect

      Attached image AddContrbutionLineItemAPI.png(before update) and UpdateContributionLineItemAPIOnlyFT.png(after update)

      5.b
      civicrm_api3('Contribution', 'create', array(
      'sequential' => 1,
      'id' => 1,
      'financial_type_id' => "Donation",
      'total_amount' => 336.60
      ));

      Result:
      Contribution Total - Incorrect (amount changed)
      Financial Trxn, Financial Item - Additional Entries for amount change
      Line Item(tax_amount) entries - InCorrect

      Attached image AddContrbutionLineItemAPI.png(before update) and UpdateContributionLineItemAPITotalAmount&FT.png(after update)

      Regression:
      https://github.com/civicrm/civicrm-core/pull/8835

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pradeep.nayak Pradeep Nayak
                Reporter:
                pradeep.nayak Pradeep Nayak
              • Votes:
                1 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: