Skip to content

Commit 127b6ee

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(quickbooks): keep shared line example valid
1 parent 6b6af12 commit 127b6ee

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
@@ -881,6 +881,16 @@ describe('QuickBooks BillPayment account compatibility', () => {
881881
})
882882

883883
describe('QuickBooks purchasing block', () => {
884+
it('keeps the shared purchasing-lines example valid for every supported operation', () => {
885+
const subBlock = QuickBooksBlock.subBlocks.find(
886+
(candidate) => candidate.id === 'purchasingLines'
887+
)
888+
889+
expect(subBlock?.placeholder).not.toContain('purchaseOrderId')
890+
expect(subBlock?.placeholder).not.toContain('purchaseOrderLineId')
891+
expect(subBlock?.wandConfig?.prompt).toContain('For Create Bill only')
892+
})
893+
884894
it('does not force array-valued wand prompts through JSON-object generation', () => {
885895
for (const id of ['purchasingLines', 'billAllocations']) {
886896
const subBlock = QuickBooksBlock.subBlocks.find((candidate) => candidate.id === id)

0 commit comments

Comments
 (0)