-
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 - Zero amount not displayed in receipt and expense details for distance expense #58478
Comments
Triggered auto assignment to @lschurr ( |
🚨 Edited by proposal-police: This proposal was edited at 2025-03-17 07:26:41 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.Distance - Zero amount not displayed in receipt and expense details for distance expense What is the root cause of that problem?The component conditionally renders the transaction amount using a falsy check ( App/src/components/DistanceEReceipt.tsx Line 69 in 06abee6
Additionally, in App/src/components/ReportActionItem/MoneyRequestView.tsx Lines 159 to 160 in 06abee6
What changes do you think we should make in order to solve the problem?We should update the conditional check to ensure that the amount is displayed even when it is 0. For example, we can change the condition to verify that the amount is not null or undefined: {(transactionAmount !== null && transactionAmount !== undefined) && (
<Text style={styles.eReceiptAmount}>{formattedTransactionAmount}</Text>
)} Or, alternatively: {(transactionAmount || transactionAmount === 0) && (
<Text style={styles.eReceiptAmount}>{formattedTransactionAmount}</Text>
)} For const formattedTransactionAmount = transactionAmount !== null && transactionAmount !== undefined ? convertToDisplayString(transactionAmount, transactionCurrency) : '';
const formattedPerAttendeeAmount = transactionAmount !== null && transactionAmount !== undefined ? convertToDisplayString(transactionAmount / (transactionAttendees?.length ?? 1), transactionCurrency) : ''; What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A, minor UI bug What alternative solutions did you explore? (Optional) |
Job added to Upwork: https://www.upwork.com/jobs/~021900601730914519131 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws ( |
🚨 Edited by proposal-police: This proposal was edited at 2025-03-17 06:24:34 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.In the confirmation page and expense preview, ₹0.00 is displayed. What is the root cause of that problem?In the expense preview, we always display the formatted amount string without any condition But in App/src/components/DistanceEReceipt.tsx Line 69 in 6d00a6b
The same bug happens on App/src/components/ReportActionItem/MoneyRequestView.tsx Lines 159 to 160 in 703cdf4
What changes do you think we should make in order to solve the problem?
App/src/components/DistanceEReceipt.tsx Line 69 in 6d00a6b
Note: For the What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?This is an UI bug What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
|
ProposalPlease re-state the problem that we are trying to solve in this issue.In distance expenses, zero amount is not displayed in receipt and expense details What is the root cause of that problem?We are checking if App/src/components/ReportActionItem/MoneyRequestView.tsx Lines 159 to 160 in 3ca6a25
and in App/src/components/DistanceEReceipt.tsx Line 69 in 3ca6a25
The checks are failing for What changes do you think we should make in order to solve the problem?We can explicitly check if const formattedTransactionAmount = transactionAmount !== undefined ? convertToDisplayString(transactionAmount, transactionCurrency) : '';
const formattedPerAttendeeAmount = transactionAmount !== undefined ? convertToDisplayString(transactionAmount / (transactionAttendees?.length ?? 1), transactionCurrency) : ''; {transactionAmount !== undefined && <Text style={styles.eReceiptAmount}>{formattedTransactionAmount}</Text>} This allows cases where
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?N/A What alternative solutions did you explore? (Optional) |
Updated proposal. |
Triggered auto assignment to @rlinoz, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
@Ollyws Can you check the point I mentioned for the case of |
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: V9.1.13-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
If this was caught during regression testing, add the test name, ID and link from TestRail: N
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Redminote 10s android 13
App Component: Money Requests
Action Performed:
Expected Result:
The confirmation page, expense preview, and receipt should consistently display amount ₹0.00 .
Actual Result:
In the confirmation page and expense preview, ₹0.00 is displayed.
After opening the expense and tapping the receipt, the amount is not shown, and the receipt lacks any details about the amount.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug6770462_1741942910940.Screenrecorder-2025-03-14-14-18-57-910.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @OllywsThe text was updated successfully, but these errors were encountered: