-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Handle the error with journal entry when tax is enabled #41520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d5812cf
d04a7a0
0453720
a2eae45
1ae5a20
85a8447
0276320
0f13f6c
f0cf4ef
1e17771
df6a3dd
cfa0aa1
09a2bb1
c1f4c3c
38f7484
54dbdf5
bbaf3b7
ccd10b0
0baa214
1861a11
b44b907
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,7 +19,9 @@ function QuickbooksTaxesPage({policy}: WithPolicyProps) { | |
| const {translate} = useLocalize(); | ||
| const styles = useThemeStyles(); | ||
| const policyID = policy?.id ?? ''; | ||
| const {syncTax, pendingFields} = policy?.connections?.quickbooksOnline?.config ?? {}; | ||
| const {syncTax, pendingFields, reimbursableExpensesExportDestination} = policy?.connections?.quickbooksOnline?.config ?? {}; | ||
| const isJournalExportEntity = reimbursableExpensesExportDestination === CONST.QUICKBOOKS_REIMBURSABLE_ACCOUNT_TYPE.JOURNAL_ENTRY; | ||
|
|
||
| return ( | ||
| <AccessOrNotFoundWrapper | ||
| accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN]} | ||
|
|
@@ -44,10 +46,12 @@ function QuickbooksTaxesPage({policy}: WithPolicyProps) { | |
| accessibilityLabel={translate('workspace.accounting.taxes')} | ||
| isOn={!!syncTax} | ||
| onToggle={() => Connections.updatePolicyConnectionConfig(policyID, CONST.POLICY.CONNECTIONS.NAME.QBO, CONST.QUICK_BOOKS_CONFIG.SYNC_TAX, !syncTax)} | ||
| disabled={!syncTax && isJournalExportEntity} | ||
| /> | ||
| </View> | ||
| </OfflineWithFeedback> | ||
| </View> | ||
| {isJournalExportEntity && <Text style={[styles.mutedNormalTextLabel, styles.pt2]}>{translate('workspace.qbo.taxesJournalEntrySwitchNote')}</Text>} | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The hint text does not seem right for the above-mentioned scenario i.e. when the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Yes I agree. @teneeto, could you remind me if we have an error message on the frontend side for the rare case of Journal Entry is selected while the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Checked the code, and we display this error message when the above misconfiguration happens here. Should we do the same for the Tax toggle, too on the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @teneeto, or do we already have an error message for the above case, too?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let me confirm
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Please see the comment below 😄
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Thank you for reminding where the UI copy came from. I agree with @rojiphil on the following point:
I think we should have the same condition as what @rojiphil suggested ->
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it's rare case anyway, so I gonna address this change when I make a backend change to handle errors on the backend side 👍 |
||
| </ScrollView> | ||
| </ScreenWrapper> | ||
| </AccessOrNotFoundWrapper> | ||
|
|
||

Uh oh!
There was an error while loading. Please reload this page.