-
-
Notifications
You must be signed in to change notification settings - Fork 814
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove net_amount from the Back office contribution form.
Net amount is calculated in the BAO if not set so asking users to enter it does not gain us anything. Currently we require them to calculate it & edit it if they change the fee_amount or total_amount and we validate their data entry, and make them re-do it if they get it wrong. Since the field is pretty hidden it's unintuitive to need to change it and makes for a painful contribution update process. The current behaviour dates back to svn days - however since 2015 the BAO has handled the possibility of it not being set. In addition we have had code issues with the comparison around currency & float comparison issues eg. #11485 and https://lab.civicrm.org/dev/core/issues/260 ( in the latter case the data saves correctly without net_amount and incorrectly if it is changed to meet the form validation rule. (There was a proposal in Mar 2017 to address that #9948 (comment) by fixing the calculation but I believe just dropping the field is better). Our unit tests test the form submissions but for some reason net_amoutn was removed from the tests https://github.com/civicrm/civicrm-core/pull/9948/files#diff-40e2e0f106ba620465acf3a9a81f2498L1535 meaning our test coverage is more reliable without it being set.
- Loading branch information
1 parent
3922ba6
commit 3533db2
Showing
3 changed files
with
3 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters