-
-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dev/core#1463 Fix record payment form errors #16071
Conversation
(Standard links)
|
@@ -272,7 +269,7 @@ public function buildQuickForm() { | |||
*/ | |||
public static function formRule($fields, $files, $self) { | |||
$errors = []; | |||
if ($self->_paymentType == 'owed' && $fields['total_amount'] > $self->_owed) { | |||
if ($self->_paymentType == 'owed' && (int) $fields['total_amount'] > (int) $self->_owed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to https://lab.civicrm.org/dev/core/issues/1463#note_28671, maybe, the complete check should be removed? Hmm, but that might add some more discussion as what needs to be done to the main contribution amount when the form is submitted with > owed amount?
@jitendrapurohit so 5.20 does NOT have the regression? |
Ah, all our sites are on 5.20.0 so didn't realise 5.20.1 is out and having this regression in it. Yes, it's included in 5.20.1. Do you want me to push an rc fix against it? |
5.21 is the rc - but yes let's do in 5.20 too - I can see some cleanups to do but this is fine for the rc & we can fix up in master - there are likely already PRs for that in master anyway |
done #16073 |
Overview
Before
After
Form loads fine and accept the decimal amount as it is equal to the remaining amount that needs to be paid.
Comments
This isn't included in 5.20 released tarball but occurs in the 5.21 rc version. Probably, the first issue needs an rc fix? Hence an rc PR.
Gitlab - https://lab.civicrm.org/dev/core/issues/1463