-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Revert "Revert "Handle tax for split requests"" and fix reported bugs #42737
Revert "Revert "Handle tax for split requests"" and fix reported bugs #42737
Conversation
@dukenv0307 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@dukenv0307 I'm back with a followup PR. I have updated tests section to test and address deploy blockers created on former PR. Please take a look, thank you! |
@MonilBhavsar This step is failed.
Screen.Recording.2024-05-30.at.11.27.57.mov |
@dukenv0307 sorry, I am not understanding it. Could you please explain it again. In Video, i see you're only updating taxAmount? |
web-resize.mp4@MonilBhavsar Pls check this video. Nothing happens when I press the delete button. |
This happens on staging too and is specific to currencies like VND where we don't support decimals. I would address that in another issue and PR |
With that cleared up, @dukenv0307. Can you complete the review? |
Ah thank you, I'll finish reviewing in an hour |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-05-24.at.11.11.22.movAndroid: mWeb Chromeweb-resize.mp4iOS: Nativeweb-resize.mp4iOS: mWeb Safariweb-resize.10.30.52.mp4MacOS: Chrome / Safariweb-resize.mp4web-resize.mp4web-resize.mp4web-resize.mp4web-resize.mp4web-resize.mp4web-resize.mp4MacOS: Desktopweb-resize.mp4 |
}, []); | ||
|
||
useEffect(() => { | ||
if (!shouldShowTax || prevTaxAmount !== transaction?.taxAmount || (prevAmount === transaction?.amount && prevCurrency === transaction?.currency)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@MonilBhavsar Is this expectation? This is inconsistency with the below flow where the new amount is saved
- Create a split scan.
- When the receipt is scanning, click on the split preview.
- Edit tax amount
- Save it
- Reload page
- Observe the new amount is saved
web-resize.mp4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think should be expected behavior here?
The expense amount is also saved in a similar way, so looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The expense amount is also saved in a similar way
@MonilBhavsar Sorry, I don't understand your mean. Pls check the video below, the expense amount is saved but tax amount.
web-resize.mp4
I'm not sure, if it's the expectation we can go ahead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah okay, I got you're saying now. Looking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dukenv0307 I have fixed this bug. Hopefully, I didn't break anything in fixing it 🙏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I'll re-check again
overall, it looks good, I just left a minor comment ^ |
I re-tested and they worked well |
Resolved conflicts |
I can look today but now there are conflicts - I'll start my review and see how far I get, and can finish up post-conflicts tomorrow! |
Okay thanks! I'll make sure to resolve it before Mountain time, so we don't get it again 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay this looks good to me! I can take another final look (and merge) once conflicts are resolved.
@dangrous thanks! Conflicts resolved. Doing a quick test |
tested again and works fine! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Do we think @dukenv0307 should give it one more set of tests, since there have been some changes since last time, or am I good to merge?
Okay cool! @dukenv0307 could you please take a final look, please 🙇 |
Were the changes material? |
will give the final feedback soon |
works well. We're good to merge |
Nice, thanks for checking! |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to production by https://github.com/luacmartins in version: 1.4.81-11 🚀
|
const transactionCurrency = TransactionUtils.getCurrency(transaction); | ||
if (newAmount === TransactionUtils.getAmount(transaction) && currency === transactionCurrency) { | ||
const transactionCurrency = TransactionUtils.getCurrency(currentTransaction); | ||
if (newAmount === TransactionUtils.getAmount(currentTransaction) && currency === transactionCurrency) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing how to get the transaction caused this blocker #43259
Reverts #42670
Details
Pass taxCode and taxAmount to Split API commands.
Tracks tax both online and offline optimistically for split expense with policy expense chat
Fixed Issues
$ #39690
PROPOSAL:
Tests
Same as QA steps
And test #42642
And test #42649
And test #42682
And test #42655
Offline tests
Same as QA steps
QA Steps
Prerequisite: Tax is enabled on workspace
Now we repeat by splitting with individuals
Testing split scans
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
See MacOS: Chrome / SafariAndroid: mWeb Chrome
See MacOS: Chrome / SafariiOS: Native
See MacOS: Chrome / SafariiOS: mWeb Safari
See MacOS: Chrome / SafariMacOS: Chrome / Safari
https://drive.google.com/file/d/1C6T9vQ1VwujJJKlCbNNo8cZ_udQZmc3W/view?usp=sharing
MacOS: Desktop
See MacOS: Chrome / Safari