-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[$250] Distance rate-Decimals are not supported for this currency yet entering dot is allowed #49336
Comments
Triggered auto assignment to @alexpensify ( |
@alexpensify FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors |
Edited by proposal-police: This proposal was edited at 2024-09-17 11:35:39 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Distance rate-Decimals are not supported for this currency yet entering dot is allowed What is the root cause of that problem?We are adding extra decimals prop here
This causes allowing one decimal to any currency. What changes do you think we should make in order to solve the problem?We should remove that prop or set to different value based on the decimals supported for the currency Note : We need to check with original contributor as to why this was set to Same can be done in this component Update - We shall pass this comment
Incase of case 1: CurrencyUtils.getCurrencyDecimals(currency) returns 0 then final value will be 3 We can update this change where we take amount input What alternative solutions did you explore? (Optional) |
Edited by proposal-police: This proposal was edited at 2024-09-17 11:38:52 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Distance rate-Decimals are not supported for this currency yet entering dot is allowed What is the root cause of that problem?
What changes do you think we should make in order to solve the problem?
What alternative solutions did you explore? (Optional)
What alternative solutions did you explore? (Optional 2)
Result |
Job added to Upwork: https://www.upwork.com/jobs/~021836536263898090209 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann ( |
@DylanDylann when you get a chance, can you review the proposals to address this Albanian currency issue? Also, I'm not sure if there are other currencies that are affected by this issue like Japanese Yen. Thanks! |
Edited by proposal-police: This proposal was edited at 2024-09-25 05:28:13 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Decimals are not supported for this currency yet entering dot is allowed What is the root cause of that problem?We always display one extra decimal
If currency is ALL the default decimal is 0 and the extra decimal is 1 --> we will display one decimal If currency is USD the default decimal is 2 and the extra decimal is 1 --> we will display three decimal What changes do you think we should make in order to solve the problem?Add new prop to AmountForm Component called fixedDecimal. If fixedDecimal is valuable, we will use this value instead of App/src/components/AmountForm.tsx Line 87 in 2190f62
In CreateDistanceRatePage PolicyDistanceRateEditPage, PolicyDistanceRateTaxReclaimableEditPage, we need to pass fixedDecimal: 4 and remove extraDecimals prop Also need to update minimumFractionDigits: 4 Line 167 in 2190f62
Also need to update here App/src/libs/PolicyDistanceRatesUtils.ts Line 21 in 2190f62
If we need to update the same thing across App (In money request flow) we also need to address some other instances (discuss futher) |
@DylanDylann Please confirm the expect before going to proposals How many decimals should be displayed? |
@daledah Interesting point. I will review this issue today |
I lean toward removing the extra decimal in the distance rate page as mentioned by @daledah Anyway, I think we still need to confirm the expected first because the extra decimal is added a long time ago for the rate feature 🎀 👀 🎀 C+ reviewed |
Triggered auto assignment to @lakchote, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@Expensify/design @lakchote The number of decimals on the submit expense page and distance rate page is inconsistent. Is there any reason why we need to add one more extra decimal on the distance rate page? If not, should we remove extraDecimal to keep it consistent?
Screen.Recording.2024-09-20.at.14.44.53.mov
![]() |
I think that is on purpose, since a lot of government distance rates use three decimal places. cc @trjExpensify to fact check me there. |
@shawnborton For the VND, ALL currency (there are no decimal in the submit expense page), Should we allow one decimal in the distance rate page? |
@DylanDylann I have mentioned about removing that prop in my proposal. Any reason for selecting the other proposal |
@daledah gave a good explanation of why we should remove that prop that makes me lean toward this approach @BhuvaneshPatil Let's discuss the expectation first, I will come back to proposals later. Thanks |
What do you mean by the VND? |
@shawnborton Ahhh VND is a currency, ALL also be a currency For the VND currency and ALL currency (there are no decimal in the submit expense page), Should we allow one decimal in the distance rate page? Screen.Recording.2024-09-20.at.17.42.10.mov |
Hmm honestly I have no idea. I kind of think we can just always allow three decimal places no matter what the currency is to keep things simple? But would love someone more familiar with distance rates to fact check me, cc @twisterdotcom |
Proposal Updated
|
I think we should just allow three everywhere. That's what we do on oldDot. |
Wow, I didn't even test adding another one. Okay, then sure, let's do 4 everywhere. |
Current assignee @lakchote is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new. |
@DylanDylann, I think selected proposal is same as mine. Can you please tell me the reason why you selected their proposal? |
Ahh, thanks for your reminder. I updated comment to explain my decision. Don't hesitate to tell me if you have any concern |
@DylanDylann, I think their initial proposal was to remove the prop and my proposal was the first to provide a valid solution after we got confirmation on the expected behaviour. I have also mentioned to check all the places where we use |
@Krishna2323 You missed this point
|
Okay, thanks for explaining @daledah :) |
@daledah's proposal LGTM. |
📣 @DylanDylann 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @daledah You have been assigned to this job! |
@DylanDylann PR is ready. |
Awesome, waiting for this one to go into Production. |
Automation failed but this one went into production 2 days ago |
Automation failed, I'll work on the payment process tomorrow. |
Payouts due: 10-07-2024
Upwork job is here. |
@daledah, please apply to the job above, and I can complete the payment process in Upwork. Thanks! |
@alexpensify Hi, can you create the offer and send to me at https://www.upwork.com/freelancers/~0138d999529f34d33f |
@daledah - I sent an offer via Upwork. Please accept, and then I can complete the payment process. Thanks! |
@alexpensify Accepted thx |
All set here, I've completed the payment for @daledah! |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.0.36-1
Reproducible in staging?: Y
Reproducible in production?: Y
Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
Decimals are bit supported for this currency so user must not be allowed to enter dot.
Actual Result:
Decimals are not supported for this currency yet entering dot is displayed in distance rate page.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6606435_1726567186205.screenrecorder-2024-09-17-09-24-44-25_compress_1.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @DylanDylannThe text was updated successfully, but these errors were encountered: