erp-core-backend-v2/src/modules/warehouses
rckrdmrd 6054102774 [BACKEND] feat: EPIC-001 & EPIC-002 - Core module completion and entity consolidation
EPIC-001: Complete Core Module
- Add PaymentTerm entity with multi-line support (30/60/90 days, early payment discounts)
- Add PaymentTerms service with calculateDueDate() functionality
- Add DiscountRule entity with volume/time-based conditions
- Add DiscountRules service with applyDiscounts() and rule combination logic
- Add REST endpoints for payment-terms and discount-rules in core module
- Register new entities in TypeORM configuration

EPIC-002: Entity Consolidation
- Add inventoryProductId FK to products.products for linking to inventory module
- Consolidate Warehouse entity in warehouses module as canonical source
- Add companyId and Location relation to canonical Warehouse
- Update inventory module to re-export Warehouse from warehouses module
- Remove deprecated warehouse.entity.ts from inventory module
- Update inventory/warehouses.service.ts to use canonical Warehouse

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 05:13:34 -06:00
..
__tests__ test(fase2): Add unit tests for FASE 2 modules 2026-01-18 04:18:40 -06:00
controllers feat: Add complete module structure for ERP backend 2026-01-16 00:40:54 -06:00
dto feat: Add complete module structure for ERP backend 2026-01-16 00:40:54 -06:00
entities [BACKEND] feat: EPIC-001 & EPIC-002 - Core module completion and entity consolidation 2026-01-18 05:13:34 -06:00
services feat: Add complete module structure for ERP backend 2026-01-16 00:40:54 -06:00
index.ts feat: Add complete module structure for ERP backend 2026-01-16 00:40:54 -06:00
warehouses.controller.ts feat(routes): Add independent routes for Invoices, Products, Warehouses modules 2026-01-18 03:43:43 -06:00
warehouses.module.ts feat: Add complete module structure for ERP backend 2026-01-16 00:40:54 -06:00
warehouses.routes.ts feat(routes): Add independent routes for Invoices, Products, Warehouses modules 2026-01-18 03:43:43 -06:00
warehouses.service.ts feat(routes): Add independent routes for Invoices, Products, Warehouses modules 2026-01-18 03:43:43 -06:00