Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/app/api/quickbooks/invoice/invoice.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ export class InvoiceService extends BaseService {
intuitService: IntuitAPI,
incomeAccRefVal: string,
): Promise<string> {
const productName = 'Services'
const productName = 'Assembly Service'
const tokenService = new TokenService(this.user)

const existingProduct = await intuitService.getAnItem(productName)
Expand Down Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion src/app/api/quickbooks/webhook/webhook.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion src/components/dashboard/Main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion src/components/dashboard/settings/SettingAccordion.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export default function SettingAccordion({
const accordionItems = [
{
id: 'product-mapping',
header: 'Product Mapping',
header: 'Service Mapping',
content: (
<ProductMapping
openDropdowns={openDropdowns}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export default function ProductMapping({
<div className="mt-2 mb-6">
<div className="mb-5">
<Checkbox
label="Sync Assembly products to QuickBooks"
description="Automatically create and update QuickBooks items when products are created or updated in Assembly."
label="Sync Assembly services to QuickBooks"
description="Automatically create and update QuickBooks items when services are created or updated in Assembly."
checked={setting.settingState.createNewProductFlag}
onChange={() =>
setting.changeSettings(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export default function ProductMappingTable({
<thead>
<tr className="border-b border-gray-200">
<th className="pt-5 pr-3 pl-4 pb-2 text-[11px] uppercase font-normal tracking-[1px] leading-3 w-[46.5%] lg:w-[372px]">
ASSEMBLY PRODUCTS
ASSEMBLY SERVICES
</th>

<th className="pt-4 px-5 pb-2 border-l border-gray-200 w-[7%] lg:w-[56px] text-center">
Expand Down Expand Up @@ -241,12 +241,12 @@ export default function ProductMappingTable({
) : (
<tr className="text-center">
<td colSpan={3} className="py-11">
Start by creating a product in Assembly.
Start by creating a service in Assembly.
<span
onClick={handleCopilotProductCreate}
className="ms-2 text-blue-300 cursor-pointer"
>
Create Product
Create Service
</span>
</td>
</tr>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/intuitAPI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading