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 payment 2024-06-03] [$250] [Wave Collect][QBO] Prevent the simultaneous enabling of JE export and Tax import #41042

Closed
hayata-suenaga opened this issue Apr 25, 2024 · 42 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@hayata-suenaga
Copy link
Contributor

hayata-suenaga commented Apr 25, 2024

Prevent the user from enabling Tax import and selecting Journal Entry (JE) as the export destination of out-of-pocket expenses at the same time.

When the Tax import is enabled, the Journal Entry should not appear as an option of QBO entities to export out-of-pocket expenses to. Also a text explaining the reason why Journal Entry option is hidden should be displayed.

Screenshot 2024-05-10 at 4 31 44 PM

When Journal Entry is selected as the entity to be used, the switch to enable Tax import should be disabled. Also, a text explaining why Tax import is disabled should be displayed.

Screenshot 2024-05-10 at 4 33 36 PM
Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~011e0178d63e9af45a
  • Upwork Job ID: 1783687091422687232
  • Last Price Increase: 2024-04-26
  • Automatic offers:
    • rojiphil | Reviewer | 0
@hayata-suenaga hayata-suenaga added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Apr 25, 2024
@hayata-suenaga hayata-suenaga self-assigned this Apr 25, 2024
@hayata-suenaga hayata-suenaga moved this to Release 1: Spring 2024 (May) in [#whatsnext] #wave-collect Apr 25, 2024
Copy link

melvin-bot bot commented Apr 25, 2024

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

@hayata-suenaga hayata-suenaga changed the title [Wave Collect][QBO] Handle the error [Wave Collect][QBO] Handle the error with Journal Entry selection while tax tracking is enabled Apr 25, 2024
@hayata-suenaga hayata-suenaga added the External Added to denote the issue can be worked on by a contributor label Apr 26, 2024
Copy link

melvin-bot bot commented Apr 26, 2024

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

@melvin-bot melvin-bot bot changed the title [Wave Collect][QBO] Handle the error with Journal Entry selection while tax tracking is enabled [$250] [Wave Collect][QBO] Handle the error with Journal Entry selection while tax tracking is enabled Apr 26, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 26, 2024
Copy link

melvin-bot bot commented Apr 26, 2024

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

@gijoe0295
Copy link
Contributor

gijoe0295 commented Apr 26, 2024

@hayata-suenaga Hmm I think it's currently working like that:

const shouldShowTaxError = isTaxesEnabled && exportEntity === CONST.QUICKBOOKS_EXPORT_ENTITY.JOURNAL_ENTRY;

I enabled taxes in Import >> Taxes

Screenshot 2024-04-26 at 10 08 39

And the error apparently shows in Export out-of-pocket expenses page:

Screenshot 2024-04-26 at 10 09 09

@tienifr
Copy link
Contributor

tienifr commented Apr 26, 2024

Proposal

Please re-state the problem that we are trying to solve in this issue.

Warn the user of the error that happens when Journal Entry is selected as the out-of-pocket expense export destination while tax is enabled.

This part of the OP is already covered in here

However, there's a related bug.

  1. The user already selects Journal entry
  2. Then enable the Tax
  3. Then go back to the Export as screen, do not select anything
  4. Then go back to accounting/quickbooks-online/export screen, they will see a RBR on Export as without any reason.

What is the root cause of that problem?

In step 3, we'll check that tax is already enabled, so we see a TaxError and will attempt to clear the config here

However, we don't pass anything as settingValue, so it will be undefined, when no settingValue is sent to the back-end here, it will throw an error.

What changes do you think we should make in order to solve the problem?

We need to default it to null/empty string by ?? here.

Alternatively, we can pass null as settingValue here and update here such that if the settingValue is nully, it will be used as is without JSON.stringify.

I believe the back-end already supports sending null to clear the config, but in case it doesn't support yet, we should add support in back-end.

What alternative solutions did you explore? (Optional)

NA

@trjExpensify
Copy link
Contributor

@teneeto is going to take this as QBO clean-up. @tienifr you can progress #41045.

@teneeto
Copy link
Contributor

teneeto commented Apr 26, 2024

Hi, I'm Eto from Callstack - expert contributor group - and I would like to take care of this issue.

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

melvin-bot bot commented Apr 26, 2024

📣 @rojiphil 🎉 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

@trjExpensify
Copy link
Contributor

I don't think the OP as written is incredibly clear on what needs to be done for this issue. I think it would be good to outline what's expected, and then show a series of the mocks for each step to make that clear. There's an error message in-line when the JE/Tax misconfig happens in production already, what's missing?

Is it that there should be an RBR from the bottom tab > Accounting LHN > Export > etc etc all the way to where the error message is in-line? More broadly for errors in the accounting settings, is that pattern applied or does it need to be added for any in-line errors in the QBO accounting configuration?

@zanyrenney I'm going to assign this one to you for the time being to help clarify and firm up on what's needed here, as I couldn't make that out completely from this part of the doc.

@zanyrenney
Copy link
Contributor

👋🏼 hey there! Thanks for assigning me Tom.

Breaking down the desired behaviour in steps.

  1. User sets their export option as Journal Entries. They do not have Tax enabled so all export options are available.
  2. User then enables Tax on the workspace
  3. Then, we need to show the RBR for on the export option selected which is Journal Entries (as per step 1)
  4. The RBR needs to show the error text “Journal entry is not available when taxes are enabled. Please select a different export option.”
  5. On the Export as page, we should show Vendor bills and check as the only two options. NOT Journal entries
  6. There is no "default" so both will appear unselected but in the selection list, available for either to be selected.
  7. Once the user has selected either VBs or check, the RBR and error text should be removed.

@melvin-bot melvin-bot bot removed the Overdue label Apr 29, 2024
@zanyrenney
Copy link
Contributor

zanyrenney commented Apr 29, 2024

Is it that there should be an RBR from the bottom tab > Accounting LHN > Export > etc etc all the way to where the error message is in-line?

We should mirror the pattern from the error handling doc - here so show the RBR on workspace > accounting export

More broadly for errors in the accounting settings, is that pattern applied or does it need to be added for any in-line errors in the QBO accounting configuration?

Not sure what you mean here, we're showing the RBR on the QBO line in the accounting page > connections card. LMK what you mean specifically though!

@trjExpensify
Copy link
Contributor

Breaking down the desired behaviour in steps.

  1. User sets their export option as Journal Entries. They do not have Tax enabled so all export options are available.
  2. User then enables Tax on the workspace
  3. Then, we need to show the RBR for on the export option selected which is Journal Entries (as per step 1)
  4. The RBR needs to show the error text “Journal entry is not available when taxes are enabled. Please select a different export option.”
  5. On the Export as page, we should show Vendor bills and check as the only two options. NOT Journal entries
  6. There is no "default" so both will appear unselected but in the selection list, available for either to be selected.
  7. Once the user has selected either VBs or check, the RBR and error text should be removed.

You might have to walk me through this live. These steps don't make sense to me, I think they're actually impossible? As soon as you connect to QBO, you can't "enable tax on the workspace", the only way you can turn that feature on thereafter is by importing Taxes via the QBO integration. So in this scenario you've outlined, wouldn't this be:

  1. Export as: Journal Entry
  2. Taxes: not imported
  3. We don't let them toggle on the Taxes import in the QBO settings because the Journal Entry export method is selected
  4. Show hint text beneath the Taxes import page that explains why and that they need to pick either VBs or Check as an export method to import taxes

OR

  1. Export as: Vendor bill (which will be the default set on initial connection as well)
  2. Taxes: Imported
  3. We don't let them choose "Journal Entry" in the "Export as" select list because taxes are imported via the integration
  4. We show hint text beneath the Export as push row explaining why JEs aren't available and that they need to stop importing taxes to export as JEs.

More broadly for errors in the accounting settings, is that pattern applied or does it need to be added for any in-line errors in the QBO accounting configuration?

On this one, what I mean by it is that right now there isn't a "brick road" that leads to the specific field in error within the QBO integration pages. You have to go there to find it by yourself, so we should make sure that a solution is implemented for that. I.e

  • RBR starts on the "Settings" bottom tab
  • Red dot on the Workspaces menu item
  • Red dot on the Workspace row that contains an error
  • Red dot on the Accounting menu item within that Workspace
  • Red dot on the applicable Export || Import || Advanced menu item where the error is
  • Red dot and error message on the applicable field in error

@zanyrenney
Copy link
Contributor

Happy to chat live if that helps Tom! This design was from this conversation: here

Jason raised it in the design doc and this was the solution proposed

But -- maybe this is an oversight and thinking through the bug found last week to do with Taxes (and the toggling!) it's this journey we're actually trying to solve for:

  • Export as: Journal Entry
  • Taxes: not imported
  • We don't let them toggle on the Taxes import in the QBO settings because the Journal Entry export method is selected
  • Show hint text beneath the Taxes import page that explains why and that they need to pick either VBs or Check as an export method to import taxes

@trjExpensify
Copy link
Contributor

Okay, cool.. so I think these are the two cases that don't allow for the misconfiguration and then there's no in-line error message or anything like that.

Vendor bill (or Check) + taxes imported, can't export as Journal Entry

  1. Export as: Vendor bill (which will be the default set on initial connection as well)
  2. Taxes: Imported
  3. We don't let them choose "Journal Entry" in the "Export as" select list because taxes are imported via the integration
  4. We show hint text beneath the Export as push row explaining why JEs aren't available and that they need to stop importing taxes to export as JEs.
image

Journal Entry + Taxes not imported, can't import taxes

  1. Export as: Journal Entry
  2. Taxes: not imported
  3. We don't let them toggle on the Taxes import in the QBO settings because the Journal Entry export method is selected
  4. Show hint text beneath the Taxes import page that explains why and that they need to pick either VBs or Check as an export method to import taxes
image

CC: @JmillsExpensify

@trjExpensify
Copy link
Contributor

PR is in review.

@trjExpensify
Copy link
Contributor

trjExpensify commented May 24, 2024

@hayata-suenaga should we close this in favour of #41621?

Edit: Ignore that, we need to settle up here when the OG PR hits prod.

@hayata-suenaga
Copy link
Contributor Author

Just as a clarification:

My PR is about location configuration

This issue is for the PR that handles tax configuration (which was done by Eto) 😄

@hayata-suenaga hayata-suenaga added Awaiting Payment Auto-added when associated PR is deployed to production Daily KSv2 and removed Reviewing Has a PR in review Weekly KSv2 labels May 29, 2024
@bfitzexpensify bfitzexpensify added Bug Something is broken. Auto assigns a BugZero manager. and removed Bug Something is broken. Auto assigns a BugZero manager. labels May 30, 2024
Copy link

melvin-bot bot commented May 30, 2024

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

@bfitzexpensify
Copy link
Contributor

Adding another BZ team member to handle anything required on this while I'm OOO from today until June 11th:

@sonialiap - the PR - #41638 - is in review, and we'll just need to follow the usual BZ process once it's deployed.

@hayata-suenaga
Copy link
Contributor Author

hayata-suenaga commented Jun 3, 2024

yes we just need a payment for @rojiphil as a C+ after the regression period is over

@melvin-bot melvin-bot bot removed the Overdue label Jun 3, 2024
@rojiphil
Copy link
Contributor

rojiphil commented Jun 3, 2024

yes we just need a payment for @s77rt as a C+ after the regression period is over

@hayata-suenaga Some confusion here. I was the C+ reviewer here. Also reference here.
cc @trjExpensify @sonialiap

@hayata-suenaga
Copy link
Contributor Author

ah sorry my bad I tagged a wrong C+ 🙇

@sonialiap
Copy link
Contributor

sonialiap commented Jun 4, 2024

PR deployed to production on May 27. +7 days puts payment on Jun 3

Payment summary:

@sonialiap sonialiap changed the title [$250] [Wave Collect][QBO] Prevent the simultaneous enabling of JE export and Tax import [Hold for payment 2024-06-04] [$250] [Wave Collect][QBO] Prevent the simultaneous enabling of JE export and Tax import Jun 4, 2024
@sonialiap sonialiap changed the title [Hold for payment 2024-06-04] [$250] [Wave Collect][QBO] Prevent the simultaneous enabling of JE export and Tax import [Hold for payment 2024-06-03] [$250] [Wave Collect][QBO] Prevent the simultaneous enabling of JE export and Tax import Jun 4, 2024
@s77rt
Copy link
Contributor

s77rt commented Jun 4, 2024

@sonialiap I'm not due payment here. We can close the issue

@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Jun 4, 2024
@github-project-automation github-project-automation bot moved this from Release 1.5: XeroCon 2024 (June 12th) to Done in [#whatsnext] #wave-collect Jun 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests

10 participants