Migrates balance calculation and inventory tracking to Fava/Beancount, leveraging Fava's query API for all accounting calculations. This simplifies the core module and centralizes accounting logic in Fava.
25 lines
739 B
Python
25 lines
739 B
Python
"""
|
|
Castle Core Module - Pure accounting logic separated from database operations.
|
|
|
|
This module contains the core business logic for double-entry accounting,
|
|
following Beancount patterns for clean architecture:
|
|
|
|
- validation.py: Comprehensive validation rules
|
|
|
|
Benefits:
|
|
- Testable without database
|
|
- Reusable across different storage backends
|
|
- Clear separation of concerns
|
|
- Easier to audit and verify
|
|
|
|
Note: Balance calculation and inventory tracking have been migrated to Fava/Beancount.
|
|
All accounting calculations are now performed via Fava's query API.
|
|
"""
|
|
|
|
from .validation import ValidationError, validate_journal_entry, validate_balance
|
|
|
|
__all__ = [
|
|
"ValidationError",
|
|
"validate_journal_entry",
|
|
"validate_balance",
|
|
]
|