Skip to content

Invoices - Unable to send invoice if the company info is entered in Invoices settings first #51872

Closed

Description

@lanitochka17

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


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

Action Performed:

  1. Go to staging.new.expensify.com
  2. Create a new workspace
  3. Go to workspace settings > More features
  4. Enable Invoices
  5. Go to Invoices
  6. Add the following information:
    Company name - Expensify
    Company address - https://staging.new.expensify.com/
  7. Go to FAB > Send invoice
  8. Send an invoice from the workspace created in Step 2
  9. Note that error is shown and the invoice cannot be sent
  10. Create another workspace
  11. Go to workspace settings and enable Invoices in More features
  12. Go to FAB > Send invoice
  13. 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 evidence
Bug6652264_1730464671206.20241101_202835.mp4

View all open jobs on GitHub

Activity

  1. added
    DeployBlockerCash
    Daily
    Bug
    on Nov 1, 2024
  2. github-actions commented on Nov 1, 2024

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  3. melvin-bot commented on Nov 1, 2024

    @melvin-bot

    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.

  4. melvin-bot commented on Nov 1, 2024

    @melvin-bot

    Triggered auto assignment to @danieldoglas (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  5. melvin-bot commented on Nov 1, 2024

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  6. Nodebrute commented on Nov 1, 2024

    @Nodebrute
    Contributor

    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

    companyName,
    companyWebsite,

    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.

    pseudo code

            companyName: policy?.invoice?.companyName ?? companyName,
            companyWebsite: policy?.invoice?.companyWebsite ?? companyWebsite,
    

    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)

  7. 5 remaining items

  8. rezkiy37 commented on Nov 5, 2024

    @rezkiy37
    Contributor

    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.

  9. rezkiy37 commented on Nov 5, 2024

    @rezkiy37
    Contributor

    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

    Screenshot 2024-11-05 at 13 06 03 Screenshot 2024-11-05 at 13 06 23

    cc @madmax330

  10. melvin-bot commented on Nov 11, 2024

    @melvin-bot

    @madmax330, @MitchExpensify Still overdue 6 days?! Let's take care of this!

  11. madmax330 commented on Nov 11, 2024

    @madmax330
    Contributor

    Pr is up

  12. added
    Reviewing
    on Nov 11, 2024
  13. melvin-bot commented on Nov 19, 2024

    @melvin-bot

    @madmax330, @MitchExpensify Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  14. madmax330 commented on Nov 19, 2024

    @madmax330
    Contributor

    This should be fixed now, can we double check?

  15. rezkiy37 commented on Nov 20, 2024

    @rezkiy37
    Contributor

    The bug has been fixed. It works properly with legacy and newly created workspaces.

    Video

    No.bug.mp4

    cc @madmax330

  16. madmax330 commented on Nov 20, 2024

    @madmax330
    Contributor

    Cool, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugDailyEngineeringReviewing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions