Commit Graph

43 Commits

Author SHA1 Message Date
a4f82decc6 feat(companies): implement update current company use case and associated controllers
- Add UpdateCurrentCompanyUseCase to handle company updates.
- Create update-current-company.controller.ts to manage update requests.
- Implement validation and mapping for update requests using Zod.
- Add tests for the update use case and controller to ensure functionality.
- Introduce error handling and feedback state management for company details settings.
- Create utility functions for error normalization and feedback state resolution.
- Implement tests for error handling and feedback state utilities.
- Ensure nullable fields are handled correctly in DTOs and forms.
2026-08-17 15:49:11 +02:00
cf07de4836 feat: add proforma customer change evaluation utility
- Implemented `evaluateProformaCustomerChange` function to assess changes in customer details for proforma invoices.
- Introduced types for customer change details, blockers, field differences, and fiscal targets.
- Added utility functions for normalizing text and formatting recipient information.

test: add unit tests for customer payment resolver

- Created tests for `CustomerPaymentResolver` to validate payment term retrieval and handling of inactive terms.
- Ensured proper behavior when clearing payment terms and handling non-existent terms.

test: add unit tests for customer default payment term resolver

- Developed tests for `CustomerDefaultPaymentTermResolver` to verify default payment term resolution logic.
- Included scenarios for creating customers with and without explicit payment term IDs.

feat: implement customer default payment term resolver

- Created `CustomerDefaultPaymentTermResolver` to manage default payment term resolution during customer creation.
- Integrated with company finder and payment resolver services.

test: add unit tests for create customer use case

- Implemented tests for `CreateCustomerUseCase` to ensure correct handling of payment term IDs during customer creation.
- Validated behavior when no explicit payment term ID is provided.

test: add unit tests for update customer use case

- Developed tests for `UpdateCustomerUseCase` to verify payment term handling during customer updates.
- Ensured that inactive payment terms are not assigned and that explicit null values are respected.

feat: add dependency injection for customer company services

- Implemented DI for customer company dependencies to facilitate service resolution.

test: add tests for customer create data utility

- Created tests for `buildCustomerCreateData` to validate payment term handling based on user input.
2026-08-17 11:25:34 +02:00
ee48b19610 . 2026-08-16 18:08:44 +02:00
5dfbdd2a1c feat(payment-methods): add payment method management functionality
- Implemented `usePaymentMethodUpdateMutation` for updating payment methods with validation.
- Created settings controllers and hooks for managing payment methods.
- Added UI components for creating, editing, deleting, and displaying payment methods.
- Introduced error handling and feedback mechanisms for payment method operations.
- Developed form schemas and utility functions for handling payment method data.
- Established a new settings page for managing payment methods with appropriate loading and error states.
2026-08-13 01:04:56 +02:00
45200284ed feat(verifactu): add company Verifactu profile management features
- Implemented API for updating company Verifactu profile.
- Created entities for company Verifactu profile and defaults.
- Developed hooks for querying and updating the company Verifactu profile.
- Added UI components for displaying and editing company Verifactu settings.
- Introduced validation and error handling for profile updates.
- Created utility functions for building form data and handling feedback states.
- Added tests for utility functions and error handling.
2026-08-12 13:31:31 +02:00
ba1a424393 Refactor frontend ERP settings documentation to align with updated architecture and design principles. Enhance clarity on modular contributions, navigation structure, and separation of concerns between settings and modules. Introduce new sections for document state, purpose, and architectural goals while removing outdated objectives and anti-patterns. Ensure consistency in terminology and improve overall readability. 2026-08-11 18:15:05 +02:00
4b041db8da Documentación de settings 2026-08-11 18:02:16 +02:00
97cafb3818 . 2026-08-11 09:59:09 +02:00
26e2ee59bd feat: add error handling and feedback state management for customer and proforma updates
- Implemented feedback state resolution for proforma list and update pages.
- Created error view models for proforma and customer updates, including handling for various error types.
- Added tests for error handling in proforma and customer list updates.
- Introduced utility functions for building error view models and resolving feedback states.
- Ensured translation support for error messages in Spanish.
- Removed duplicate error alert components in customer module.
2026-08-06 13:03:48 +02:00
e5e73a5a13 Refactor documentation for ERP architecture and customer invoices
- Updated general requirements document to clarify its historical context and remove outdated technical details.
- Revised template documentation to serve as a base for writing prompts, emphasizing its auxiliary nature.
- Enhanced architecture documentation with clear distinctions between canonical and complementary documents.
- Added a new document for backend prompt base to centralize common context for backend prompts.
- Created a dedicated README for customer invoices, organizing current contracts, operational support, and historical context.
- Improved clarity and structure in various customer invoice documents, consolidating operational semantics and referencing canonical sources.
2026-08-05 13:18:03 +02:00
92b17ba307 refactor: eliminar mapeadores, repositorios y servicios heredados de proformas
* Se eliminaron `SequelizeProformaTaxesDomainMapper` y los archivos relacionados.
* Se eliminaron `SequelizeInvoiceRecipientSummaryMapper` y `SequelizeProformaSummaryMapper`.
* Se eliminó `ProformaRepository` y sus métodos asociados.
* Se limpiaron los servicios sin uso, incluido `SequelizeProformaNumberGenerator`.
* Se actualizaron las importaciones y exportaciones de los módulos relacionados para reflejar la eliminación del código heredado.
* Se ajustaron las plantillas para eliminar las referencias a `is_proforma`.
* Se modificó el DTO de la solicitud para excluir el campo `is_proforma`.
2026-08-04 12:09:19 +02:00
ee040b8335 Característica: Mejora de los modelos de facturas proforma y emitidas con atributos de serie de documentos
- Se han añadido `document_series_id`, `invoice_series_code` e `invoice_reference` a los modelos y instantáneas de facturas emitidas.
- Se han introducido `proforma_series_code` y `proforma_number`, y se han actualizado las referencias en los modelos y instantáneas de las facturas proforma.
- Se han actualizado los esquemas de la base de datos y los scripts SQL para dar cabida a los nuevos campos y garantizar la integridad de los datos.
- Se ha elaborado la documentación correspondiente a las nuevas series de documentos «contrato de instantánea» y «contrato de serie de facturas emitidas».
- Se han implementado scripts SQL de rellenado para completar los registros existentes con los nuevos campos.
2026-08-04 11:05:02 +02:00
84bb21e527 Refactor FactuGES Proforma Integration: Update Data Mapping and Add Documentation 2026-08-03 14:26:51 +02:00
71030522ed . 2026-08-03 13:36:29 +02:00
c46769e71e Duplicado de proforma 2026-07-30 12:45:33 +02:00
1bf85a05ff feat: implement proforma deletion and listing enhancements
- Added endpoint for retrieving deleted proformas with logical deletion.
- Updated proforma listing to support active, archived, and deleted scopes.
- Refactored repository and service layers to accommodate new proforma list scope.
- Enhanced UI to display separate views for active, archived, and deleted proformas.
- Updated localization files to reflect changes in proforma management.
- Improved query handling to filter proformas based on their status and scope.
2026-07-29 22:40:38 +02:00
a264f43b95 feat: enhance proforma listing and archiving functionality
- Updated proforma listing behavior to utilize `Criteria filters[]` for managing archived and active proformas.
- Removed `archived` query parameter from backend; frontend now manages `archiveView` state.
- Implemented new filters for `archived_at` and `status` in the proforma listing API.
- Adjusted proforma creation and deletion contracts to reflect changes in archiving logic.
- Introduced new utility functions for building proforma listing criteria based on UI state.
- Updated frontend components to support new filtering options and maintain state in the URL.
- Added SQL index for improved performance on proforma queries.
- Created new TypeScript types for managing proforma list filters and criteria.
2026-07-29 22:24:53 +02:00
1e0aadbfc6 Implement archive and unarchive functionality for proformas, including UI dialogs and logic for handling draft proformas. 2026-07-29 18:23:57 +02:00
eb8cbd97f2 Archivado de proformas 2026-07-29 14:40:59 +02:00
718e8b13d9 Borrado de proformas draft 2026-07-29 12:43:54 +02:00
16118da1ee Actualización de documentación 2026-07-29 11:24:06 +02:00
eeb285f8b2 Configuración fiscal para proformas 2026-07-29 11:00:37 +02:00
659df116a2 . 2026-07-29 10:16:34 +02:00
5ed6556036 feat(document-series): implement document series management API
- Add UpdateDocumentSeriesController for updating document series.
- Create documentSeriesApiErrorMapper for error handling.
- Define document series routes including CRUD operations.
- Implement Sequelize-based persistence layer for document series.
- Add DTOs for request and response schemas for document series operations.
- Establish common structures for document series data handling.
- Configure TypeScript settings for the document series module.
2026-07-28 18:04:57 +02:00
a43dbe4952 . 2026-07-15 14:13:13 +02:00
78bb02f9b0 feat: Implement Sequelize mappers and repository for Proforma V2
- Added SequelizeProformaV2RecipientDomainMapper for mapping recipient data to domain model.
- Introduced SequelizeProformaV2TaxesDomainMapper for handling tax data mapping.
- Created SequelizeProformaV2RecipientSummaryMapper for summarizing recipient information.
- Developed SequelizeProformaV2SummaryMapper for mapping Proforma summary data.
- Implemented SequelizeProformaRepositoryV2 for managing Proforma data persistence.
- Added SequelizeProformaV2NumberGenerator for generating Proforma numbers.
2026-07-10 13:59:44 +02:00
db4fa55cc0 Series en proformas / issued invoices 2026-07-07 22:21:50 +02:00
fd7252d77c Docs 2026-07-07 17:40:16 +02:00
cc14cdacf1 Docs 2026-07-06 17:47:05 +02:00
b1e9f4bd2d Doc 2026-07-06 14:04:47 +02:00
4bba8228cc . 2026-07-06 13:51:53 +02:00
faf7b2251c Identity -> pantalla de login 2026-07-05 13:43:13 +02:00
53eb33376c Muchos cambios 2026-04-20 19:20:42 +02:00
1ce77814b5 DTOS - GUÍA DE DISEÑO.md 2026-04-16 19:21:05 +02:00
50dd4103b2 Facturas de cliente y Veri*Factu 2025-10-08 18:41:42 +02:00
41ca0c2286 Clientes y facturas de cliente 2025-10-04 18:29:14 +02:00
c5ed10b8fd Plantilla para módulos 2025-09-27 21:28:50 +02:00
d7bce7fb56 Facturas de cliente y clientes 2025-08-11 19:49:52 +02:00
7059db0c5d Facturas de cliente 2025-07-16 17:47:45 +02:00
4a73456c46 Facturas de cliente 2025-06-24 20:38:57 +02:00
f47a97bfa0 . 2025-06-17 18:18:25 +02:00
e0785a58e6 . 2025-05-05 19:11:44 +02:00
6a674a60ec . 2025-04-22 17:09:57 +02:00