Commit Graph

6 Commits

Author SHA1 Message Date
57f41859de [PROJECTS] feat: Add timesheets DDL schema
Add complete projects schema with timesheets support:
- projects.projects table with status, privacy settings
- projects.tasks table with Kanban support
- projects.timesheets table for Odoo-style time tracking
- projects.milestones table for project milestones
- projects.project_stages table for Kanban columns
- projects.project_members table for team management

Includes all necessary indexes and enums for performance.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 04:27:58 -06:00
4b6240311d [TASK-2026-01-20-003] feat: Add financial DDL and matching tables
Financial Schema (50-57):
- 50-financial-schema.sql: Schema + 10 ENUMs
- 51-financial-accounts.sql: account_types, accounts, account_mappings
- 52-financial-journals.sql: fiscal_years, fiscal_periods, journals
- 53-financial-entries.sql: journal_entries, journal_entry_lines
- 54-financial-invoices.sql: invoices, invoice_lines
- 55-financial-payments.sql: payments, payment_invoice_allocations
- 56-financial-taxes.sql: taxes, tax_groups
- 57-financial-bank-reconciliation.sql: bank_statements, bank_statement_lines, rules

Purchases Matching (46):
- 46-purchases-matching.sql: purchase_order_matching, purchase_matching_lines, matching_exceptions

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 03:47:04 -06:00
1ac7d1e60b feat(fiscal): Add fiscal catalogs DDL schema (MGN-005)
- Add fiscal schema with tax catalog tables:
  - tax_categories (IVA, ISR, IEPS, etc.)
  - fiscal_regimes (SAT c_RegimenFiscal)
  - cfdi_uses (SAT c_UsoCFDI)
  - payment_methods (SAT c_FormaPago)
  - payment_types (SAT c_MetodoPago: PUE/PPD)
  - withholding_types (retention types)
- Include seed data for Mexican SAT catalogs
- Support for CFDI 4.0 compliance

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 09:31:36 -06:00
49c64e74a8 feat(catalogs): Add core catalogs DDL and seed data (MGN-005)
DDL (20-core-catalogs.sql):
- Countries, States tables with ISO codes
- Currencies with ISO 4217
- Currency rates with historical tracking
- UoM categories and units with conversion factors
- Product categories hierarchy
- Sequences, Payment terms, Discount rules

Seed data (04-seed-catalogs.sql):
- 33 countries (Americas, Europe, Asia)
- 32 Mexican states with timezones
- 16 currencies (MXN, USD, EUR, etc.)
- Initial exchange rates
- 6 UoM categories with 30+ units

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 08:57:41 -06:00
5043a640e4 refactor: Restructure DDL with numbered schema files
- Replace old DDL structure with new numbered files (01-24)
- Update migrations and seeds for new schema
- Clean up deprecated files

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 00:40:32 -06:00
e4cb9b6db6 Initial commit - erp-core-database 2026-01-04 06:40:22 -06:00