Details

      Description

      0. Edit existing contribution: Need to allow user to change contribution amount when default contribution amount price set is used. Issue already filed and seems to be fixed (http://issues.civicrm.org/jira/browse/CRM-10103)

      1. Default price sets ("Contribution Amount", "Membership Amount") s/b hidden or marked reserved. If reserved, then edit, disable delete actions suppressed, and their price_fields are also reserved (can't edit, disable or delete).

      2. Price sets which have been "used" for a transaction (i.e. whose fields are referenced in a line_item row), but which are no longer linked to an event or online contribution page can currently be deleted. We should not allow this - especially because it results in deletion of the associated line_item rows (due to ON DELETE CASCADE price_field_id FK in the line_item table).

      3. View existing contribution: Do NOT use Line Item layout for Contribution Amount display when default contribution amount price sets are used. (NOTE: I think the line item layout works ok for the default "Membership Amount" case - but if it's easier to revert both display patterns, that's ok too.)

      4. Fatal error when editing Contribution linked to a Membership

      • Create membership w/o "Record Payment"
      • Edit membership and now click "Record Payment", modify amount (i.e change default inserted by jScript) and save
      • View associated contribution and click Edit
      • Change amount again, and click Save (new value is saved - but the following fatal error is thrown):

      /Users/dgg/svn/crm_v4.2/CRM/Core/DAO.php, fatal, 736
      /Users/dgg/svn/crm_v4.2/CRM/Member/Form/Membership.php, getFieldValue, 635
      /Users/dgg/svn/crm_v4.2/CRM/Core/Form.php, buildQuickForm, 331
      /Users/dgg/svn/crm_v4.2/CRM/Core/QuickForm/Action/Display.php, buildForm, 97
      /Users/dgg/svn/crm_v4.2/packages/HTML/QuickForm/Controller.php, perform, 203
      /Users/dgg/svn/crm_v4.2/packages/HTML/QuickForm/Page.php, handle, 103
      /Users/dgg/svn/crm_v4.2/CRM/Core/Controller.php, handle, 279
      /Users/dgg/svn/crm_v4.2/CRM/Member/Page/Tab.php, run, 206
      /Users/dgg/svn/crm_v4.2/CRM/Member/Page/Tab.php, edit, 269
      /Users/dgg/svn/crm_v4.2/CRM/Core/Invoke.php, run, 221

      ... after the 1st time, I'm getting notices (but no fatal error) when going to Edit and clicking Cancel OR Save:
      Notice: Undefined variable: contribution in CRM_Contribute_BAO_Contribution->loadRelatedObjects() (line 1861 of /Users/dgg/svn/crm_v4.2/CRM/Contribute/BAO/Contribution.php).

      4.1 Also an issue editing existing contribution linked to participant and changing contribution amount - we get these notices (no fatal this time):

      • Notice: Undefined variable: contribution in CRM_Contribute_BAO_Contribution->loadRelatedObjects() (line 1861 of /Users/dgg/svn/crm_v4.2/CRM/Contribute/BAO/Contribution.php).
      • Notice: Trying to get property of non-object in CRM_Contribute_BAO_Contribution->loadRelatedObjects() (line 1861 of /Users/dgg/svn/crm_v4.2/CRM/Contribute/BAO/Contribution.php).
      • Notice: Undefined variable: contribution in CRM_Contribute_BAO_Contribution->loadRelatedObjects() (line 2002 of /Users/dgg/svn/crm_v4.2/CRM/Contribute/BAO/Contribution.php).
      • Notice: Trying to get property of non-object in CRM_Contribute_BAO_Contribution->loadRelatedObjects() (line 2002 of /Users/dgg/svn/crm_v4.2/CRM/Contribute/BAO/Contribution.php).

      5. When we create a line item for a contribution, we always grab the price_option_value amount or 1 and write that to the unit_price field. However, when contribution amount has a decimal value (e.g $25.45) - the line_item row's qty * unit_price != line_total.

      25 x 1.00 != 25.45

      Instead, we should always set qty = 1 for the default contribution case. Then we can write the actual contribution amount to the unit_price column - and the "math" is correct.

        • This will probably affect the upgrade code and the transformed sample data since the sample contributions have line_item rows with the "incorrect" column values (i.e. qty =

      For default membership, we do the "right thing" already. We set qty = 1 and then put whatever fee was actually entered for the membership in the unit_price column.

      6. Online event registration, and online contribution pages for "quick configuration" pages currently include the Calculate.tpl "total fees" calculation and display. This doesn't make sense when there is only a single set of radio buttons to select from - and we should not include it for these cases. Also, in sample contrib page 1 the calculation is wrong if you select a radio button with an amount ("Sustainer") and then put a value in Other Amount - it adds the 2 values rather than replacing the calc'ed value w/ the value in Other Amount field.

      7. For online contribution page flow, we shouldn't use the line_item display layout on Confirm and Thankyou pages and on receipt templates for quick-config cases. It is confusing and weird for end-users to see Qty and Unit Price when they've entered a simple amount (see screenshot attached).

      8. Edit Price Options for a quick-config price set (Dinner Contribution for Fall Fundraiser). I edited "Couple" and checked Default. This should have made "Single" NOT the default. Instead, both options have Default checked.

      9. Sample data - Price sets are missing for sample contribution pages 2 and 3 (contrib page 2 will require a membership price set). NOTE: If I got to Manage Contribution Pages > Confgure > Membership tab and select the 2 sample membership types and Save - the quick_config price set is created properly. However, it should be inserted in sample data / civicrm_generated.

      10. Contribution pages with ONLY "Other Amounts" aren't working. I tried to "save" contribution page id=3 to see if it would then work, but neither that nor creating a new contrib page w/ no Fixed Contribution Options works. When you go to "contribute" (civicrm/contribute/transact?id=3) - there is not "Contribution Amount" field.

        Attachments

        1. calculate.txt
          0.6 kB
          Pradeep Nayak
        2. lineItemDif.txt
          3 kB
          Pradeep Nayak
        3. MembershipEmailReceipt.patch
          0.8 kB
          Ravikant Mane
        4. OnlineContrib-4.1.PNG
          43 kB
          David Greenberg
        5. OnlineContrib-4.2.PNG
          46 kB
          David Greenberg
        6. Screen Shot 2012-04-26 at 10.44.17 AM.PNG
          33 kB
          David Greenberg
        7. Screen Shot 2012-04-26 at 2.19.55 PM.PNG
          53 kB
          David Greenberg
        8. Screen Shot 2012-05-17 at 10.48.00 PM.png
          42 kB
          Joe Murray
        9. Screen Shot 2012-05-17 at 10.49.06 PM.png
          43 kB
          Joe Murray
        10. Screen Shot 2012-05-17 at 11.05.27 PM.png
          52 kB
          Joe Murray
        11. Screen Shot 2012-05-25 at 7.26.19 PM.png
          15 kB
          Joe Murray
        12. Screen Shot 2012-05-30 at 12.15.39 AM.png
          55 kB
          Joe Murray
        13. Screen Shot 2012-05-30 at 12.23.02 AM.png
          13 kB
          Joe Murray
        14. Screen Shot 2012-06-06 at 12.25.05 AM.png
          18 kB
          Joe Murray

          Issue Links

            Activity

              People

              • Assignee:
                dgg David Greenberg
                Reporter:
                dgg David Greenberg
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: