Conversation
…nto monil-splitBillTaxUpdate
|
@MonilBhavsar I found the following bug
web-resize.mp4 |
|
It worked well when I enter the large value at the beginning |
|
Good catch! I have reproduced. Looking into it |
|
Typescript checks are broken on main and being fixed here #42256 |
| const selectedReportID = useRef<string>(reportID); | ||
|
|
||
| // We need to set selectedReportID if user has navigated back from confirmation page and navigates to confirmation page with already selected participant | ||
| const selectedReportID = useRef<string>(participants?.length === 1 ? participants[0]?.reportID ?? reportID : reportID); |
There was a problem hiding this comment.
Bug was
- User enters amount
- Selects participants and clicks "Next"
- Goes to confirmation page and see's Category, Tags and Tax fields
- User goes back to 1 and edit's amount(doesn't matter)
- User without selecting a participant clicks "Next" because participant was already selected(This is root cause)
- Goes to confirmation page and doesn't see Category, Tags and Tax fields because reportID and policyID is not properly set from 5 above.
Let me know if you think this is not the correct way and should use separate hook or may be something else. Open to other solutions.
|
TypeScript checks are passing now |
|
Bug:
web-resize.mp4 |
| if (transaction?.taxAmount && previousTransactionAmount === transaction?.amount && previousTransactionCurrency === transaction?.currency) { | ||
| return IOU.setMoneyRequestTaxAmount(transactionID, transaction?.taxAmount ?? 0, true); | ||
| } |
There was a problem hiding this comment.
I mostly think this was pre optimization. When the user updates transactionAmount, previousTransactionAmount was not being changed, and we we were not setting updated taxAmount in Onyx
There was a problem hiding this comment.
No, this introduced a bug where taxAmount is not being updated in draft transaction. looking...
There was a problem hiding this comment.
This is fixed now with latest commit - c671c7a
| return `${ONYXKEYS.COLLECTION.SPLIT_TRANSACTION_DRAFT}${transactionID}`; | ||
| }, | ||
| }, | ||
| draftTransaction: { |
There was a problem hiding this comment.
withFullTransactionOrNotFound() returns draftTransaction or transaction depending upon condition. So I think we can remove this
|
@dukenv0307 I have fixed the bug and also noticed bugs with Split scan flow. So also fixed that. Please take a look and let me know what do you think. Thank you! 🙌 |
|
Thanks for reporting bugs 😄 |
|
code looks good and tests well |
|
@jasperhuangg 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] |
|
✋ 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 staging by https://github.com/jasperhuangg in version: 1.4.76-0 🚀
|
|
I think this caused a few minor deploy blockers in the most recent deploy checklist. |
|
I reverted this PR locally to see if it would fix #42655 and it appears to. so I think this might have caused a few blockers. |
|
created a revert PR here #42670 discussion is on going in this thread https://expensify.slack.com/archives/C07J32337/p1716843389797979 |
|
we did revert this PR and cp'd it to staging |
|
Just adding a linked bug reported here. I'm going to remove the blocking label though. |
|
🚀 Deployed to production by https://github.com/Beamanator in version: 1.4.76-7 🚀
|
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
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