Open IuliiaHerets opened 1 month ago
Triggered auto assignment to @stephanieelliott (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
We think that this bug might be related to #wave-collect - Release 1
@stephanieelliott 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
The payment button shows negative amount. Error shows up when trying to pay the negative amount.
If any transaction is held, we display the unheld option first without checking whether the nonHeldAmount
is negative or not
isNegativeNonHeldAmount
in this function that will be true
if the unheldTotal
is a negative amountif (hasUpdatedTotal(iouReport, policy) && hasPendingTransaction) {
const unheldTotal = reportTransactions.reduce((currentVal, transaction) => currentVal + (!TransactionUtils.isOnHold(transaction) ? transaction.amount : 0), 0);
return [
CurrencyUtils.convertToDisplayString(unheldTotal * coefficient, iouReport?.currency),
CurrencyUtils.convertToDisplayString((iouReport?.total ?? 0) * coefficient, iouReport?.currency),
unheldTotal * coefficient < 0,
];
}
return [
CurrencyUtils.convertToDisplayString((iouReport?.unheldTotal ?? 0) * coefficient, iouReport?.currency),
CurrencyUtils.convertToDisplayString((iouReport?.total ?? 0) * coefficient, iouReport?.currency),
(iouReport?.unheldTotal ?? 0) * coefficient < 0,
];
isNegativeNonHeldAmount
is true
we should display the formattedAmount
const displayedAmount = isAnyTransactionOnHold && canAllowSettlement && !isNegativeNonHeldAmount ? nonHeldAmount : formattedAmount;
nonHeldAmount
as undefined
if isNegativeNonHeldAmount
is true
so we will not display the wrong paid-only optionnonHeldAmount={!hasOnlyHeldExpenses && !isNegativeNonHeldAmount ? nonHeldAmount : undefined}
Or we can add a !isNegativeNonHeldAmount
check in these places to prevent showing the choose approve/paid option
https://github.com/Expensify/App/blob/5d25b40eab1416d2d67624a376099853a2b6af86/src/components/MoneyReportHeader.tsx#L176
We need to do the same fix in ReportPreview
If we don't want to return isNegativeNonHeldAmount
in getNonHeldAndFullAmount
function, we can check inside each component
Job added to Upwork: https://www.upwork.com/jobs/~021844594617993665700
Triggered auto assignment to Contributor-plus team member for initial proposal review - @akinwale (External
)
Do I need to fund my account real time because I tested the web platform and it went well
I sent 100 from user A, den user B submit 20. And user B still return 80( no negative ) and paid button didn't encounter error, I wanted to send video on upwork but it seems the handler may not reply me and in turn waste my connect and I can't afford to do that. Let me know if its solved or sth else.
π£ @Jaytechent! π£ Hey, it seems we donβt have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork. Please follow these steps:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>
Contributor details Your Expensify account email: olemilek100@gmail.com Upwork Profile Link: https://www.upwork.com/freelancers/~0128e4d43ce1ad1755
β Contributor details stored successfully. Thank you for contributing to Expensify!
@akinwale, @stephanieelliott Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Thanks @Jaytechent! No, you should not need to fund the account. Did you Hold
the $100 expense (step 4)? It doesn't look like you did, otherwise it would have a comment on it (the hold reason, which is required).
I was able to repro this:
@akinwale we have a proposal here -- can you review when you get a chance?
@akinwale we have a proposal https://github.com/Expensify/App/issues/50497#issuecomment-2402022672 -- can you review when you get a chance?
^^ bump @akinwale
@stephanieelliott Thanks for the bump.
@mkzie2's proposal is adequate here.
πππ C+ reviewed.
Triggered auto assignment to @Beamanator, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
π£ @akinwale π An offer has been automatically sent to your Upwork account for the Reviewer role π Thanks for contributing to the Expensify app!
π£ @mkzie2 π An offer has been automatically sent to your Upwork account for the Contributor role π Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review π§βπ» Keep in mind: Code of Conduct | Contributing π
Hey @akinwale this PR is awaiting your review, can you take a look?
PR is still being reviewed
PR on staging π
This issue has not been updated in over 15 days. @Beamanator, @akinwale, @stephanieelliott, @mkzie2 eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
@stephanieelliott Please help to remove Monthly
label.
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.62-4 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2024-11-22. :confetti_ball:
For reference, here are some details about the assignees on this issue:
@akinwale @stephanieelliott @akinwale The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
If you havenβt already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.46-4 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): applausetester+pso@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
The payment button will not have negative amount.
Actual Result:
The payment button shows negative amount. Error shows up when trying to pay the negative amount.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/00a2003f-b674-414d-908e-8cc0e58d5f23
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @stephanieelliott