Skip to content

Commit afdc799

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
fix(quickbooks): keep shared line example valid
1 parent 0b0bedd commit afdc799

3 files changed

Lines changed: 12 additions & 3 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/generated/tool-metadata.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

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

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

806806
describe('QuickBooks purchasing block', () => {
807+
it('keeps the shared purchasing-lines example valid for every supported operation', () => {
808+
const subBlock = QuickBooksBlock.subBlocks.find(
809+
(candidate) => candidate.id === 'purchasingLines'
810+
)
811+
812+
expect(subBlock?.placeholder).not.toContain('purchaseOrderId')
813+
expect(subBlock?.placeholder).not.toContain('purchaseOrderLineId')
814+
expect(subBlock?.wandConfig?.prompt).toContain('For Create Bill only')
815+
})
816+
807817
it('does not force array-valued wand prompts through JSON-object generation', () => {
808818
for (const id of ['purchasingLines', 'billAllocations']) {
809819
const subBlock = QuickBooksBlock.subBlocks.find((candidate) => candidate.id === id)

0 commit comments

Comments
 (0)