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:
- payment fields are validated even if a payment is not being recorded
- CRM.formatMoney can't handle a number format with no decimals