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

Can't create membership with custom monetary value display

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 4.7.27
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Versioning Impact:
      Patch (backwards-compatible bug fixes)
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding
    • Verified?:
      No

      Description

      I've set "Monetary Value Display" to display with 0 decimals (Hungary doesn't need them) at /civicrm/admin/setting/localization.

      The format string I used is: %!.0i

      This works fine when displaying currency.

      Now if I try to create a new membership at /civicrm/member/add I get a "Please enter a valid amount" error, but there's no field that shows an error.

      Turns out, it's the "Membership Payment and Receipt" amount, the field contains Invalid format passed to CRM.formatMoney

       

      This happens even if Record Membership Payment is unchecked, and the "Membership payment" form is not visible.

      As I see it this is actually two bugs:

      1. payment fields are validated even if a payment is not being recorded
      2. CRM.formatMoney can't handle a number format with no decimals

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              drifteaur Zoltan Varady
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: