Expand description
Beancount booking engine with interpolation.
This crate provides:
- Transaction interpolation (filling in missing amounts)
- Transaction balancing verification
- Tolerance calculation
§Interpolation
When a transaction has exactly one posting per currency without an amount, that amount can be calculated to make the transaction balance.
ⓘ
use rustledger_booking::interpolate;
// Transaction with one missing amount
// 2024-01-15 * "Groceries"
// Expenses:Food 50.00 USD
// Assets:Cash <- amount inferred as -50.00 USDStructs§
- Booked
Transaction - Result of booking a single transaction.
- Booking
Engine - Booking engine that tracks inventory across transactions.
- Capital
Gain - A capital gain or loss from a lot sale.
- Interpolation
Result - Result of interpolation.
- PadError
- Error during pad processing.
- PadResult
- Result of processing pad directives.
Enums§
- Booking
Error - Errors that can occur during booking.
- Interpolation
Error - Errors that can occur during interpolation.
Functions§
- book_
transactions - Book and interpolate a list of transactions.
- calculate_
residual - Calculate the residual (imbalance) of a transaction.
- calculate_
residual_ precise - Calculate the residual of a transaction using arbitrary-precision arithmetic.
- calculate_
tolerance - Calculate the tolerance for a set of amounts.
- expand_
pads - Expand a ledger by replacing pad directives with synthetic transactions.
- interpolate
- Interpolate missing amounts in a transaction.
- is_
balanced - Check if a transaction is balanced within tolerance.
- merge_
with_ padding - Merge original directives with padding transactions, maintaining date order.
- normalize_
prices - Normalize total prices (
@@) to per-unit prices (@) on a transaction. - process_
pads - Process pad directives and generate synthetic transactions.