Skip to content

Commit 9a635ed

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(quickbooks): keep shared line example valid
1 parent f2a916c commit 9a635ed

2 files changed

Lines changed: 11 additions & 2 deletions

File tree

apps/sim/blocks/blocks/quickbooks.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -743,8 +743,7 @@ export const QuickBooksBlock: BlockConfig<QuickBooksResponse> = {
743743
title: 'Expense Lines (JSON)',
744744
type: 'code',
745745
language: 'json',
746-
placeholder:
747-
'[{"lineType":"account","amount":100,"accountId":"7","description":"Supplies","purchaseOrderId":"123","purchaseOrderLineId":"1"}]',
746+
placeholder: '[{"lineType":"account","amount":100,"accountId":"7","description":"Supplies"}]',
748747
condition: {
749748
field: 'operation',
750749
value: [

apps/sim/tools/quickbooks/purchasing.test.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -833,6 +833,16 @@ describe('QuickBooks BillPayment account compatibility', () => {
833833
})
834834

835835
describe('QuickBooks purchasing block', () => {
836+
it('keeps the shared purchasing-lines example valid for every supported operation', () => {
837+
const subBlock = QuickBooksBlock.subBlocks.find(
838+
(candidate) => candidate.id === 'purchasingLines'
839+
)
840+
841+
expect(subBlock?.placeholder).not.toContain('purchaseOrderId')
842+
expect(subBlock?.placeholder).not.toContain('purchaseOrderLineId')
843+
expect(subBlock?.wandConfig?.prompt).toContain('For Create Bill only')
844+
})
845+
836846
it('does not force array-valued wand prompts through JSON-object generation', () => {
837847
for (const id of ['purchasingLines', 'billAllocations']) {
838848
const subBlock = QuickBooksBlock.subBlocks.find((candidate) => candidate.id === id)

0 commit comments

Comments
 (0)