qb_add_transaction
Add a transaction (Check, Deposit, Credit Card Charge, or Credit Card Credit) to QuickBooks Desktop with automatic undo logging for easy reversion.
Instructions
Adds a transaction (Check, Deposit, CreditCardCharge, or CreditCardCredit). lines: [{"account": str, "amount": float, "memo": str|None}, ...]. Automatically logs an undo entry -- every add can be reverted with qb_revert_run using the returned run_id.
Pass expected_company_file (from a prior qb_company_info call) to have this refuse to run if a different file is open than you expect.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lines | Yes | ||
| payee | No | ||
| refnum | No | ||
| account | Yes | ||
| txn_date | Yes | ||
| txn_type | Yes | ||
| header_memo | No | ||
| expected_company_file | No |