CRM-16330 Edit Contribution form validation on total amount is incorrect when tax is included

    Details

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

      Description

      If you try to edit a contribution that was saved with a taxable financial type, the form validation which says:
      Total Amount = Net Amount + Fee Amount
      returns false since Net Amount is set to Total Amount + Tax Amount

      If the transaction includes a tax amount the form rule should be modified to:
      Total Amount with Tax = Net Amount + Fee Amount

      Screenshot attached.

            • Original Post *****
              when Tax and Invoicing is Enabled
              ===========================

      => Contribution Tax amount is saved incorrectly - against contribution table
      => while Editing the contribution record again - Incorrect amount is displayed in the Edit screen
      => Also you do nothing in Edit screen try to save the same amount - it throws error saying (The sum of fee amount and net amount must be equal to total amount)

      Thanks

        Attachments

          Activity

          [CRM-16330] Edit Contribution form validation on total amount is incorrect when tax is included
          David Greenberg added a comment -

          We will need quite a bit more detail on this.

          • VAT / Tax configuration
          • contribution form inputs / create steps (online contribution vs. back-office form)
          • expected result for calculated tax / save behavior
          • actual result (including screenshots)

          ... reproduced on the 4.6 public demo.

          Ramesh added a comment -

          Please find the attached file for the Screen shot

          Step by step Process

          1. To print an invoice and also for Tax/VAT calculate
          • In CiviContribute component settings (select check box : Enable Tax and Invoicing)
          [Menu Link: Administer -> CiviContribute -> CiviContribute Component Settings]
          2. Created a new Financial Account (saying: 20% VAT)
          • With Financial account type-> Liability
          • Is Tax? – is selected
          • Tax Rate – 20

          3. New Financial Type (products) has been created
          • Tax-Deductible? – is ticked

          4. Assign Financial Accounts to the new product created
          • Sales Tax Account is added with Financial Account (20 % Vat)

          5. Then I got the new financial accounts assigned to the new financial type products

          6. Now all the setting is done - I went for creating the new contribution against the user for the new financial type (products) – and Save the record

          7. Now go for View the contribution – ISSUE in the view is been Fixed in Version 4.6.3

          8. Now went for Edit option in the contribution – nothing changed click save then you get the following error message

          Error message

          I guess this helps – Thanks

          David Greenberg added a comment -

          In this test:
          Tax rate = 8%
          Total Amount = 100
          Total with Tax = 108

          ... after saving
          Net Amount = 108

          ... hence trying to save from 'edit' throws form rule error.

          Monish Deb added a comment -

          Submitted the PR https://github.com/civicrm/civicrm-core/pull/5787

          Ramesh can you please verify the changes if it works for you !!

          Thanks,
          Monish

          pratiksha added a comment -

          Checked PR,working fine.

          Ramesh added a comment -

          Thanks Monish - tested - Issue got fixed - working fine.

            People

            • Assignee:
              pratiksha
              Reporter:
              Ramesh

              Dates

              • Created:
                Updated:
                Resolved: