You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Invoices - Unable to send invoice if the company info is entered in Invoices settings first #51872
Version Number: 9.0.56-3 Reproducible in staging?: Y Reproducible in production?: N If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers):applausetester+kh2410006@applause.expensifail.com Issue reported by: Applause - Internal Team
Send an invoice from the workspace created in Step 2
Note that error is shown and the invoice cannot be sent
Create another workspace
Go to workspace settings and enable Invoices in More features
Go to FAB > Send invoice
Send an invoice from the new workspace created in Step 10, then add the same company info in Step 6 after the confirmation page
Expected Result:
User should be able to send invoice when the company name and address are saved in Invoices settings (Step 1 to 9)
Actual Result:
Error shows up and invoice is not sent when the company name and address are saved in Invoices settings. (Step 1 to 9)
When the same company info is entered when sending info (Step 13), the invoice is sent successfully
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Android: Standalone
Android: HybridApp
Android: mWeb Chrome
iOS: Standalone
iOS: HybridApp
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop
Screenshots/Videos
Add any screenshot/video evidenceBug6652264_1730464671206.20241101_202835.mp4
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Please re-state the problem that we are trying to solve in this issue.
Unable to send invoice if the company info is entered in Invoices settings first
What is the root cause of that problem?
When we set the company information in the invoice settings first and then proceed to send the invoice, the invoice flow does not prompt for the company information again because it has already been set. However, in the parameters sent when invoicing, companyName and companyWebsite will be undefined, leading to a backend error indicating that the company information is missing.
What changes do you think we should make in order to solve the problem?
In the 'send invoice' process, we can also include policy?.invoice?.companyName as a fallback in case the user has already set the company name in the policy. We should do the same for the company website here.
Note: We can also reverse this logic to prioritize the companyName and companyWebsite passed in, falling back to the values from the policy only if they are not provided.
What alternative solutions did you explore? (Optional)
Hi, I am Michael (Mykhailo) from Callstack, an expert agency and I can work on this issue. Moreover, I am the author of #50571 and consider this as a regression issue.
That looks like a backend bug as well because happens only with newly created workspaces but not with legacy ones. It relates to #51871 since the backend does not set the company name and website values. Also, the failure data is not used due to the server response.
Activity
github-actions commentedon Nov 1, 2024
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
melvin-bot commentedon Nov 1, 2024
Triggered auto assignment to @MitchExpensify (
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.melvin-bot commentedon Nov 1, 2024
Triggered auto assignment to @danieldoglas (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Nov 1, 2024
💬 A slack conversation has been started in #expensify-open-source
Nodebrute commentedon Nov 1, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Unable to send invoice if the company info is entered in Invoices settings first
What is the root cause of that problem?
When we set the company information in the invoice settings first and then proceed to send the invoice, the invoice flow does not prompt for the company information again because it has already been set. However, in the parameters sent when invoicing, companyName and companyWebsite will be undefined, leading to a backend error indicating that the company information is missing.
App/src/libs/actions/IOU.ts
Lines 3744 to 3745 in bfce277
What changes do you think we should make in order to solve the problem?
In the 'send invoice' process, we can also include
policy?.invoice?.companyNameas a fallback in case the user has already set the company name in the policy. We should do the same for the company website here.pseudo code
Note: We can also reverse this logic to prioritize the
companyNameand companyWebsitepassed in, falling back to the values from the policy only if they are not provided.What alternative solutions did you explore? (Optional)
5 remaining items
rezkiy37 commentedon Nov 5, 2024
Hi, I am Michael (Mykhailo) from Callstack, an expert agency and I can work on this issue. Moreover, I am the author of #50571 and consider this as a regression issue.
rezkiy37 commentedon Nov 5, 2024
That looks like a backend bug as well because happens only with newly created workspaces but not with legacy ones. It relates to #51871 since the backend does not set the company name and website values. Also, the failure data is not used due to the server response.
Details
cc @madmax330
melvin-bot commentedon Nov 11, 2024
@madmax330, @MitchExpensify Still overdue 6 days?! Let's take care of this!
madmax330 commentedon Nov 11, 2024
Pr is up
melvin-bot commentedon Nov 19, 2024
@madmax330, @MitchExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
madmax330 commentedon Nov 19, 2024
This should be fixed now, can we double check?
rezkiy37 commentedon Nov 20, 2024
The bug has been fixed. It works properly with legacy and newly created workspaces.
Video
No.bug.mp4
cc @madmax330
madmax330 commentedon Nov 20, 2024
Cool, closing