Transfer Between Accounts
transfer_between_accountsMove funds between capital accounts while keeping profit-and-loss reports accurate. Automatically reverses failed transfers to maintain consistent balances.
Instructions
Record a transfer of funds between two capital accounts. Both legs are marked exclude_from_reports=true so they don't skew P&L. If the inflow leg fails after the outflow succeeds, the outflow is automatically reversed to keep account balances consistent. For full atomicity, a future migration will wrap both legs in a single DB transaction.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Transfer date in YYYY-MM-DD format. | |
| amount | Yes | Amount to transfer (positive number). | |
| category_id | Yes | Category to assign (typically a 'Transfer' income/expense category). | |
| description | Yes | Description of the transfer. | |
| to_account_id | Yes | Account to transfer to. | |
| from_account_id | Yes | Account to transfer from. |