Commit Graph

3 Commits

Author SHA1 Message Date
Adrian Flores Cortes
f74f713482 [MMD-010] feat: Add FiadosService module for customer credit management
- Create fiados module with 3 entities:
  - CustomerCreditAccount: Credit accounts per customer
  - Fiado: Individual credit sales (fiados)
  - FiadoPayment: Payment/abono tracking
- Implement FiadosService with full business logic:
  - Credit eligibility checking
  - Fiado creation with automatic due dates
  - Payment registration with FIFO allocation
  - Overdue tracking and account freezing
- Connect FiadosToolsService to real FiadosService
- Update MCP module registration

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 08:22:28 -06:00
Adrian Flores Cortes
e26ab24aa5 feat: Connect MCP tools to real services
Analytics Module:
- Created AnalyticsService with sales/financial reporting
- Supports sales summary, reports, top products/customers, KPIs
- Uses analytics schema and service_management tables

MCP Tools Connected:
- products-tools → PartService (real inventory data)
- sales-tools → AnalyticsService (real sales analytics)
- financial-tools → AnalyticsService (real P&L and KPIs)

Updated tool registry to pass DataSource to connected tools.

MCP Tools Status:
- orders-tools: Connected to ServiceOrderService
- inventory-tools: Connected to PartService
- customers-tools: Connected to CustomersService
- products-tools: Connected to PartService (NEW)
- sales-tools: Connected to AnalyticsService (NEW)
- financial-tools: Connected to AnalyticsService (NEW)
- fiados-tools: Mock (needs FiadosService)
- branch-tools: Mock (single tenant)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 07:56:10 -06:00
Adrian Flores Cortes
5c7134cc03 [PROP-CORE-004] feat: Add Phase 6 modules from erp-core
Propagated modules:
- payment-terminals: MercadoPago + Clip TPV
- ai: Role-based AI access (ADMIN, JEFE_TALLER, MECANICO, CLIENTE)
- mcp: 18 ERP tools for AI assistants

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 02:45:37 -06:00