FIX the logic to check if there is an accounting connection in the workspace#42613
FIX the logic to check if there is an accounting connection in the workspace#42613
Conversation
|
@aimane-chnaif 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] |
|
Confirming that we want to hide the |
Reviewer Checklist
Screenshots/VideosAndroid: NativeAndroid: mWeb ChromeiOS: NativeiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2024-05-28.at.11.56.07.AM.movScreen.Recording.2024-05-29.at.10.37.08.PM.movMacOS: Desktop |
|
There's conflict |
You're talking about imported tax rates, yeah? If so, yes, you shouldn't be able to add or delete tax rates when connected to an accounting solution. You have to manage the rates in the accounting solution directly. |
src/libs/PolicyUtils.ts
Outdated
| */ | ||
| function hasAccountingConnections(policy: OnyxEntry<Policy>) { | ||
| return Boolean(policy?.connections); | ||
| return Object.keys(policy?.connections ?? {}).length !== 0; |
There was a problem hiding this comment.
| return Object.keys(policy?.connections ?? {}).length !== 0; | |
| return !isEmptyObject(policy?.connections); |
Example usage:
|
"Add rate" button still shows after "Enable Tax import on the Import page once you connect to QBO" Screen.Recording.2024-05-28.at.12.02.05.PM.mov |
|
Tested well on my end Screen.Recording.2024-05-29.at.5.54.27.PM.mov |
|
@aimane-chnaif, this is ready for another review 🙇 |
|
Looks good. Testing shortly |
|
@aimane-chnaif on this:
We should have fixed this here and merged it into the the Xero merge freeze branch. CC: @mananjadhav @lakchote |
|
On this one: Is it specifically that |
Yes, this is fixed in the freeze branch. |
|
@trjExpensify please check this video for repro step. Screen.Recording.2024-05-30.at.11.01.13.AM.mov@hayata-suenaga there's conflict |
Okay yes, that confirms that the Here's the diff
|
Disable tax deletion if connected to accounting
|
conflicts! |
|
@marcaaron 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] |
|
@marcaaron I'm proceeding with the review and the merge as I have context on this and we need to get this deployed as soon as possible (context). |
|
✋ 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/Julesssss in version: 1.4.79-11 🚀
|



Details
This PR:
Delete ratebutton on Taxes page if there is an accounting connectionFixed Issues
$ #42565
PROPOSAL: N/A
Tests / QA Steps
Offline tests
N/A
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
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop