Open yuwenmemon opened 4 weeks ago
Current assignee @shubham1206agra is eligible for the External assigner, not assigning anyone new.
Triggered auto assignment to @laurenreidexpensify (NewFeature
), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.
Sample NetSuite connection data JSON: sampleNetSuiteJSON.json
This would go under connections.netsuite
in your policy object in Onyx, just like for quickbooksOnline
Triggered auto assignment to @dylanexpensify (NewFeature
), see https://stackoverflowteams.com/c/expensify/questions/14418#:~:text=BugZero%20process%20steps%20for%20feature%20requests for more details. Please add this Feature request to a GH project, as outlined in the SO.
@dylanexpensify adding you as the BZ here for payments etc while I'm on parental leave. Thanks
Hey 👋 Please check my comment here. tl;dr Navigation is connected to the wrong integration
cc @yuwenmemon @shubham1206agra on above
@dylanexpensify This was fixed in another PR.
Tracking Issue: https://github.com/Expensify/Expensify/issues/377671
Design Doc Section: https://docs.google.com/document/d/1WubNv_VAv78IxG4FKsi9aS0pWESfWvUYbqBAAy5b4bc/edit#heading=h.1vf74ijo8qpn
(High-Level Section)
Routes
Route:
/settings/workspaces/{policyID}/accounting/netsuite/export
NetSuiteExportConfigurationPage
UpdateNetSuiteAllowForeignCurrency
enabled
-TRUE
/FALSE
, depending on the toggleconfig.allowForeignCurrency
policy.pendingFields.allowForeignCurrency
UpdateNetSuiteExportToNextOpenPeriod
enabled
-TRUE
/FALSE
, depending on the toggleconfig.exportToNextOpenPeriod
policy.pendingFields.exportToNextOpenPeriod
Route:
/settings/workspaces/{policyID}/accounting/netsuite/export/preferred-exporter/select
NetSuitePreferredExporterSelectPage
UpdateNetSuiteExporter
email
- one of the policy’s admins emailconfig.exporter
policy.pendingFields.exporter
Route:
/settings/workspaces/{policyID}/accounting/netsuite/export/purchase-bill-date/select
NetSuiteDateSelectPage
UpdateNetSuiteExportDate
value
- one of the values inDateTypeEnum
(SUBMITTED
,EXPORTED
,LAST_EXPENSE
)config.exportDate
policy.pendingFields.exportDate
Note - For the following routes, we're defining a dynamic parameter in route:
{expenseType}
which will be either reimbursable or non-reimbursableRoute:
/settings/workspaces/{policyID}/accounting/netsuite/export/expenses/{expenseType}
NetSuiteExportExpensesPage
Route:
/settings/workspaces/{policyID}/accounting/netsuite/export/expenses/{expenseType}/destination/select
NetSuiteExportExpensesDestinationSelectPage
UpdateNetSuiteReimbursableExpensesExportDestination
(reimbursable)UpdateNetSuiteNonreimbursableExpensesExportDestination
(non-reimbursable)value
- one of the values inDestinationTypeEnum
(EXPENSE_REPORT
,VENDOR_BILL
,JOURNAL_ENTRY
)config.reimbursableExpensesExportDestination
(reimbursable) /config.nonreimbursableExpensesExportDestination
(non-reimbursable)policy.pendingFields.reimbursableExpensesExportDestination
(reimbursable) /policy.pendingFields.nonreimbursableExpensesExportDestination
(non-reimbursable)Route:
/settings/workspaces/{policyID}/accounting/netsuite/export/expenses/{expenseType}/vendor/select
NetSuiteExportExpensesVendorSelectPage
UpdateNetSuiteDefaultVendor
vendorID
- one of the vendors available (present underdata.vendors
)config.defaultVendor
policy.pendingFields.defaultVendor
Route:
/settings/workspaces/{policyID}/accounting/netsuite/export/expenses/{expenseType}/payable-account/select
NetSuiteExportExpensesPayableAccountSelectPage
UpdateNetSuiteReimbursablePayableAccount
(reimbursable) /UpdateNetSuitePayableAcct
(non-reimbursable)bankAccountID
- one of the payable accounts available (present underdata.payableList
)config.reimbursablePayableAccount
(reimbursable) /config.payableAcct
(non-reimbursable)policy.pendingFields.reimbursablePayableAccount
(reimbursable) /policy.pendingFields.payableAcct
(non-reimbursable)Route:
/settings/workspaces/{policyID}/accounting/netsuite/export/expenses/{expenseType}/journal-posting-preference/select
NetSuiteExportExpensesJournalPostingPreferenceSelectPage
UpdateNetSuiteJournalPostingPreference
value
- one of the values inJournalPostingPreferenceTypeEnum
(JOURNALS_POSTING_INDIVIDUAL_LINE
,JOURNALS_POSTING_TOTAL_LINE
)config.journalPostingPreference
policy.pendingFields.journalPostingPreference
Route:
/settings/workspaces/{policyID}/accounting/netsuite/export/receivable-account/select
NetSuiteReceivableAccountSelectPage
UpdateNetSuiteReceivableAccount
bankAccountID
- one of the receivable accounts available (present underdata.receivableList
)config.receivableAccount
policy.pendingFields.receivableAccount
Route:
/settings/workspaces/{policyID}/accounting/netsuite/export/invoice-item-preference/select
NetSuiteInvoiceItemPreferenceSelectPage
UpdateNetSuiteInvoiceItemPreference
value
- one of the values inInvoiceItemPreferenceTypeEnum
(create
,select
)config.invoiceItemPreference
policy.pendingFields.invoiceItemPreference
Route:
/settings/workspaces/{policyID}/accounting/netsuite/export/invoice-item-preference/invoice-item/select
NetSuiteInvoiceItemSelectPage
UpdateNetSuiteInvoiceItem
itemID
- one of the invoice items available (present underdata.items
)config.invoiceItem
policy.pendingFields.invoiceItem
Route:
/settings/workspaces/{policyID}/accounting/netsuite/export/tax-posting-account/select
NetSuiteTaxPostingAccountSelectPage
UpdateNetSuiteTaxPostingAccount
bankAccountID
- one of the tax accounts available (present underdata.taxAccountsList
)config.taxPostingAccount
policy.pendingFields.taxPostingAccount
Route:
/settings/workspaces/{policyID}/accounting/netsuite/export/tax-posting-account/select
NetSuiteProvicincialTaxPostingAccountSelectPage
UpdateNetSuiteProvicincialTaxPostingAccount
bankAccountID
- one of the tax accounts available (present underdata.taxAccountsList
)config.provicincialTaxPostingAccount
policy.pendingFields.provicincialTaxPostingAccount
Refer to here and here in order to get the corresponding routes and parameters. We'll discuss the Export and Advanced Sections together, as these are very similar in design.
The set of pages needed for the export configurations is similar to that for the import configurations.
The first part “UI Components” explains the UI components and their arrangement on the pages. The second part, “Data Retrieval,” discusses how data or options displayed on the pages are fetched or retrieved.
UI Components
We need two types of pages for configuring export/advanced settings. The first type of page displays menu items, each representing a setting that can be configured. When clicked or pressed, it navigates to a configuration detail page. This is the second type of page. On the configuration detail page, the user can edit the chosen configuration.
Menu Items Page
Configuration Detail Page
This section UI Components will be divided into two subsections: Menu Items Page, explaining the first type of screen, and Configuration Detail Page, explaining the second.
Menu Items Pages
NetSuiteExportConfigurationPage
NetSuiteExportExpensesPage
We’ll reuse the
ConnectionLayout
component to display menu items. You can find an example of its implementation here.Configuration Detail Page
The other page type is the Configuration Detail pages. On a Configuration Detail page, users can alter a configuration by selecting from various options or toggling a specific item.
When an option item is selected, a function corresponding to the Selector Page from policy.ts should be invoked to update the connection configuration data. For more information about the API, please refer to the “Saving Connection Settings” section.
We’ll reuse the SelectionScreen component to render the option list. You can find an example of its implementation here.
Data Retrieval
On all pages related to export configuration, we need access to the current configuration. This information is stored in Onyx as part of the policy object, all pages need to subscribe to it.
The Menu Items pages display the preset list of items. Each item of the list is a pair of the configuration item (ex. Preferred exporter) and the current configuration value for the item (ex. The email of the admin who is used as the preferred exporter). The items are static and the values are simply read from the policy object that is provided by Onyx subscription.
For Configuration Detail Pages, we will subdivide the pages into 2 categories:
Static Options Pages display a preset list of options, i.e., they do not depend on the current data stored in the policy. In this category of pages, the policy data will only be used to determine the currently selected option (initiallyFocusedOptionKey). The pages that fall under this category are -
Dynamic Options Pages are the pages where we show a list of options dynamically, i.e., they depend on current data stored in the policy. In this category of pages, the policy data will be used to determine the set of options being shown to the user and the currently selected option (initiallyFocusedOptionKey). The pages which fall under this category are:
Issue Owner
Current Issue Owner: @