rustledger-booking
Beancount booking engine with 7 lot matching methods and amount interpolation.
Booking Methods
| Method | Description |
|---|---|
STRICT |
Lots must match exactly (default) |
STRICT_WITH_SIZE |
Exact-size matches accept oldest lot |
FIFO |
First in, first out |
LIFO |
Last in, first out |
HIFO |
Highest cost first |
AVERAGE |
Average cost basis |
NONE |
No cost tracking |
Features
- Amount interpolation for incomplete postings
- Cost basis calculation
- Lot matching with configurable strategies
- Transaction balancing
Example
use ;
// Using the booking engine for a single transaction
let mut engine = with_method;
let result = engine.book_and_interpolate?;
// Using the batch function for multiple transactions
use book_transactions;
let results = book_transactions;
for result in results
License
GPL-3.0