Skip to content

feat(quickbooks): add general accounting operations - #6185

Merged
BillLeoutsakosvl346 merged 8 commits into
feat/quickbooks-03-payablesfrom
feat/quickbooks-04-accounting
Aug 3, 2026
Merged

feat(quickbooks): add general accounting operations#6185
BillLeoutsakosvl346 merged 8 commits into
feat/quickbooks-03-payablesfrom
feat/quickbooks-04-accounting

Conversation

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor

Summary

  • Adds a bounded accounting reader for journal entries, deposits, and transfers.
  • Adds explicit create/update tools for journal entries and deposits.
  • Exposes 39 total QuickBooks operations with direct block, tool, and registry parity.
  • Keeps transfers read-only and updates header-only.

Safety and validation

  • Journal entries require explicit posting confirmation and exact balanced integer-cent totals.
  • No arbitrary queries, raw payloads, retries, fan-out, automatic pagination, currency controls, or API routes.
  • 570 accumulated tests pass, plus type-check, format, lint, API validation, bare-icon, client-boundary, tool-metadata, generated-doc, and memory-bound checks.
  • Independent GPT-5.6 Sol high review against the fixed staging comparison found no actionable issues.

Manual acceptance

Live authenticated sandbox execution could not be automated because this environment had no controllable signed-in browser. Request contracts and transformations are covered by sanitized fixtures and the complete local suite.

Stacked on feat/quickbooks-03-payables. Never merge automatically.

@vercel

vercel Bot commented Aug 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview Aug 3, 2026 11:52pm

Request Review

@cursor

cursor Bot commented Aug 2, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
New routes handle user files, external temporary URLs, and live QuickBooks mutations; safeguards (auth, size limits, pinned fetch) are in place but the surface area is security- and data-sensitive.

Overview
Updates the QuickBooks integration docs to match a much larger block: master data now covers class and department, list reads add activeStatus and date/customer/vendor filters, employee create/update actions are documented, and activeStatus on several update actions is described as optional rather than required. Purchasing outputs document richer line and link shapes, and create bill documents optional Purchase Order line linking plus success/warning outputs.

The intro and usage text no longer say reports and attachments are unsupported; they now describe financial reports, transaction email, PDF download, and attachment read/add/download, plus new action sections for accounting transactions (journal entry, deposit), run financial report, and the document flows.

Adds three internal tool API routes with contracts and a large Vitest suite: download transaction PDF (PDF type and %PDF- checks, size limits, execution vs copilot storage), add attachment (note JSON vs authorized multipart file upload to Intuit), and download attachment (short-lived URL fetch via DNS validation and pinned-IP fetch without auth on redirect). All routes use internal auth, abort signals, and sanitized QuickBooks error handling.

Reviewed by Cursor Bugbot for commit f8d0e3f. Bugbot is set up for automated code reviews on this repo. Configure here.

@BillLeoutsakosvl346

Copy link
Copy Markdown
Contributor Author

@greptileai

@greptile-apps

greptile-apps Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds bounded QuickBooks journal-entry, deposit, and transfer reading plus create/update operations for journal entries and deposits.

  • Adds strict journal/deposit line parsing, balanced integer-cent validation, posting confirmation, and sparse header-only updates.
  • Registers five accounting tools and wires them through the QuickBooks block, generated metadata, registry, documentation, and tests.
  • Keeps transfer support read-only and disables automatic retries and pagination.

Confidence Score: 5/5

The PR appears safe to merge from a code-review perspective, with no actionable changed-code defects identified.

The accounting operations use fixed entity mappings, bounded validated inputs, exact journal balancing, explicit posting confirmation, header-only sparse updates, and registry/block parity without a concrete reachable failure remaining.

Important Files Changed

Filename Overview
apps/sim/blocks/blocks/quickbooks.ts Adds accounting operation UI, conditional inputs, parameter coercion, tool access, and output visibility with registry parity.
apps/sim/tools/quickbooks/accounting_utils.ts Implements bounded line parsing, exact journal balancing, posting confirmation, and create/sparse-update payload builders.
apps/sim/tools/quickbooks/read_accounting_transactions.ts Adds fixed list and by-ID reads for journal entries, deposits, and transfers using shared response transformers.
apps/sim/tools/quickbooks/create_journal_entry.ts Adds a non-retrying authenticated journal-entry creation tool with bounded response handling.
apps/sim/tools/quickbooks/create_deposit.ts Adds a non-retrying authenticated deposit creation tool with validated account lines.
apps/sim/tools/quickbooks/update_journal_entry.ts Adds confirmed sparse journal-entry header updates using ID and sync token.
apps/sim/tools/quickbooks/update_deposit.ts Adds sparse deposit header updates using ID and sync token.
apps/sim/tools/quickbooks/accounting.test.ts Covers entity mappings, response transformations, line validation, payload construction, confirmation, sparse updates, and block parity.
apps/sim/tools/quickbooks/types.ts Extends QuickBooks transaction types and output schemas for general-accounting records.
apps/sim/tools/registry.ts Registers all five new accounting tools consistently with block access and barrel exports.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  Block[QuickBooks block] --> Params[Resolve and validate parameters]
  Params --> Reader[Read accounting transactions]
  Params --> Journal[Create or update journal entry]
  Params --> Deposit[Create or update deposit]
  Reader --> Types{Transaction type}
  Types --> JE[JournalEntry]
  Types --> DP[Deposit]
  Types --> TR[Transfer - read only]
  Journal --> QBO[QuickBooks Online API]
  Deposit --> QBO
  JE --> QBO
  DP --> QBO
  TR --> QBO
Loading

Reviews (1): Last reviewed commit: "fix(quickbooks): balance journal entries..." | Re-trigger Greptile

* feat(quickbooks): link bills to purchase order lines

* docs(quickbooks): document observable bill linking

* fix(quickbooks): document purchase order link identifiers

* fix(quickbooks): keep shared line example valid

* chore(quickbooks): sync bill linking catalog

* feat(quickbooks): add accountant-focused financial reports (#6197)

* feat(quickbooks): add verified financial report contracts

* feat(quickbooks): expose reports in block and catalog

* test(quickbooks): cover null report filters

* fix(quickbooks): expose report header time

* chore(quickbooks): sync reports catalog

* feat(quickbooks): add documents and attachments (#6200)

* feat(quickbooks): add document and attachment tools

* feat(quickbooks): add bounded document file routes

* feat(quickbooks): expose document workflows

* fix(quickbooks): enforce attachment upload bounds

* fix(quickbooks): tighten document handling

* fix(quickbooks): align file response limits

* test(quickbooks): cover missing PDF content type

* test(quickbooks): cover attachment MIME fallback

* fix(quickbooks): redact attachment access URLs

* fix(quickbooks): store downloaded documents safely

* fix(quickbooks): stop cancelled attachment downloads

* fix(quickbooks): correct document schemas and upload bytes

* chore(quickbooks): sync document catalog

* feat(quickbooks): add accountant filters (#6208)

* feat(quickbooks): add safe n8n parity tools

* feat(quickbooks): expose accountant parity options

* fix(quickbooks): address parity review findings

* fix(quickbooks): require recipient for payment email

* chore(quickbooks): sync parity catalog

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
@BillLeoutsakosvl346
BillLeoutsakosvl346 merged commit e8ad9a1 into feat/quickbooks-03-payables Aug 3, 2026
3 of 4 checks passed
BillLeoutsakosvl346 added a commit that referenced this pull request Aug 3, 2026
* feat(quickbooks): add safe purchasing and payables tools

* feat(quickbooks): expose purchasing and payables operations

* docs(quickbooks): document purchasing and payables tools

* fix(quickbooks): require current purchase payment type

* fix(quickbooks): allow rounded purchasing line totals

* fix(quickbooks): generate purchasing arrays correctly

* fix(quickbooks): validate bill payment accounts

* fix(quickbooks): validate bill allocations before account lookup

* chore(tools): sync purchasing metadata

* fix(quickbooks): sanitize bill payment faults

* feat(quickbooks): add general accounting operations (#6185)

* feat(quickbooks): add accounting transaction tools

* feat(quickbooks): expose accounting operations

* docs(quickbooks): generate accounting catalog

* fix(quickbooks): preserve accounting amount precision

* fix(quickbooks): balance journal entries in exact cents

* fix(quickbooks): include account in deposit updates

* chore(quickbooks): sync accounting catalog

* feat(quickbooks): add observable PO-to-bill linking (#6194)

* feat(quickbooks): link bills to purchase order lines

* docs(quickbooks): document observable bill linking

* fix(quickbooks): document purchase order link identifiers

* fix(quickbooks): keep shared line example valid

* chore(quickbooks): sync bill linking catalog

* feat(quickbooks): add accountant-focused financial reports (#6197)

* feat(quickbooks): add verified financial report contracts

* feat(quickbooks): expose reports in block and catalog

* test(quickbooks): cover null report filters

* fix(quickbooks): expose report header time

* chore(quickbooks): sync reports catalog

* feat(quickbooks): add documents and attachments (#6200)

* feat(quickbooks): add document and attachment tools

* feat(quickbooks): add bounded document file routes

* feat(quickbooks): expose document workflows

* fix(quickbooks): enforce attachment upload bounds

* fix(quickbooks): tighten document handling

* fix(quickbooks): align file response limits

* test(quickbooks): cover missing PDF content type

* test(quickbooks): cover attachment MIME fallback

* fix(quickbooks): redact attachment access URLs

* fix(quickbooks): store downloaded documents safely

* fix(quickbooks): stop cancelled attachment downloads

* fix(quickbooks): correct document schemas and upload bytes

* chore(quickbooks): sync document catalog

* feat(quickbooks): add accountant filters (#6208)

* feat(quickbooks): add safe n8n parity tools

* feat(quickbooks): expose accountant parity options

* fix(quickbooks): address parity review findings

* fix(quickbooks): require recipient for payment email

* chore(quickbooks): sync parity catalog

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
BillLeoutsakosvl346 added a commit that referenced this pull request Aug 3, 2026
* feat(quickbooks): add bounded sales transaction reads

* feat(quickbooks): add sales and receivables mutations

* feat(quickbooks): expose sales operations in the block

* fix(quickbooks): address independent sales review

* fix(quickbooks): address final integration review

* fix(quickbooks): clarify master data output metadata

* fix(quickbooks): mark sales pagination outputs optional

* fix(quickbooks): validate calculated sales amounts

* fix(quickbooks): generate sales arrays correctly

* fix(quickbooks): align sales metadata conditions

* chore(tools): sync sales metadata

* feat(quickbooks): add purchasing and payables (#6159)

* feat(quickbooks): add safe purchasing and payables tools

* feat(quickbooks): expose purchasing and payables operations

* docs(quickbooks): document purchasing and payables tools

* fix(quickbooks): require current purchase payment type

* fix(quickbooks): allow rounded purchasing line totals

* fix(quickbooks): generate purchasing arrays correctly

* fix(quickbooks): validate bill payment accounts

* fix(quickbooks): validate bill allocations before account lookup

* chore(tools): sync purchasing metadata

* fix(quickbooks): sanitize bill payment faults

* feat(quickbooks): add general accounting operations (#6185)

* feat(quickbooks): add accounting transaction tools

* feat(quickbooks): expose accounting operations

* docs(quickbooks): generate accounting catalog

* fix(quickbooks): preserve accounting amount precision

* fix(quickbooks): balance journal entries in exact cents

* fix(quickbooks): include account in deposit updates

* chore(quickbooks): sync accounting catalog

* feat(quickbooks): add observable PO-to-bill linking (#6194)

* feat(quickbooks): link bills to purchase order lines

* docs(quickbooks): document observable bill linking

* fix(quickbooks): document purchase order link identifiers

* fix(quickbooks): keep shared line example valid

* chore(quickbooks): sync bill linking catalog

* feat(quickbooks): add accountant-focused financial reports (#6197)

* feat(quickbooks): add verified financial report contracts

* feat(quickbooks): expose reports in block and catalog

* test(quickbooks): cover null report filters

* fix(quickbooks): expose report header time

* chore(quickbooks): sync reports catalog

* feat(quickbooks): add documents and attachments (#6200)

* feat(quickbooks): add document and attachment tools

* feat(quickbooks): add bounded document file routes

* feat(quickbooks): expose document workflows

* fix(quickbooks): enforce attachment upload bounds

* fix(quickbooks): tighten document handling

* fix(quickbooks): align file response limits

* test(quickbooks): cover missing PDF content type

* test(quickbooks): cover attachment MIME fallback

* fix(quickbooks): redact attachment access URLs

* fix(quickbooks): store downloaded documents safely

* fix(quickbooks): stop cancelled attachment downloads

* fix(quickbooks): correct document schemas and upload bytes

* chore(quickbooks): sync document catalog

* feat(quickbooks): add accountant filters (#6208)

* feat(quickbooks): add safe n8n parity tools

* feat(quickbooks): expose accountant parity options

* fix(quickbooks): address parity review findings

* fix(quickbooks): require recipient for payment email

* chore(quickbooks): sync parity catalog

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
BillLeoutsakosvl346 added a commit that referenced this pull request Aug 3, 2026
* feat(quickbooks): add master data and CRUD tools

* feat(quickbooks): expose compact master data operations

* docs(quickbooks): document master data actions

* fix(quickbooks): harden master data outputs

* fix(redaction): preserve workflow state tokens

* fix(quickbooks): address integration review findings

* fix(quickbooks): align item updates and generated docs

* fix(quickbooks): sanitize customer tax identifiers

* fix(quickbooks): preserve read-write compatibility

* fix(quickbooks): use action-first operation labels

* test(quickbooks): align operation label expectations

* fix(quickbooks): align catalog operation labels

* fix(redaction): cover namespaced secret fields

* fix(quickbooks): expose master data pagination metadata

* fix(quickbooks): omit null optional values

* fix(quickbooks): validate master data inputs

* chore(tools): sync master data metadata

* fix(redaction): anchor workflow token allowlist

* feat(quickbooks): add sales and accounts receivable (#6130)

* feat(quickbooks): add bounded sales transaction reads

* feat(quickbooks): add sales and receivables mutations

* feat(quickbooks): expose sales operations in the block

* fix(quickbooks): address independent sales review

* fix(quickbooks): address final integration review

* fix(quickbooks): clarify master data output metadata

* fix(quickbooks): mark sales pagination outputs optional

* fix(quickbooks): validate calculated sales amounts

* fix(quickbooks): generate sales arrays correctly

* fix(quickbooks): align sales metadata conditions

* chore(tools): sync sales metadata

* feat(quickbooks): add purchasing and payables (#6159)

* feat(quickbooks): add safe purchasing and payables tools

* feat(quickbooks): expose purchasing and payables operations

* docs(quickbooks): document purchasing and payables tools

* fix(quickbooks): require current purchase payment type

* fix(quickbooks): allow rounded purchasing line totals

* fix(quickbooks): generate purchasing arrays correctly

* fix(quickbooks): validate bill payment accounts

* fix(quickbooks): validate bill allocations before account lookup

* chore(tools): sync purchasing metadata

* fix(quickbooks): sanitize bill payment faults

* feat(quickbooks): add general accounting operations (#6185)

* feat(quickbooks): add accounting transaction tools

* feat(quickbooks): expose accounting operations

* docs(quickbooks): generate accounting catalog

* fix(quickbooks): preserve accounting amount precision

* fix(quickbooks): balance journal entries in exact cents

* fix(quickbooks): include account in deposit updates

* chore(quickbooks): sync accounting catalog

* feat(quickbooks): add observable PO-to-bill linking (#6194)

* feat(quickbooks): link bills to purchase order lines

* docs(quickbooks): document observable bill linking

* fix(quickbooks): document purchase order link identifiers

* fix(quickbooks): keep shared line example valid

* chore(quickbooks): sync bill linking catalog

* feat(quickbooks): add accountant-focused financial reports (#6197)

* feat(quickbooks): add verified financial report contracts

* feat(quickbooks): expose reports in block and catalog

* test(quickbooks): cover null report filters

* fix(quickbooks): expose report header time

* chore(quickbooks): sync reports catalog

* feat(quickbooks): add documents and attachments (#6200)

* feat(quickbooks): add document and attachment tools

* feat(quickbooks): add bounded document file routes

* feat(quickbooks): expose document workflows

* fix(quickbooks): enforce attachment upload bounds

* fix(quickbooks): tighten document handling

* fix(quickbooks): align file response limits

* test(quickbooks): cover missing PDF content type

* test(quickbooks): cover attachment MIME fallback

* fix(quickbooks): redact attachment access URLs

* fix(quickbooks): store downloaded documents safely

* fix(quickbooks): stop cancelled attachment downloads

* fix(quickbooks): correct document schemas and upload bytes

* chore(quickbooks): sync document catalog

* feat(quickbooks): add accountant filters (#6208)

* feat(quickbooks): add safe n8n parity tools

* feat(quickbooks): expose accountant parity options

* fix(quickbooks): address parity review findings

* fix(quickbooks): require recipient for payment email

* chore(quickbooks): sync parity catalog

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>

---------

Co-authored-by: Bill Leoutsakos <billleoutsakos@Bills-MacBook-Pro.local>
Co-authored-by: Bill Leoutsakos <billleoutsakos@Mac.localdomain>
@waleedlatif1
waleedlatif1 deleted the feat/quickbooks-04-accounting branch August 4, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant