Commit Graph

7 Commits

Author SHA1 Message Date
Adrian Flores Cortes
23ee6ce90e feat(services): Add core transport services
- ViajesService: Trip management with state machine, dispatch, delivery
- UnidadesService: Fleet units management, availability, maintenance alerts
- OperadoresService: Operators management, license tracking
- TrackingService: GPS events, geofences, position history
- OrdenesTransporteService: Transport orders with workflow

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:24:27 -06:00
Adrian Flores Cortes
2120d6e8b0 feat(carta-porte): Add CFDI Carta Porte 3.1 compliance entities
- CartaPorte: Main CFDI entity with emisor/receptor, totals, XML/PDF
- UbicacionCartaPorte: Origin/destination locations with SAT codes
- MercanciaCartaPorte: Goods being transported with hazmat support
- FiguraTransporte: Operator/owner/lessor figures
- AutotransporteCartaPorte: Vehicle configuration and trailers
- HosLog: Hours of Service compliance (NOM-087)
- InspeccionPreViaje: Pre-trip inspection checklists

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:19:21 -06:00
Adrian Flores Cortes
2722920e12 feat: Add combustible-gastos and tarifas-transporte entities
New entities for combustible-gastos module:
- anticipo-viatico.entity.ts
- carga-combustible.entity.ts
- control-rendimiento.entity.ts
- cruce-peaje.entity.ts
- gasto-viaje.entity.ts

New entities for tarifas-transporte module:
- factura-transporte.entity.ts
- fuel-surcharge.entity.ts
- lane.entity.ts
- linea-factura.entity.ts
- recargo-catalogo.entity.ts
- tarifa.entity.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:15:26 -06:00
Adrian Flores Cortes
99d18bb340 feat(entities): Complete viajes entities and adapt inventory/financial
- Add Viaje entity with transport-specific workflow states
- Add ParadaViaje entity for multi-stop support
- Add Pod entity for Proof of Delivery
- Adapt inventory/product.entity with TipoRefaccion for fleet parts
- Adapt financial/account.entity with TipoCuentaTransporte and TipoCentroCosto
- Update index exports for all modified modules

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 10:38:08 -06:00
Adrian Flores Cortes
3cc989cf30 feat: Add transport-specific entities and adapt modules
Adapted modules (Phase 1):
- partners: Added TipoPartnerTransporte, UbicacionFrecuente, RequisitoSeguridad
- partners: Added codigoSct, permisoSct, ubicacionesFrecuentes, requisitosSeguridad

New entities (Phase 2-3):
- gestion-flota: Unidad, Operador with TipoUnidad, EstadoUnidad enums
- ordenes-transporte: OrdenTransporte with EstadoOrden, TipoCarga, ModalidadServicio
- tracking: EventoTracking, Geocerca with TipoEvento, FuenteEvento, TipoGeocerca

All entities include:
- Multi-tenancy (tenant_id)
- Full audit columns (created_at/by, updated_at/by)
- Proper indexes for common queries

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 10:26:03 -06:00
Adrian Flores Cortes
95c6b58449 feat: Add base modules from erp-core following SIMCO-REUSE directive
Phase 0 - Base modules (100% copy):
- shared/ (errors, middleware, services, utils, types)
- auth, users, tenants (multi-tenancy)
- ai, audit, notifications, mcp, payment-terminals
- billing-usage, branches, companies, core

Phase 1 - Modules to adapt (70-95%):
- partners (for shippers/consignees)
- inventory (for refacciones)
- financial (for transport costing)

Phase 2 - Pattern modules (50-70%):
- ordenes-transporte (from sales)
- gestion-flota (from products)
- viajes (from projects)

Phase 3 - New transport-specific modules:
- tracking (GPS, events, alerts)
- tarifas-transporte (pricing, surcharges)
- combustible-gastos (fuel, tolls, expenses)
- carta-porte (CFDI complement 3.1)

Estimated token savings: ~65% (~10,675 lines)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 10:10:19 -06:00
Adrian Flores Cortes
2f76d541d2 feat: Initial backend structure for ERP Transportistas
- NestJS 10.x configuration
- TypeScript setup with path aliases
- Environment configuration template
- Integration config for GPS, PAC, Maps

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 09:51:22 -06:00