Skip to content

Fix to accept Loan Charge amounts using locales#2393

Merged
IOhacker merged 1 commit intoapache:developfrom
josehernandezfintecheandomx:fix/loan_charge_amount_with_locale
Aug 10, 2022
Merged

Fix to accept Loan Charge amounts using locales#2393
IOhacker merged 1 commit intoapache:developfrom
josehernandezfintecheandomx:fix/loan_charge_amount_with_locale

Conversation

@josehernandezfintecheandomx
Copy link
Contributor

@josehernandezfintecheandomx josehernandezfintecheandomx commented Jun 30, 2022

Description

Float amount is converted incorrectly upon creating a loan charge due the lack of use of Locale in the read of amount passed in the json

Read using the default Locale in English (Current implementation)

  • API call without quotes to support dot as decimal delimiter

Screen Shot 2022-07-11 at 15 06 31

  • Integration Test

Screen Shot 2022-06-29 at 22 54 37

Read using the Locale in Denmark using a comma (,) in the amount

  • API call with quotes to support comma as decimal delimiter

Screen Shot 2022-06-29 at 23 00 27

  • Integration Test

Screen Shot 2022-06-29 at 22 53 45

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per https://github.com/apache/fineract/#pull-requests

  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.

  • Create/update unit or integration tests for verifying the changes made.

  • Follow coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/Coding+Conventions.

  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes

  • Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)

FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.

@josehernandezfintecheandomx josehernandezfintecheandomx force-pushed the fix/loan_charge_amount_with_locale branch 4 times, most recently from d32fb5f to 9e011fd Compare July 16, 2022 19:59
@josehernandezfintecheandomx josehernandezfintecheandomx force-pushed the fix/loan_charge_amount_with_locale branch from 9e011fd to e4826a1 Compare July 27, 2022 19:15
Copy link
Contributor

@galovics galovics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a new test-case for you @josehernandezfintecheandomx . Please check it and you'll get the idea which use-case to fix. Thanks.

@josehernandezfintecheandomx josehernandezfintecheandomx force-pushed the fix/loan_charge_amount_with_locale branch from f4235be to f16e8fb Compare August 5, 2022 03:10
@josehernandezfintecheandomx josehernandezfintecheandomx force-pushed the fix/loan_charge_amount_with_locale branch from f16e8fb to 83209cc Compare August 5, 2022 17:56
Copy link
Contributor

@adamsaghy adamsaghy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@IOhacker
Copy link
Contributor

LGTM

@IOhacker IOhacker merged commit bd404e8 into apache:develop Aug 10, 2022
logoutdhaval pushed a commit to logoutdhaval/fineract that referenced this pull request Aug 12, 2022
Co-authored-by: Jose Alberto Hernandez <alberto@MacBook-Pro.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants