Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-16632

Cannot save contributions with certain fee amounts

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.3
    • Fix Version/s: 4.6.4
    • Component/s: CiviContribute
    • Labels:
      None
    • Documentation Required?:
      None

      Description

      The processing of fee amounts is done inconsistently in the backend.
      There are two issues:
      1. in the contribution form, the "net amount" is auto-populated incorrectly when the total amount decimal value ends in 0 (e.g. $1.00, $1.10)
      2. Upon saving, the CRM_Utils_Rule::cleanMoney wrapper is not used everywhere, hence the validation net_amount + fee = total amount fails when the total amount ends in a 0.

      To replicate, do this (bug confirmed on Wordpress 4.6.3 demo site):

      • go to create contribution page, fill out contact field with any contact name and contribution type.
      • Under total amount, type "158.10" or any amount that ends with a in the decimal.
      • scroll down, and under additional details, enter "8.83" for the Fee amount
      • CiviCRM will automatically fill in "149.26999999999998" under the Net amount
      • try saving, it will complain about the format of the net amount.
      • Correct net amount to "149.27", save. CiviCRM will refuse to save saying that net amount + fee amount needs to be equal to the total amount

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              rares Rares P
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: