Commit graph

4 commits

Author SHA1 Message Date
b97e899983 Update default expense accounts to optimized structure
Reorganizes 22 old expense accounts into 31 new accounts with:
- 6 logical categories (Supplies, Materials, Equipment, Utilities, Maintenance, Services)
- Consistent 3-level hierarchy throughout
- Clear groupings that map to virtual parent permission grants

Matches the structure in castle-ledger.beancount for consistency.

Categories:
- Supplies: consumables bought regularly (7 accounts)
- Materials: construction/building materials (2 accounts)
- Equipment: durable goods that last (3 accounts)
- Utilities: ongoing service bills (5 accounts)
- Maintenance: repairs & upkeep (4 accounts)
- Services: professional services & subscriptions (6 accounts)

Benefits:
- Virtual parents auto-generated for each category
- Permission grants more intuitive and efficient
- No conflicting parent/child account names

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-11 03:09:44 +01:00
33c294de7f Removes parent-only accounts
Removes parent accounts from the database to simplify account management.

Since the application exports to Beancount and doesn't directly interface with it, parent accounts for organizational hierarchy aren't necessary. The hierarchy is implicitly derived from the colon-separated account names.

This change cleans the database and prevents accidental postings to parent accounts. Specifically removes "Assets:Bitcoin" and "Equity" accounts.
2025-11-07 23:24:11 +01:00
88aaf0e28e Updates default chart of accounts
Expands the default chart of accounts with a more
detailed hierarchical structure. This includes new
accounts for fixed assets, livestock, equity
contributions, and detailed expense categories.
The migration script only adds accounts that don't
already exist, ensuring a smooth update process.
2025-11-07 22:37:45 +01:00
1a28ec59eb Completes Phase 1: Beancount patterns adoption
Implements core improvements from Phase 1 of the Beancount patterns adoption:

- Uses Decimal for fiat amounts to prevent floating point errors
- Adds a meta field to journal entries for a full audit trail
- Adds a flag field to journal entries for transaction status
- Migrates existing account names to a hierarchical format

This commit introduces a database migration to add the `flag` and `meta` columns to the `journal_entries` table. It also includes updates to the models, CRUD operations, and API endpoints to handle the new fields.
2025-10-23 00:17:04 +02:00