Feature/gre remitente transportista improvements#220
Open
muglerman wants to merge 9 commits intoproject-openubl:mainfrom
Open
Feature/gre remitente transportista improvements#220muglerman wants to merge 9 commits intoproject-openubl:mainfrom
muglerman wants to merge 9 commits intoproject-openubl:mainfrom
Conversation
1bef5fa to
9b0af74
Compare
- Created multiple XML test cases for DespatchAdvice under GRETransportistaCasuisticasTest, including: - vehiculoM1L.xml - transportistaBasico.xml - transportistaComercioExterior.xml - transportistaConCarreta.xml - transportistaMultiplesConductores.xml - Updated summaryDocuments.xml and summaryDocuments_anularBoletaExonerada.xml to include TaxPercent elements for tax subtotals. Signed-off-by: Edwin Luis Barboza Pinedo <ibarboza27498@gmail.com>
Signed-off-by: Edwin Luis Barboza Pinedo <ibarboza27498@gmail.com>
…date dependencies and Java version - Changed XBuilderConfig from a class to an interface and applied ConfigMapping for better configuration handling. - Updated method calls in DefaultXBuilder to use the new configuration method signatures. - Refactored XSenderConfig to use ConfigMapping and added a default value for enableLoggingFeature. - Updated dependency versions in xsender/core/pom.xml for commons-codec, junit-jupiter-engine, mockito-core, and cxf-codegen-plugin. - Changed Java version in xsender/spring-boot-extension/integration-tests/pom.xml to 21 for compatibility with newer features. Signed-off-by: Edwin Luis Barboza Pinedo <ibarboza27498@gmail.com>
…derController code
Upgrade dependency apache camel
…nd GRETransportista - Implemented ValidationCoherenceTest to ensure consistent validation results across GRERemitente, GRETransportista, and DespatchAdviceValidator. - Added tests for valid and invalid scenarios, including series and RUC validation. - Verified that validate() and validateDetailed() methods produce consistent results. - Ensured that warnings and errors are uniformly handled across all validators. Signed-off-by: Edwin Luis Barboza Pinedo <ibarboza27498@gmail.com>
…ency in builder patterns Signed-off-by: Edwin Luis Barboza Pinedo <ibarboza27498@gmail.com>
… notes - Added InvoiceValidator for validating electronic invoices (01) and sales receipts (03) according to SUNAT guidelines. - Introduced NoteValidator for validating credit and debit notes, ensuring compliance with SUNAT regulations. - Created SalesDocumentValidator for shared validation logic between invoices and notes. - Developed unit tests for InvoiceValidator and NoteValidator to ensure correctness of validation rules. - Updated XML test resources to reflect changes in tax tier range. - Refactored RestSunatResponseProcessor for improved readability and structure.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen
Mejora en el soporte para la Guía de Remisión Electrónica (GRE) tanto Remitente (tipo 09) como Transportista (tipo 31).
Cambios principales
Nuevos modelos
GRERemitente— modelo de usuario para GRE tipo 09 convalidate()+toDespatchAdvice(). Maneja automáticamente las reglas de modalidad privada/pública (conductor+vehículo vs transportista contratado) e indicador M1/L.GRETransportista— modelo para GRE tipo 31 con serie V*. UsaTransportista(noRemitente) como tipo del emisor para respetar la distinción semántica SUNAT entre sujetos. Inyecta conductor y vehículo en el envío automáticamente.DespatchAdviceValidator— validador compartido para reglas comunes de envío y modalidad.Nuevos catálogos
Catalog20— reescrito con los 19 motivos de traslado vigentes (antes solo 11).Catalog21— ampliado con documentos relacionados (DAM, DS, manifiesto, SCOP, etc.).Catalog61— Tipo de documento adicional de transporte.Catalog62— Bienes normalizados SPOT/IVAP.Catalog63— Tipo de puerto/aeropuerto.Catalog64— Tipo de precinto de contenedor.IndicadorEnvio— 7 indicadorescbc:SpecialInstructions(traslado total DAM/DS, bien normalizado, M1/L, transbordo programado, retorno vehículo, zona primaria comext).TipoConductor— enumPrincipal/Secundarioparacbc:JobTitledel conductor.Nuevos modelos de datos
Contenedor— número + precinto (reemplaza el antiguoList<String>).DeclaracionAduanera— tipo, número y RUC emisor para DAM/DS.Modelos modificados
Envio— campos para contenedores tipados, puerto, aeropuerto, declaraciones aduaneras, indicadores, número de manifiesto.DespatchAdvice— campostercero,comprador,tipoComprobante, métodosisGRERemitente()/isGRETransportista().DespatchAdviceMapper— mapeo round-trip de contenedores tipados.despatchAdvice.xml— template Qute actualizado para contenedores, precintos, indicadores, declaraciones aduaneras, tercero y comprador.Ejemplo Spring Boot
XBuilderController— 2 nuevos endpoints:POST /api/create-xml/gre-remitenteyPOST /api/create-xml/gre-transportista.