Transfer Between Accounts
transfer_between_accountsRecord a transfer of funds between capital accounts while preventing P&L distortion and automatically reversing failed transactions to maintain balance consistency.
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. |