formatDateForSat now uses Intl.DateTimeFormat with America/Mexico_City
timezone instead of UTC local time. Fixes 'Fecha final invalida' errors
when server runs in UTC and SAT interprets dates as Mexico local time.
syncTenant now handles despacho mode by:
1. Querying fiel_contribuyente for active FIELs in the tenant DB
2. Running startSync per-contribuyente with contribuyenteId
3. Keeping legacy mode (tenant-wide sync) for Horux 360 tenants
hasFielConfigured() now checks both:
1. Legacy mode: fiel_credentials in central DB (Horux 360)
2. Despacho mode: fiel_contribuyente in tenant DB
This fixes the SAT daily sync omitting despacho tenants that have
FIEL loaded per-contribuyente but not in the central fiel_credentials table.
- Daily sync already covers all active tenants with FIEL (no plan filter)
- Incremental sync now runs for all plans EXCEPT:
- 'custom'
- 'mi_empresa'
- 'mi_empresa_plus'
- Renamed getEnterpriseTenantsWithFiel -> getIncrementalTenantsWithFiel
- Updated logs to reflect new eligibility
- Add Conceptos tab in CFDI page with column filters, sorting, pagination
- Add GET /cfdi/conceptos endpoint with filters and orderBy
- Backfill cfdi_conceptos from legacy XMLs (824k concepts inserted)
- Fix CFDI delete button (bypass subscription check, add alerts)
- Fix export to Excel (fetch all filtered results, limit 10k)
- Fix facturacion page concepto delete bug (immutable updates, unique ids)
- Add Facturapi live key auto-generation and caching
- Fix SAT fechaPagoP parsing
- Add metrics cache support for current year
- Increase DB pool max to 15
- login(): check platformRoles before membership validation; fallback to first active tenant for superset admins
- refreshTokens(): allow refresh for superset admins even without memberships
- tenantMiddleware: skip tenantPool resolution when tenantId is empty for superset admins
- Add metabase.service.ts for automatic DB registration
- Hook createTenant, addTenantToOwner and deleteTenant to sync with Metabase
- Keep all existing features from latest version