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

(cherry picked from commit 5131bc5)

(CP triggered by luacmartins)
  • Loading branch information
deetergp authored and OSBotify committed Sep 10, 2024
1 parent 3fdcab9 commit 4dc7b9a
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 4dc7b9a

Please sign in to comment.