Skip to content

Commit

Permalink
Merge pull request #48935 from Expensify/rodrigo-fix-invoice-with-com…
Browse files Browse the repository at this point in the history
…panydetails

Fix creating invoice by enabling hasInvoicingDetails
  • Loading branch information
deetergp authored Sep 10, 2024
2 parents a010f3d + bd89e85 commit 5131bc5
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/libs/actions/Policy/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,11 +226,8 @@ function getPrimaryPolicy(activePolicyID: OnyxEntry<string>, currentUserLogin: s
}

/** Check if the policy has invoicing company details */
// eslint-disable-next-line react/no-unused-prop-types,@typescript-eslint/no-unused-vars
function hasInvoicingDetails(policy: OnyxEntry<Policy>): boolean {
// TODO: uncomment when invoicing details inside a policy are supported.
// return !!policy.invoice.companyName && !!policy.invoice.companyWebsite;
return true;
return !!policy?.invoice?.companyName && !!policy?.invoice?.companyWebsite;
}

/**
Expand Down

0 comments on commit 5131bc5

Please sign in to comment.