Revert "Revert "Handle tax for split requests"" and fix reported bugs#42737
Revert "Revert "Handle tax for split requests"" and fix reported bugs#42737MonilBhavsar merged 13 commits intomainfrom
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.
@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.
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.
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.
Ah okay, I got you're saying now. Looking
There was a problem hiding this comment.
@dukenv0307 I have fixed this bug. Hopefully, I didn't break anything in fixing it 🙏
There was a problem hiding this comment.
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 😅 |
dangrous
left a comment
There was a problem hiding this comment.
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! |
dangrous
left a comment
There was a problem hiding this comment.
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.
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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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