CRM-18110 Can no longer create a contribution with a negative amount - a regression as in 4.4 this was ok

    Details

    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      In 4.4 LTS:
      add a -$1 contribution - save - done

      In 4.6:
      add a -$1 contribution - save [no errors]
      you end up with a $0 contribution

      Negative contributions have always been a solid and flexible pathway to record refunds and partial refunds (for event tickets e.g.) and I know many/large projects use this extensively at the direction of their Accountants/Bookkeepers, because refunds and partial refunds have their own transaction dates [at times spanning months/statements] and their own transaction IDs from Payment Processors - they are separate processes/transactions for reconciliation purposes. If you get a (partial) refund in a store - a week from your original purchase - you will have two contributions on your credit card/bank statement: one for the original purchase - and one for the (partial) refund.

        Attachments

        1. negcont02.png
          96 kB
          KarinG
        2. negcontr01.png
          89 kB
          KarinG

          Activity

          [CRM-18110] Can no longer create a contribution with a negative amount - a regression as in 4.4 this was ok
          Joanne Chester added a comment -

          Hi Karin,
          This rang alarm bells for me as I make extensive use of negative contributions and we need to upgrade to 4.6 soon.

          I couldn't replicate your problem either on http://dmaster.demo.civicrm.org (4.7.7) or http://d46.demo.civicrm.org/civicrm (4.6.16). I successfully recorded of contributions with a negative amount and payment instrument/method of Credit card.

          Are you still having this problem? If so, can you provide more information? Perhaps a component/extension is interfering with this. I certainly don't want to go to 4.6 and discover there is some combination of things that prevents us recording negative contributions.

          (Than again it could have been fixed in the last 2 months.)

          Coleman Watts added a comment -

          Thanks for investigating Joanne. Karin feel free to reopen this if you think this really is a bug in core and can post steps to reproduce it on the demo server.

          KarinG added a comment -

          Hi Joanne! Thanks for checking in on this. I always check to see if bugs are indeed core bugs on a clean civibuild create dmaster (and/or a clean d46)

          1. I still have this civibuild d46 from when I reported this issue: confirming that is an issue in d46localhost (back when it was 4.6.13) - see screenshots(attachments)
          a -5 USD -> is saved as 0 USD [the USD proofs it's a clean civibuild :-)]

          2. Confirming it is still an issue on 4.6.14

          3. Confirming this is indeed fixed in 4.7.6 - (so likely also fixed in/as of 4.6.15)

          4. Conclusion: this is fixed now - this got accidentally fixed. Not sure if this is a happy dance or not

          KarinG added a comment -

          Adding a test - to keep an eye on when/if this issue may resurface.

          KarinG added a comment - - edited

          https://github.com/civicrm/civicrm-core/pull/8230
          Please test the test. Have not written many tests yet - but Eileen is right

          Rohan Ramesh Katkar added a comment - - edited

          Hi [~karin@semper-it.com],

          I couldn't replicate your problem either on http://dmaster.demo.civicrm.org and http://d46.demo.civicrm.org/civicrm. It seems already fixed. Also checked the above CRM test which also works fine.
          Following are screenshots from demo sites of master and 4.6:

          For master: http://www.awesomescreenshot.com/image/1219518/05d728cfb8584dd632db0a5b25041719
          For 4.6: http://www.awesomescreenshot.com/image/1219620/81bc3fa9af6ebcb1ef4e4dbf87c520d4

          KarinG added a comment -

          Hi Rohan - right - I noted that above: "4. Conclusion: this is fixed now - this got accidentally fixed." So it needs a test - the test PR I submitted is still pending: https://github.com/civicrm/civicrm-core/pull/8230 - once that's merged - then we can close this issue. Can you please also comment on the test PR that you've looked at it?

            People

            • Assignee:
              Rohan Ramesh Katkar
              Reporter:
              KarinG

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 20 minutes
                20m