Skip to content

Commit

Permalink
Merge pull request #47819 from rushatgabhane/default-tax-code
Browse files Browse the repository at this point in the history
  • Loading branch information
cead22 authored Aug 23, 2024
2 parents be85ff3 + a533ffb commit cf81760
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libs/actions/TaxRate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,7 @@ function setPolicyTaxCode(policyID: string, oldTaxCode: string, newTaxCode: stri
key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
value: {
taxRates: {
defaultExternalID: oldTaxCode === policy?.taxRates?.defaultExternalID ? newTaxCode : policy?.taxRates?.defaultExternalID,
taxes: {
[oldTaxCode]: null,
[newTaxCode]: {
Expand All @@ -513,6 +514,7 @@ function setPolicyTaxCode(policyID: string, oldTaxCode: string, newTaxCode: stri
key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
value: {
taxRates: {
defaultExternalID: oldTaxCode === policy?.taxRates?.defaultExternalID ? newTaxCode : policy?.taxRates?.defaultExternalID,
taxes: {
[oldTaxCode]: null,
[newTaxCode]: {
Expand All @@ -533,6 +535,7 @@ function setPolicyTaxCode(policyID: string, oldTaxCode: string, newTaxCode: stri
key: `${ONYXKEYS.COLLECTION.POLICY}${policyID}`,
value: {
taxRates: {
defaultExternalID: policy?.taxRates?.defaultExternalID,
taxes: {
[newTaxCode]: null,
[oldTaxCode]: {
Expand Down

0 comments on commit cf81760

Please sign in to comment.