diff --git a/src/app/api/quickbooks/invoice/invoice.service.ts b/src/app/api/quickbooks/invoice/invoice.service.ts index 37eb210f..59530235 100644 --- a/src/app/api/quickbooks/invoice/invoice.service.ts +++ b/src/app/api/quickbooks/invoice/invoice.service.ts @@ -424,7 +424,7 @@ export class InvoiceService extends BaseService { intuitService: IntuitAPI, incomeAccRefVal: string, ): Promise { - const productName = 'Services' + const productName = 'Assembly Service' const tokenService = new TokenService(this.user) const existingProduct = await intuitService.getAnItem(productName) @@ -453,7 +453,7 @@ export class InvoiceService extends BaseService { updatedAt: dayjs().toDate(), } - console.info("Store the 'Assembly fee paid by Client' item ref in DB") + console.info(`Store the ${productName} item ref in DB`) await tokenService.updateQBPortalConnection( updatedPayload, eq(QBPortalConnection.portalId, this.user.workspaceId), diff --git a/src/app/api/quickbooks/webhook/webhook.service.ts b/src/app/api/quickbooks/webhook/webhook.service.ts index bb99d5fe..41e00b42 100644 --- a/src/app/api/quickbooks/webhook/webhook.service.ts +++ b/src/app/api/quickbooks/webhook/webhook.service.ts @@ -90,7 +90,7 @@ export class WebhookService extends BaseService { return await this.handleInvoiceVoided(payload, qbTokenInfo) case WebhookEvents.INVOICE_UPDATED: - await sleep(7000) // invoice.updated event is triggered even when invoice created + await sleep(10000) // invoice.updated event is triggered even when invoice created return await this.handleInvoiceCreated(payload, qbTokenInfo) case WebhookEvents.PAYMENT_SUCCEEDED: diff --git a/src/components/dashboard/Main.tsx b/src/components/dashboard/Main.tsx index f4c78033..67923e74 100644 --- a/src/components/dashboard/Main.tsx +++ b/src/components/dashboard/Main.tsx @@ -28,7 +28,7 @@ const DashboardCallout = (lastSyncTime: string | null) => ({ [CalloutVariant.WARNING]: { title: 'Finalize your integration', description: - "Review your settings and product mappings to finalize the integration. Once you're ready, click the button to enable the sync.", + "Review your settings and service mappings to finalize the integration. Once you're ready, click the button to enable the sync.", actionLabel: 'Enable app', actionIcon: 'Check' as IconType, buttonVariant: 'primary' as const, diff --git a/src/components/dashboard/settings/SettingAccordion.tsx b/src/components/dashboard/settings/SettingAccordion.tsx index 4479eda6..cd482bd3 100644 --- a/src/components/dashboard/settings/SettingAccordion.tsx +++ b/src/components/dashboard/settings/SettingAccordion.tsx @@ -47,7 +47,7 @@ export default function SettingAccordion({ const accordionItems = [ { id: 'product-mapping', - header: 'Product Mapping', + header: 'Service Mapping', content: (
setting.changeSettings( diff --git a/src/components/dashboard/settings/sections/product/ProductMappingTable.tsx b/src/components/dashboard/settings/sections/product/ProductMappingTable.tsx index 941c6c47..51c19eb9 100644 --- a/src/components/dashboard/settings/sections/product/ProductMappingTable.tsx +++ b/src/components/dashboard/settings/sections/product/ProductMappingTable.tsx @@ -93,7 +93,7 @@ export default function ProductMappingTable({ - ASSEMBLY PRODUCTS + ASSEMBLY SERVICES @@ -241,12 +241,12 @@ export default function ProductMappingTable({ ) : ( - Start by creating a product in Assembly. + Start by creating a service in Assembly. - Create Product + Create Service diff --git a/src/utils/intuitAPI.ts b/src/utils/intuitAPI.ts index 2716589e..4a446706 100644 --- a/src/utils/intuitAPI.ts +++ b/src/utils/intuitAPI.ts @@ -392,7 +392,7 @@ export default class IntuitAPI { message: `IntuitAPI#getAllItems | Item query start for realmId: ${this.tokens.intuitRealmId}`, }) const stringColumns = columns.map((column) => `${column}`).join(',') - const customerQuery = `select ${stringColumns} from Item where Type IN ('Service', 'Inventory', 'NonInventory') maxresults ${limit}` // Other items with type "Category" cannot be used in invoice line item. It throws an error. + const customerQuery = `select ${stringColumns} from Item where Type = 'Service' maxresults ${limit}` // Only get service items CustomLogger.info({ obj: { customerQuery }, message: 'IntuitAPI#getAllItems',