Commit Graph

8 Commits

Author SHA1 Message Date
Adrian Flores Cortes
7f32ee65b6 [ST-P2-001] feat: Add DTOs for Construction, Finance, and HSE modules
- Construction: 6 DTOs (create/update/response proyecto, fraccionamiento)
- Finance: 5 DTOs (create/update/response bank-account, accounting-entry)
- HSE: 7 DTOs (incidente, capacitacion, permiso-trabajo, epp-asignacion)

All DTOs use class-validator for validation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 07:38:54 -06:00
Adrian Flores Cortes
bd6dd271c2 [TS-FIX] fix: Fix TypeScript errors in finance services
- Fix entity property mismatches in ar.service.ts (customerId vs partnerId, balance vs balanceAmount)
- Fix entity property mismatches in ap.service.ts (supplierId vs partnerId, balance vs balanceAmount)
- Fix entity property mismatches in cash-flow.service.ts
- Fix entity property mismatches in erp-integration.service.ts (currency, sapCode, description)
- Fix unused imports and dataSource declarations in all finance services
- Error count: 410 -> 346

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:34:49 -06:00
Adrian Flores Cortes
cf23727b2b refactor: Clean up finance services (AP, AR, cash-flow, bank-reconciliation)
- Cleaned up ap.service.ts
- Refactored ar.service.ts
- Minor fixes in bank-reconciliation.service.ts
- Updated cash-flow.service.ts
- Cleaned erp-integration.service.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:31:51 -06:00
Adrian Flores Cortes
369f461695 [TS-FIX] fix: Fix TS7030 errors in finance controllers
- Add Promise<void> return type to async handlers with conditional returns
- Change 'return res.status()' to 'res.status(); return;' pattern
- Fixed controllers: ap, ar, bank-reconciliation, cash-flow, reports, accounting

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:21:33 -06:00
Adrian Flores Cortes
5775585a98 fix: Update AP and AR controllers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:16:43 -06:00
Adrian Flores Cortes
494a5f2306 fix: Update finance controllers
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 14:14:19 -06:00
Adrian Flores Cortes
61c61e4c2f [TS-FIX] fix: Fix TypeScript errors in finance module services
- Fix PaginatedResult to use flat format instead of meta wrapper
- Replace debitAmount/creditAmount with debit/credit (entity property names)
- Replace currencyCode with currency on AccountingEntry
- Replace partnerId/partnerName with supplierId/supplierName on AccountPayable
- Replace balanceAmount with balance on AccountPayable
- Replace reversalEntryId with reversedEntryId
- Replace acceptsMovements with allowsDirectPosting on ChartOfAccounts
- Fix APPayment properties: amount, currency, remove non-existent properties
- Remove unused imports (Between, In, LessThan, PaymentStatus)
- Fix unused dataSource parameter in constructors

Errors reduced from 507 to 443 (13% reduction in this commit)
Total reduction from initial ~730: 287 errors (39%)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 10:38:46 -06:00
7c1480a819 Migración desde erp-construccion/backend - Estándar multi-repo v2
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:11:14 -06:00