Skip to content
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

[Hold for discussion][$250] Cannot make an expense negative #53441

Open
1 of 8 tasks
m-natarajan opened this issue Dec 3, 2024 · 70 comments
Open
1 of 8 tasks

[Hold for discussion][$250] Cannot make an expense negative #53441

m-natarajan opened this issue Dec 3, 2024 · 70 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Reviewing Has a PR in review Weekly KSv2

Comments

@m-natarajan
Copy link

m-natarajan commented Dec 3, 2024

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.70-1
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?:
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @twisterdotcom
Slack conversation (hyperlinked to channel name): ts_external_expensify_bugs

Action Performed:

  1. SmartScan a receipt
  2. Open the expense
  3. Open the amount
  4. Try to correct it to be negative. No way to add brackets or - sign.

Expected Result:

User able to enter minus, plus or Brackets

Actual Result:

User unable to enter minus, plus or Brackets

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Shottr 2024-12-03 10 02 13

Recording.815.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021866173019746429432
  • Upwork Job ID: 1866173019746429432
  • Last Price Increase: 2025-01-11
  • Automatic offers:
    • ZhenjaHorbach | Reviewer | 105292850
Issue OwnerCurrent Issue Owner: @
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels Dec 3, 2024
Copy link

melvin-bot bot commented Dec 4, 2024

Triggered auto assignment to @johncschuster (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.

@melvin-bot melvin-bot bot added the Overdue label Dec 9, 2024
@johncschuster johncschuster added the External Added to denote the issue can be worked on by a contributor label Dec 9, 2024
@melvin-bot melvin-bot bot changed the title Cannot make an expense negative [$250] Cannot make an expense negative Dec 9, 2024
Copy link

melvin-bot bot commented Dec 9, 2024

Job added to Upwork: https://www.upwork.com/jobs/~021866173019746429432

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 9, 2024
Copy link

melvin-bot bot commented Dec 9, 2024

Triggered auto assignment to Contributor-plus team member for initial proposal review - @ZhenjaHorbach (External)

@garrettmknight
Copy link
Contributor

Potentially a new feature - asking in thread.

@garrettmknight garrettmknight moved this to Future Cohort Project in [#whatsnext] #expense Dec 10, 2024
@garrettmknight garrettmknight moved this from Future Cohort Project to Bugs and Follow Up Issues in [#whatsnext] #expense Dec 10, 2024
@pasyukevich
Copy link
Member

Hi, I'm Eugene from Callstack - expert contributor group. I’d like to work on this issue.

@pasyukevich
Copy link
Member

Should I create just a PR here without the proposal?

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Dec 11, 2024
Copy link

melvin-bot bot commented Dec 11, 2024

📣 @ZhenjaHorbach 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@pasyukevich
Copy link
Member

In this case, should we allow the entry of a plus sign, calculate the combinations result, and send the computed result to the API?

@melvin-bot melvin-bot bot added the Overdue label Dec 13, 2024
@ZhenjaHorbach
Copy link
Contributor

@pasyukevich
If required I can assign a random engineer !

@melvin-bot melvin-bot bot removed the Overdue label Dec 13, 2024
@pasyukevich
Copy link
Member

@ZhenjaHorbach

Yes, I think this would be great - we need some discussion here for the expected behavior

@melvin-bot melvin-bot bot added the Overdue label Dec 16, 2024
@ZhenjaHorbach
Copy link
Contributor

🎀👀🎀

Copy link

melvin-bot bot commented Jan 27, 2025

@nkuoch, @johncschuster, @pasyukevich, @ZhenjaHorbach Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@pasyukevich
Copy link
Member

Updates:

  • Working on an update

@melvin-bot melvin-bot bot removed the Overdue label Jan 27, 2025
@pasyukevich
Copy link
Member

Can we update the ticket description? It seems more like a feature update for the ‘Create Manual Expense’ and 'Edit Amount' than an issue.

Should I also include the update for other places where we need to render this amount in negative too?

@ZhenjaHorbach
Copy link
Contributor

Can we update the ticket description? It seems more like a feature update for the ‘Create Manual Expense’ and 'Edit Amount' than an issue.

Should I also include the update for other places where we need to render this amount in negative too?

CC: @johncschuster @nkuoch

@pasyukevich
Copy link
Member

Can we update the ticket description? It seems more like a feature update for the ‘Create Manual Expense’ and 'Edit Amount' than an issue.

Should I also include the update for other places where we need to render this amount in negative too?

Bump here

@pasyukevich
Copy link
Member

pasyukevich commented Jan 30, 2025

After this update should we have any scenarios with MoneyRequestAmountForm when a negative value should not be shown?

@pasyukevich
Copy link
Member

Updates:

  • UI work done
  • BE request and response with negative - handles properly
  • Now focused on final checks

@pasyukevich
Copy link
Member

@nkuoch

I've noticed that when we send a negative value with UpdateMoneyRequestAmountAndCurrency the API responds with absolute modifiedAmount

requestID: 90ab96bc8a8aee49-SJC

@pasyukevich
Copy link
Member

@dannymcclain @shawnborton

What do you think about the ‘minus’ sign appearing between the currency symbol and the amount?

Since this is an input field, we need to modify the input handlers to ensure the minus sign is reflected in the value but not shown in the input field itself. It should still be positioned correctly on the left.

From the user’s perspective on a desktop, they will type the minus sign in one place (via the keyboard), but it will appear in a different position in the field.

I’m attaching two screenshots: one with the keyboard visible and one without, to illustrate the current behavior.

Image Image

@melvin-bot melvin-bot bot added the Overdue label Feb 3, 2025
@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Feb 3, 2025

Not overdue

Waiting for confirmation from @Expensify/design !

@melvin-bot melvin-bot bot removed the Overdue label Feb 3, 2025
@dannymcclain
Copy link
Contributor

cc @Expensify/design for a gut check here, but this is my thinking:

What do you think about the ‘minus’ sign appearing between the currency symbol and the amount?

I think this looks really weird and doesn't really feel like how I typically see negative money amounts.

Since this is an input field, we need to modify the input handlers to ensure the minus sign is reflected in the value but not shown in the input field itself. It should still be positioned correctly on the left.

From the user’s perspective on a desktop, they will type the minus sign in one place (via the keyboard), but it will appear in a different position in the field.

I think the idea here is that we won't actually allows users to type the minus sign, but rather they will need to use the Flip button to change between positive and negative amounts. Does that make it easier to position the minus symbol to the left of the currency symbol? i.e. -$4.00

@dubielzyk-expensify
Copy link
Contributor

I think this looks really weird and doesn't really feel like how I typically see negative money amounts.

Agree. I think the negative symbol should appear at the start always. There might be currencies I've not accounted for, but I believe this'll be more obvious

@shawnborton
Copy link
Contributor

Yup, totally agree with that.

@pasyukevich
Copy link
Member

Got it

Thanks for the clarification, I will proceed then

@pasyukevich
Copy link
Member

Updates:

  • Working on negative symbol logic

@pasyukevich
Copy link
Member

Updates:

  • Keep working on the update - gluing with API submit flow

@pasyukevich
Copy link
Member

@nkuoch

I've noticed that when we send a negative value with UpdateMoneyRequestAmountAndCurrency the API responds with absolute modifiedAmount

requestID: 90ab96bc8a8aee49-SJC

@nkuoch Could you take a look?

@pasyukevich
Copy link
Member

Updates:

  • Removing redundant code from the previous implementation, recording videos to open the PR

@nkuoch
Copy link
Contributor

nkuoch commented Feb 7, 2025

@melvin-bot melvin-bot bot added Overdue Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 Overdue labels Feb 10, 2025
@pasyukevich
Copy link
Member

PR is ready for review

I've prepared steps only with the creation of the expense with minus since edit submission does not apply it on the API side

#56092

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Feb 10, 2025

PR is ready for review

I've prepared steps only with the creation of the expense with minus since edit submission does not apply it on the API side

#56092

Thanks !
I will check tomorrow !
Since we need to finalize the designs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors Reviewing Has a PR in review Weekly KSv2
Projects
Status: Bugs and Follow Up Issues
Development

No branches or pull requests