From 709f0df416d5abc7cf1eac0c4fe52772ab513f50 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sat, 25 Feb 2023 07:50:24 +0100 Subject: [PATCH 01/19] XML to POJO --- core/pom.xml | 11 + .../content/models/common/Document.java | 4 +- .../models/common/VirtualDocument.java | 39 ++ .../general/DocumentoVentaDetalle.java | 3 + .../content/models/standard/general/Guia.java | 3 + .../models/standard/general/Invoice.java | 3 - .../content/unmarshall/LocalDateAdapter.java | 16 + .../content/unmarshall/LocalTimeAdapter.java | 16 + .../content/unmarshall/Unmarshall.java | 606 ++++++++++++++++++ .../content/unmarshall/XMLSalesDocument.java | 314 +++++++++ .../unmarshall/XMLSalesDocumentLine.java | 68 ++ .../enrich/body/detalle/TasaIcbRule.java | 48 ++ ....openubl.xbuilder.enricher.kie.RuleFactory | 1 + .../jaxb/xml-bindings/credit-note.xml | 29 + .../jaxb/xml-bindings/debit-note.xml | 29 + .../resources/jaxb/xml-bindings/invoice.xml | 29 + .../resources/templates/Renderer/invoice.xml | 2 + .../ubl/standard/include/document-line.xml | 2 +- .../java/e2e/renderer/XMLAssertUtils.java | 5 + .../creditnote/CreditNoteIscTest.java | 6 +- .../CreditNoteOrdenDeCompraTest.java | 6 +- .../renderer/creditnote/CreditNoteTest.java | 6 +- .../e2e/renderer/debitnote/DebitNoteTest.java | 6 +- .../invoice/InvoiceAnticiposTest.java | 6 +- .../invoice/InvoiceDescuentosTest.java | 16 +- .../invoice/InvoiceDetraccionTest.java | 6 +- .../invoice/InvoiceDireccionEntregaTest.java | 11 +- .../InvoiceDocumentoRelacionadoTest.java | 6 +- .../invoice/InvoiceFechaVencimientoTest.java | 6 +- .../invoice/InvoiceFormaPagoTest.java | 11 +- .../renderer/invoice/InvoiceGuiasTest.java | 6 +- .../e2e/renderer/invoice/InvoiceIscTest.java | 26 +- .../renderer/invoice/InvoiceIssue30Test.java | 21 +- .../e2e/renderer/invoice/InvoiceMoneda.java | 8 +- .../invoice/InvoiceOrdeDeCompraTest.java | 6 +- .../invoice/InvoicePercepcionTest.java | 6 +- .../e2e/renderer/invoice/InvoiceTest.java | 41 +- .../renderer/invoice/InvoiceTipoIgvTest.java | 21 +- 38 files changed, 1400 insertions(+), 49 deletions(-) create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/models/common/VirtualDocument.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalDateAdapter.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalTimeAdapter.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/Unmarshall.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocument.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocumentLine.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/rules/enrich/body/detalle/TasaIcbRule.java create mode 100644 core/src/main/resources/jaxb/xml-bindings/credit-note.xml create mode 100644 core/src/main/resources/jaxb/xml-bindings/debit-note.xml create mode 100644 core/src/main/resources/jaxb/xml-bindings/invoice.xml diff --git a/core/pom.xml b/core/pom.xml index a1d9dcae..38937e74 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -58,6 +58,17 @@ 2.2.8 + + jakarta.xml.bind + jakarta.xml.bind-api + 2.3.3 + + + org.eclipse.persistence + org.eclipse.persistence.moxy + 2.7.12 + + org.junit.jupiter junit-jupiter-engine diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/common/Document.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/common/Document.java index d6c5241b..b096c4aa 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/common/Document.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/common/Document.java @@ -49,9 +49,7 @@ public abstract class Document { /** * Persona que firma electrónicamente el comprobante. Si es NULL los datos del proveedor son usados. */ - @Schema( - description = "Persona que firma electrónicamente el comprobante. Si NULL los datos del proveedor son usados." - ) + @Schema(description = "Persona que firma el comprobante. Si NULL los datos del proveedor son usados.") private Firmante firmante; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/common/VirtualDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/common/VirtualDocument.java new file mode 100644 index 00000000..581b03f3 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/common/VirtualDocument.java @@ -0,0 +1,39 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.models.common; + +import lombok.NoArgsConstructor; +import lombok.experimental.SuperBuilder; + +import java.util.HashMap; +import java.util.Map; + +@SuperBuilder +@NoArgsConstructor +public abstract class VirtualDocument { + + private Map extensions = new HashMap<>(); + + public T get(String property) { + return (T) extensions.get(property); + } + + public void set(String property, Object value) { + extensions.put(property, value); + } + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/DocumentoVentaDetalle.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/DocumentoVentaDetalle.java index 944af794..c9128614 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/DocumentoVentaDetalle.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/DocumentoVentaDetalle.java @@ -63,6 +63,9 @@ public class DocumentoVentaDetalle { @Schema(description = "Catalogo 07") private String igvTipo; + @Schema(minimum = "0") + private BigDecimal tasaIcb; + @Schema(minimum = "0") private BigDecimal icb; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/Guia.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/Guia.java index c2b8c754..eac4a02b 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/Guia.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/Guia.java @@ -21,6 +21,7 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; @Data @Builder @@ -28,6 +29,7 @@ @AllArgsConstructor public class Guia { + @XmlPath("cbc:ID/text()") @Schema(requiredMode = Schema.RequiredMode.REQUIRED) private String serieNumero; @@ -38,6 +40,7 @@ public class Guia { *

* Valores válidos: "09", "31" */ + @XmlPath("cbc:DocumentTypeCode/text()") @Schema(description = "Catalogo 01", requiredMode = Schema.RequiredMode.REQUIRED) private String tipoDocumento; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/Invoice.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/Invoice.java index 50e67b9d..a2c82a66 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/Invoice.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/Invoice.java @@ -67,9 +67,6 @@ public class Invoice extends SalesDocument { @Singular private List anticipos; - @Singular - private List otrosDocumentosTributariosRelacionados; - @Singular private List descuentos; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalDateAdapter.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalDateAdapter.java new file mode 100644 index 00000000..fb08a9e1 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalDateAdapter.java @@ -0,0 +1,16 @@ +package io.github.project.openubl.xbuilder.content.unmarshall; + +import javax.xml.bind.annotation.adapters.XmlAdapter; +import java.time.LocalDate; + +public class LocalDateAdapter extends XmlAdapter { + @Override + public LocalDate unmarshal(String v) throws Exception { + return LocalDate.parse(v); + } + + @Override + public String marshal(LocalDate v) throws Exception { + return v.toString(); + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalTimeAdapter.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalTimeAdapter.java new file mode 100644 index 00000000..a02b4df2 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalTimeAdapter.java @@ -0,0 +1,16 @@ +package io.github.project.openubl.xbuilder.content.unmarshall; + +import javax.xml.bind.annotation.adapters.XmlAdapter; +import java.time.LocalTime; + +public class LocalTimeAdapter extends XmlAdapter { + @Override + public LocalTime unmarshal(String v) throws Exception { + return LocalTime.parse(v); + } + + @Override + public String marshal(LocalTime v) throws Exception { + return v.toString(); + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/Unmarshall.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/Unmarshall.java new file mode 100644 index 00000000..6ec348f7 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/Unmarshall.java @@ -0,0 +1,606 @@ +package io.github.project.openubl.xbuilder.content.unmarshall; + +import io.github.project.openubl.xbuilder.content.catalogs.Catalog; +import io.github.project.openubl.xbuilder.content.catalogs.Catalog12; +import io.github.project.openubl.xbuilder.content.catalogs.Catalog12_Anticipo; +import io.github.project.openubl.xbuilder.content.catalogs.Catalog5; +import io.github.project.openubl.xbuilder.content.catalogs.Catalog53_Anticipo; +import io.github.project.openubl.xbuilder.content.catalogs.Catalog53_DescuentoGlobal; +import io.github.project.openubl.xbuilder.content.catalogs.CatalogContadoCredito; +import io.github.project.openubl.xbuilder.content.models.common.Cliente; +import io.github.project.openubl.xbuilder.content.models.common.Contacto; +import io.github.project.openubl.xbuilder.content.models.common.Direccion; +import io.github.project.openubl.xbuilder.content.models.common.Document; +import io.github.project.openubl.xbuilder.content.models.common.Firmante; +import io.github.project.openubl.xbuilder.content.models.common.Proveedor; +import io.github.project.openubl.xbuilder.content.models.standard.general.Anticipo; +import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; +import io.github.project.openubl.xbuilder.content.models.standard.general.CuotaDePago; +import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; +import io.github.project.openubl.xbuilder.content.models.standard.general.Descuento; +import io.github.project.openubl.xbuilder.content.models.standard.general.Detraccion; +import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoRelacionado; +import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; +import io.github.project.openubl.xbuilder.content.models.standard.general.FormaDePago; +import io.github.project.openubl.xbuilder.content.models.standard.general.Guia; +import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.models.standard.general.Note; +import io.github.project.openubl.xbuilder.content.models.standard.general.Percepcion; +import io.github.project.openubl.xbuilder.content.models.standard.general.SalesDocument; +import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImporteInvoice; +import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImporteNote; +import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImpuestos; +import org.eclipse.persistence.jaxb.JAXBContextFactory; +import org.eclipse.persistence.jaxb.JAXBContextProperties; +import org.xml.sax.InputSource; + +import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import java.io.IOException; +import java.io.InputStream; +import java.io.StringReader; +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Collectors; + +public class Unmarshall { + + public static Invoice unmarshallInvoice(String xml) throws JAXBException, IOException { + try ( + InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/invoice.xml"); + StringReader reader = new StringReader(xml); + ) { + XMLSalesDocument xmlSalesDocument = unmarshall(documentOXM, new InputSource(reader)); + Invoice.InvoiceBuilder builder = Invoice.builder(); + + enrichSalesDocument(xmlSalesDocument, builder); + + // Fecha de vencimiento + builder.fechaVencimiento(xmlSalesDocument.getDueDate()); + + // Tipo de comprobante + builder.tipoComprobante(xmlSalesDocument.getInvoiceTypeCode()); + + // Observaciones + if (xmlSalesDocument.getNotes() != null) { + xmlSalesDocument.getNotes().stream() + .filter(e -> e.getLanguageLocaleId() == null) + .findFirst().ifPresent(n -> { + builder.observaciones(n.getValue()); + }); + } + + // Tipo de operacion + builder.tipoOperacion(xmlSalesDocument.getInvoiceTypeCode_listID()); + + // Forma de pago + builder.formaDePago(mapFormaDePago(xmlSalesDocument.getPaymentTerms())); + + // Total importe + builder.totalImporte(mapTotalImporteInvoice(xmlSalesDocument.getMonetaryTotal())); + + // Direccion entrega + builder.direccionEntrega(mapDireccion(xmlSalesDocument.getDeliveryLocation())); + + // Detraccion + builder.detraccion(mapDetraccion(xmlSalesDocument.getPaymentMeans(), xmlSalesDocument.getPaymentTerms())); + + // Percepcion + builder.percepcion(mapPercepcion(xmlSalesDocument.getPaymentTerms(), xmlSalesDocument.getAllowanceCharges())); + + // Anticipos + builder.anticipos(mapAnticipos(xmlSalesDocument.getAdditionalDocumentReferences(), xmlSalesDocument.getPrepaidPayments(), xmlSalesDocument.getAllowanceCharges())); + + // Descuentos + builder.descuentos(mapDescuentos(xmlSalesDocument.getAllowanceCharges())); + + return builder.build(); + } + } + + public static CreditNote unmarshallCreditNote(String xml) throws JAXBException, IOException { + try ( + InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/credit-note.xml"); + StringReader reader = new StringReader(xml); + ) { + XMLSalesDocument xmlSalesDocument = unmarshall(documentOXM, new InputSource(reader)); + CreditNote.CreditNoteBuilder builder = CreditNote.builder(); + + enrichSalesDocument(xmlSalesDocument, builder); + enrichNote(xmlSalesDocument, builder); + + return builder.build(); + } + } + + public static DebitNote unmarshallDebitNote(String xml) throws JAXBException, IOException { + try ( + InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/debit-note.xml"); + StringReader reader = new StringReader(xml); + ) { + XMLSalesDocument xmlSalesDocument = unmarshall(documentOXM, new InputSource(reader)); + DebitNote.DebitNoteBuilder builder = DebitNote.builder(); + + enrichSalesDocument(xmlSalesDocument, builder); + enrichNote(xmlSalesDocument, builder); + + return builder.build(); + } + } + + public static void enrichNote(XMLSalesDocument xmlSalesDocument, Note.NoteBuilder builder) { + enrichDocument(xmlSalesDocument, builder); + + // ComprobanteAfectado + builder.comprobanteAfectadoSerieNumero(xmlSalesDocument.getDiscrepancyResponse_referenceId()); + builder.comprobanteAfectadoTipo(xmlSalesDocument.getDiscrepancyResponse_responseCode()); + builder.sustentoDescripcion(xmlSalesDocument.getDiscrepancyResponse_description()); + + // Total importe + builder.totalImporte(mapTotalImporteNote(xmlSalesDocument.getMonetaryTotal())); + } + + public static T unmarshall(InputStream documentOXML, InputSource inputSource) throws JAXBException { + Map properties = new HashMap<>(); + properties.put(JAXBContextProperties.OXM_METADATA_SOURCE, List.of( + Objects.requireNonNull(documentOXML) + )); + + JAXBContext jaxbContext = JAXBContextFactory.createContext(Unmarshall.class.getPackageName(), null, properties); + Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); + return (T) unmarshaller.unmarshal(inputSource); + } + + public static void enrichSalesDocument(XMLSalesDocument xmlSalesDocument, SalesDocument.SalesDocumentBuilder builder) { + enrichDocument(xmlSalesDocument, builder); + + // Leyendas + Optional> notes = Optional + .ofNullable(xmlSalesDocument.getNotes()) + .map(o -> o.stream() + .filter(note -> note.getLanguageLocaleId() != null) + .collect(Collectors.toMap(XMLSalesDocument.Note::getLanguageLocaleId, XMLSalesDocument.Note::getValue)) + ); + notes.ifPresent(builder::leyendas); + + // Serie y numero + String[] split = xmlSalesDocument.getDocumentId().split("-"); + if (split.length == 2) { + builder.serie(split[0]); + builder.numero(Integer.parseInt(split[1])); + } + + // + builder.horaEmision(xmlSalesDocument.getIssueTime()); + builder.ordenDeCompra(xmlSalesDocument.getOrderReferenceId()); + + // Cliente + builder.cliente(mapCliente(xmlSalesDocument.getAccountingCustomerParty())); + + // Total impuestos + builder.totalImpuestos(mapTotalImpuestos(xmlSalesDocument.getTaxTotal())); + + // Guias + builder.guias(mapGuias(xmlSalesDocument.getDespatchDocumentReferences())); + + // Documentos relacionados + builder.documentosRelacionados(mapDocumentosRelacionados(xmlSalesDocument.getAdditionalDocumentReferences())); + + // Detalles + builder.detalles(mapDetalles(xmlSalesDocument.getLines())); + } + + public static void enrichDocument(XMLSalesDocument xmlSalesDocument, Document.DocumentBuilder builder) { + builder.moneda(xmlSalesDocument.getDocumentCurrencyCode()); + builder.fechaEmision(xmlSalesDocument.getIssueDate()); + builder.proveedor(mapProveedor(xmlSalesDocument.getAccountingSupplierParty())); + builder.firmante(mapFirmante(xmlSalesDocument.getSignature())); + } + + public static BigDecimal mapPorcentaje(BigDecimal number) { + return Optional.ofNullable(number) + .map(bigDecimal -> bigDecimal.divide(new BigDecimal("100"), 10, RoundingMode.HALF_EVEN)) + .orElse(null); + } + + public static Proveedor mapProveedor(XMLSalesDocument.Supplier supplier) { + if (supplier == null) { + return null; + } + + return Proveedor.builder() + .ruc(supplier.getPartyIdentification_id()) + .nombreComercial(supplier.getPartyName()) + .razonSocial(supplier.getRegistrationName()) + .direccion(mapDireccion(supplier.getAddress())) + .contacto(mapContacto(supplier.getContact())) + .build(); + } + + public static Cliente mapCliente(XMLSalesDocument.Customer customer) { + if (customer == null) { + return null; + } + + return Cliente.builder() + .tipoDocumentoIdentidad(customer.getPartyIdentification_id_schemeId()) + .numeroDocumentoIdentidad(customer.getPartyIdentification_id()) + .nombre(customer.getRegistrationName()) + .direccion(mapDireccion(customer.getAddress())) + .contacto(mapContacto(customer.getContact())) + .build(); + } + + public static Direccion mapDireccion(XMLSalesDocument.Address address) { + if (address == null) { + return null; + } + + return Direccion.builder() + .ubigeo(address.getId()) + .codigoLocal(address.getAddressTypeCode()) + .urbanizacion(address.getCitySubdivisionName()) + .provincia(address.getCityName()) + .departamento(address.getCountrySubEntity()) + .distrito(address.getDistrict()) + .direccion(address.getAddressLine()) + .codigoPais(address.getIdentificationCode()) + .build(); + } + + public static Contacto mapContacto(XMLSalesDocument.Contact contact) { + if (contact == null) { + return null; + } + + return Contacto.builder() + .telefono(contact.getTelephone()) + .email(contact.getElectronicMail()) + .build(); + } + + public static Firmante mapFirmante(XMLSalesDocument.Signature signature) { + if (signature == null) { + return null; + } + + return Firmante.builder() + .ruc(signature.getId()) + .razonSocial(signature.getPartyName()) + .build(); + } + + public static TotalImpuestos mapTotalImpuestos(XMLSalesDocument.TaxTotal taxTotal) { + if (taxTotal == null) { + return null; + } + + TotalImpuestos.TotalImpuestosBuilder builder = TotalImpuestos.builder() + .total(taxTotal.getTaxAmount()); + + for (XMLSalesDocument.TaxSubtotal taxSubtotal : taxTotal.getTaxSubtotals()) { + Catalog5 catalog5 = Catalog + .valueOfCode(Catalog5.class, taxSubtotal.getCode()) + .orElseThrow(Catalog.invalidCatalogValue); + switch (catalog5) { + case IGV: + builder = builder + .gravadoBaseImponible(taxSubtotal.getTaxableAmount()) + .gravadoImporte(taxSubtotal.getTaxAmount()); + break; + case IMPUESTO_ARROZ_PILADO: + builder = builder + .ivapBaseImponible(taxSubtotal.getTaxableAmount()) + .ivapImporte(taxSubtotal.getTaxAmount()); + break; + case ISC: + builder = builder + .iscBaseImponible(taxSubtotal.getTaxableAmount()) + .iscImporte(taxSubtotal.getTaxAmount()); + break; + case EXPORTACION: + builder = builder + .exportacionBaseImponible(taxSubtotal.getTaxableAmount()) + .exportacionImporte(taxSubtotal.getTaxAmount()); + break; + case GRATUITO: + builder = builder + .gratuitoBaseImponible(taxSubtotal.getTaxableAmount()) + .gratuitoImporte(taxSubtotal.getTaxAmount()); + break; + case EXONERADO: + builder = builder + .exoneradoBaseImponible(taxSubtotal.getTaxableAmount()) + .exoneradoImporte(taxSubtotal.getTaxAmount()); + break; + case INAFECTO: + builder = builder + .inafectoBaseImponible(taxSubtotal.getTaxableAmount()) + .inafectoImporte(taxSubtotal.getTaxAmount()); + break; + case ICBPER: + builder = builder + .icbImporte(taxSubtotal.getTaxAmount()); + break; + case OTROS: + break; + } + } + + return builder.build(); + } + + public static List mapGuias(List despatchDocumentReferences) { + if (despatchDocumentReferences == null) { + return Collections.emptyList(); + } + + return despatchDocumentReferences.stream() + .map(despatchDocumentReference -> Guia.builder() + .serieNumero(despatchDocumentReference.getId()) + .tipoDocumento(despatchDocumentReference.getDocumentTypeCode()) + .build()) + .collect(Collectors.toList()); + } + + private static List mapDocumentosRelacionados(List additionalDocumentReferences) { + if (additionalDocumentReferences == null) { + return Collections.emptyList(); + } + + return additionalDocumentReferences.stream() + .filter(additionalDocumentReference -> Objects.nonNull(additionalDocumentReference.getDocumentTypeCode())) + .filter(additionalDocumentReference -> { + Optional catalog12 = Catalog + .valueOfCode(Catalog12.class, additionalDocumentReference.getDocumentTypeCode()); + Optional catalog12_anticipo = Catalog + .valueOfCode(Catalog12_Anticipo.class, additionalDocumentReference.getDocumentTypeCode()); + return catalog12.isPresent() && catalog12_anticipo.isEmpty(); + }) + .map(despatchDocumentReference -> DocumentoRelacionado.builder() + .serieNumero(despatchDocumentReference.getId()) + .tipoDocumento(despatchDocumentReference.getDocumentTypeCode()) + .build()) + .collect(Collectors.toList()); + } + + private static List mapDetalles(List lines) { + if (lines == null) { + return Collections.emptyList(); + } + + return lines.stream() + .map(documentLine -> { + DocumentoVentaDetalle.DocumentoVentaDetalleBuilder builder = DocumentoVentaDetalle.builder(); + + // Extract taxes + XMLSalesDocumentLine.TaxTotalLine taxTotal = documentLine.getTaxTotal(); + Map> subTotals = taxTotal.getTaxSubtotals().stream() + .collect(Collectors.groupingBy( + XMLSalesDocumentLine.TaxSubtotalLine::getCode, + Collectors.reducing((o, o2) -> o) // Only one element per type is expected + )); + + // ISC + Optional iscTaxSubtotal = subTotals.getOrDefault(Catalog5.ISC.getCode(), Optional.empty()); + iscTaxSubtotal.ifPresent(taxSubtotalLine -> { + builder.iscBaseImponible(taxSubtotalLine.getTaxableAmount()); + builder.isc(taxSubtotalLine.getTaxAmount()); + builder.tasaIsc(mapPorcentaje(taxSubtotalLine.getPercent())); + builder.iscTipo(taxSubtotalLine.getTierRange()); + }); + + // IGV + Optional igvTaxSubtotal = taxTotal.getTaxSubtotals().stream() + .filter(line -> !Objects.equals(line.getCode(), Catalog5.ISC.getCode()) && !Objects.equals(line.getCode(), Catalog5.ICBPER.getCode())) + .findFirst(); + igvTaxSubtotal.ifPresent(taxSubtotalLine -> { + builder.igvBaseImponible(taxSubtotalLine.getTaxableAmount()); + builder.igv(taxSubtotalLine.getTaxAmount()); + builder.tasaIgv(mapPorcentaje(taxSubtotalLine.getPercent())); + builder.igvTipo(taxSubtotalLine.getTaxExemptionReasonCode()); + }); + + // ICB + Optional icbTaxSubtotal = subTotals.getOrDefault(Catalog5.ICBPER.getCode(), Optional.empty()); + icbTaxSubtotal.ifPresent(taxSubtotalLine -> { + builder.icb(taxSubtotalLine.getTaxAmount()); + builder.tasaIcb(taxSubtotalLine.getPerUnitAmount()); + builder.icbAplica(taxSubtotalLine.getTaxAmount() != null && taxSubtotalLine.getTaxAmount().compareTo(BigDecimal.ZERO) > 0); + }); + + return builder + .descripcion(documentLine.getDescription()) + .unidadMedida(documentLine.getQuantity_unitCode()) + .cantidad(documentLine.getQuantity()) + .precio(documentLine.getPriceAmount()) + .precioReferencia(documentLine.getAlternativeConditionPrice_priceAmount()) + .precioReferenciaTipo(documentLine.getAlternativeConditionPrice_priceTypeCode()) + .totalImpuestos(taxTotal.getTaxAmount()) + .build(); + }) + .collect(Collectors.toList()); + } + + private static FormaDePago mapFormaDePago(List paymentTerms) { + if (paymentTerms == null) { + return null; + } + + List formasDePago = paymentTerms.stream() + .filter(elem -> Objects.equals(elem.getId(), "FormaPago")) + .collect(Collectors.toList()); + if (formasDePago.isEmpty()) { + return null; + } + + XMLSalesDocument.PaymentTerms formaDePago = formasDePago.stream() + .filter(elem -> Objects.equals(elem.getPaymentMeansID(), CatalogContadoCredito.CREDITO.getCode()) || + Objects.equals(elem.getPaymentMeansID(), CatalogContadoCredito.CONTADO.getCode()) + ) + .findFirst() + .orElse(new XMLSalesDocument.PaymentTerms()); + + List cuotas = formasDePago.stream() + .filter(elem -> elem.getPaymentMeansID().startsWith("Cuota")) + .collect(Collectors.toList()); + + return FormaDePago.builder() + .tipo(formaDePago.getPaymentMeansID()) + .total(formaDePago.getAmount()) + .cuotas(cuotas.stream() + .map(elem -> CuotaDePago.builder() + .importe(elem.getAmount()) + .fechaPago(elem.getPaymentDueDate()) + .build()) + .collect(Collectors.toList()) + ) + .build(); + } + + private static TotalImporteInvoice mapTotalImporteInvoice(XMLSalesDocument.MonetaryTotal monetaryTotal) { + if (monetaryTotal == null) { + return null; + } + + return TotalImporteInvoice.builder() + .importe(monetaryTotal.getPayableAmount()) + .importeSinImpuestos(monetaryTotal.getLineExtensionAmount()) + .importeConImpuestos(monetaryTotal.getTaxInclusiveAmount()) + .anticipos(monetaryTotal.getPrepaidAmount()) + .descuentos(monetaryTotal.getAllowanceTotalAmount()) + .build(); + } + + private static TotalImporteNote mapTotalImporteNote(XMLSalesDocument.MonetaryTotal monetaryTotal) { + if (monetaryTotal == null) { + return null; + } + + return TotalImporteNote.builder() + .importe(monetaryTotal.getPayableAmount()) + .importeSinImpuestos(monetaryTotal.getLineExtensionAmount()) + .importeConImpuestos(monetaryTotal.getTaxInclusiveAmount()) + .build(); + } + + private static Detraccion mapDetraccion(XMLSalesDocument.PaymentMeans paymentMeans, List paymentTerms) { + if (paymentMeans == null || paymentTerms == null) { + return null; + } + + Detraccion.DetraccionBuilder builder = Detraccion.builder() + .medioDePago(paymentMeans.getPaymentMeansCode()) + .cuentaBancaria(paymentMeans.getPayeeFinancialAccount_id()); + + paymentTerms.stream() + .filter(elem -> Objects.equals(elem.getId(), "Detraccion")) + .findFirst() + .ifPresent(el -> builder + .tipoBienDetraido(el.getPaymentMeansID()) + .porcentaje(mapPorcentaje(el.getPaymentPercent())) + .monto(el.getAmount()) + ); + + return builder.build(); + } + + private static Percepcion mapPercepcion(List paymentTerms, List allowanceCharges) { + if (paymentTerms == null || allowanceCharges == null) { + return null; + } + + Optional paymentTerm = paymentTerms.stream() + .filter(elem -> Objects.equals(elem.getId(), "Percepcion")) + .findFirst(); + Optional allowanceCharge = allowanceCharges.stream() + .filter(XMLSalesDocument.AllowanceCharge::getChargeIndicator) + .findFirst(); + + if (paymentTerm.isEmpty() || allowanceCharge.isEmpty()) { + return null; + } + + Percepcion.PercepcionBuilder builder = Percepcion.builder(); + paymentTerm.ifPresent(elem -> builder + .montoTotal(elem.getAmount()) + ); + allowanceCharge.ifPresent(elem -> builder + .tipo(elem.getAllowanceChargeReasonCode()) + .porcentaje(elem.getMultiplierFactorNumeric()) + .monto(elem.getAmount()) + .montoBase(elem.getBaseAmount()) + ); + + return builder.build(); + } + + private static List mapAnticipos(List additionalDocumentReferences, List prepaidPayments, List allowanceCharges) { + if (additionalDocumentReferences == null || prepaidPayments == null || allowanceCharges == null) { + return Collections.emptyList(); + } + + additionalDocumentReferences = additionalDocumentReferences.stream() + .filter(additionalDocumentReference -> additionalDocumentReference.getDocumentStatusCode() != null) + .collect(Collectors.toList()); + + allowanceCharges = allowanceCharges.stream() + .filter(allowanceCharge -> !allowanceCharge.getChargeIndicator()) + .filter(allowanceCharge -> Catalog + .valueOfCode(Catalog53_Anticipo.class, allowanceCharge.getAllowanceChargeReasonCode()) + .isPresent() + ) + .collect(Collectors.toList()); + + if (additionalDocumentReferences.size() != prepaidPayments.size() || additionalDocumentReferences.size() != allowanceCharges.size()) { + return Collections.emptyList(); + } + + List result = new ArrayList<>(); + for (int i = 0; i < additionalDocumentReferences.size(); i++) { + XMLSalesDocument.AdditionalDocumentReference additionalDocumentReference = additionalDocumentReferences.get(i); + XMLSalesDocument.PrepaidPayment prepaidPayment = prepaidPayments.get(i); + XMLSalesDocument.AllowanceCharge allowanceCharge = allowanceCharges.get(i); + + result.add(Anticipo.builder() + .comprobanteSerieNumero(additionalDocumentReference.getId()) + .comprobanteTipo(additionalDocumentReference.getDocumentTypeCode()) + .monto(prepaidPayment.getPaidAmount()) + .tipo(allowanceCharge.getAllowanceChargeReasonCode()) + .build() + ); + } + + return result; + } + + private static List mapDescuentos(List allowanceCharges) { + if (allowanceCharges == null) { + return Collections.emptyList(); + } + + return allowanceCharges.stream() + .filter(allowanceCharge -> !allowanceCharge.getChargeIndicator()) + .filter(allowanceCharge -> Catalog + .valueOfCode(Catalog53_DescuentoGlobal.class, allowanceCharge.getAllowanceChargeReasonCode()) + .isPresent() + ) + .map(allowanceCharge -> Descuento.builder() + .tipoDescuento(allowanceCharge.getAllowanceChargeReasonCode()) + .factor(allowanceCharge.getMultiplierFactorNumeric()) + .monto(allowanceCharge.getAmount()) + .montoBase(allowanceCharge.getBaseAmount()) + .build() + ) + .collect(Collectors.toList()); + } + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocument.java new file mode 100644 index 00000000..549e7d5a --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocument.java @@ -0,0 +1,314 @@ +package io.github.project.openubl.xbuilder.content.unmarshall; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalTime; +import java.util.List; + +@Data +@NoArgsConstructor +public class XMLSalesDocument { + + @XmlPath("cbc:ID/text()") + private String documentId; + + @XmlPath("cbc:IssueDate/text()") + private LocalDate issueDate; + + @XmlPath("cbc:IssueTime/text()") + private LocalTime issueTime; + + @XmlPath("cbc:DueDate/text()") + private LocalDate dueDate; + + @XmlPath("cbc:InvoiceTypeCode/text()") + private String invoiceTypeCode; + + @XmlPath("cbc:InvoiceTypeCode/@listID") + private String invoiceTypeCode_listID; + + @XmlPath("cbc:Note") + private List notes; + + @XmlPath("cbc:DocumentCurrencyCode/text()") + private String documentCurrencyCode; + + @XmlPath("cac:OrderReference/cbc:ID/text()") + private String orderReferenceId; + + @XmlPath("cac:DespatchDocumentReference") + private List despatchDocumentReferences; + + @XmlPath("cac:AdditionalDocumentReference") + private List additionalDocumentReferences; + + @XmlPath("cac:Signature") + private Signature signature; + + @XmlPath("cac:AccountingSupplierParty/cac:Party") + private Supplier accountingSupplierParty; + + @XmlPath("cac:AccountingCustomerParty/cac:Party") + private Customer accountingCustomerParty; + + @XmlPath("cac:Delivery/cac:DeliveryLocation/cac:Address") + private Address deliveryLocation; + + @XmlPath("cac:PaymentMeans") + private PaymentMeans paymentMeans; + + @XmlPath("cac:PaymentTerms") + private List paymentTerms; + + @XmlPath("cac:PrepaidPayment") + private List prepaidPayments; + + @XmlPath("cac:AllowanceCharge") + private List allowanceCharges; + + @XmlPath("cac:TaxTotal") + private TaxTotal taxTotal; + + // When Invoice or CreditNote then @XmlPath("cac:LegalMonetaryTotal") + // When DebitNote @XmlPath("cac:RequestedMonetaryTotal") + // Therefore defining it in bindings/*.xml + private MonetaryTotal monetaryTotal; + + private List lines; + + // Note + @XmlPath("cac:DiscrepancyResponse/cbc:ReferenceID/text()") + String discrepancyResponse_referenceId; + + @XmlPath("cac:DiscrepancyResponse/cbc:ResponseCode/text()") + String discrepancyResponse_responseCode; + + @XmlPath("cac:DiscrepancyResponse/cbc:Description/text()") + String discrepancyResponse_description; + + // + + @Data + @NoArgsConstructor + public static class Note { + @XmlPath("@languageLocaleID") + private String languageLocaleId; + + @XmlPath("text()") + private String value; + } + + @Data + @NoArgsConstructor + public static class DespatchDocumentReference { + @XmlPath("cbc:ID/text()") + private String id; + + @XmlPath("cbc:DocumentTypeCode/text()") + private String documentTypeCode; + } + + @Data + @NoArgsConstructor + public static class AdditionalDocumentReference { + @XmlPath("cbc:ID/text()") + private String id; + + @XmlPath("cbc:DocumentTypeCode/text()") + private String documentTypeCode; + + @XmlPath("cbc:DocumentStatusCode/text()") + private String documentStatusCode; + } + + @Data + @NoArgsConstructor + public static class Signature { + @XmlPath("cbc:ID/text()") + private String id; + + @XmlPath("cac:SignatoryParty/cac:PartyName/cbc:Name/text()") + private String partyName; + } + + @Data + @NoArgsConstructor + public static class Address { + @XmlPath("cbc:ID/text()") + private String id; + + @XmlPath("cbc:AddressTypeCode/text()") + private String addressTypeCode; + + @XmlPath("cbc:CitySubdivisionName/text()") + private String citySubdivisionName; + + @XmlPath("cbc:CityName/text()") + private String cityName; + + @XmlPath("cbc:CountrySubentity/text()") + private String countrySubEntity; + + @XmlPath("cbc:District/text()") + private String district; + + @XmlPath("cac:AddressLine/cbc:Line/text()") + private String addressLine; + + @XmlPath("cac:Country/cbc:IdentificationCode/text()") + private String identificationCode; + } + + @Data + @NoArgsConstructor + public static class Contact { + @XmlPath("cbc:Telephone/text()") + private String telephone; + + @XmlPath("cbc:ElectronicMail/text()") + private String electronicMail; + } + + @Data + @NoArgsConstructor + public static class Supplier { + @XmlPath("cac:PartyIdentification/cbc:ID/text()") + private String partyIdentification_id; + + @XmlPath("cac:PartyName/cbc:Name/text()") + private String partyName; + + @XmlPath("cac:PartyLegalEntity/cbc:RegistrationName/text()") + private String registrationName; + + @XmlPath("cac:PartyLegalEntity/cac:RegistrationAddress") + private Address address; + + @XmlPath("cac:Contact") + private Contact contact; + } + + @Data + @NoArgsConstructor + public static class Customer { + @XmlPath("cac:PartyIdentification/cbc:ID/text()") + private String partyIdentification_id; + + @XmlPath("cac:PartyIdentification/cbc:ID/@schemeID") + private String partyIdentification_id_schemeId; + + @XmlPath("cac:PartyLegalEntity/cbc:RegistrationName/text()") + private String registrationName; + + @XmlPath("cac:PartyLegalEntity/cac:RegistrationAddress") + private Address address; + + @XmlPath("cac:Contact") + private Contact contact; + } + + @Data + @NoArgsConstructor + public static class PaymentMeans { + @XmlPath("cbc:PaymentMeansCode/text()") + private String paymentMeansCode; + + @XmlPath("cac:PayeeFinancialAccount/cbc:ID/text()") + private String payeeFinancialAccount_id; + } + + @Data + @NoArgsConstructor + public static class PaymentTerms { + @XmlPath("cbc:ID/text()") + private String id; + + @XmlPath("cbc:PaymentMeansID/text()") + private String paymentMeansID; + + @XmlPath("cbc:Amount/text()") + private BigDecimal amount; + + @XmlPath("cbc:PaymentDueDate/text()") + private LocalDate paymentDueDate; + + @XmlPath("cbc:PaymentPercent/text()") + private BigDecimal paymentPercent; + } + + @Data + @NoArgsConstructor + public static class PrepaidPayment { + @XmlPath("cbc:ID/text()") + private String id; + + @XmlPath("cbc:PaidAmount/text()") + private BigDecimal paidAmount; + } + + @Data + @NoArgsConstructor + public static class AllowanceCharge { + @XmlPath("cbc:ChargeIndicator/text()") + private Boolean chargeIndicator; + + @XmlPath("cbc:AllowanceChargeReasonCode/text()") + private String allowanceChargeReasonCode; + + @XmlPath("cbc:MultiplierFactorNumeric/text()") + private BigDecimal multiplierFactorNumeric; + + @XmlPath("cbc:Amount/text()") + private BigDecimal amount; + + @XmlPath("cbc:BaseAmount/text()") + private BigDecimal baseAmount; + } + + @Data + @NoArgsConstructor + public static class TaxTotal { + @XmlPath("cbc:TaxAmount/text()") + BigDecimal taxAmount; + + @XmlPath("cac:TaxSubtotal") + List taxSubtotals; + } + + @Data + @NoArgsConstructor + public static class TaxSubtotal { + @XmlPath("cbc:TaxableAmount/text()") + private BigDecimal taxableAmount; + + @XmlPath("cbc:TaxAmount/text()") + private BigDecimal taxAmount; + + @XmlPath("cac:TaxCategory/cac:TaxScheme/cbc:ID/text()") + private String code; + } + + @Data + @NoArgsConstructor + public static class MonetaryTotal { + @XmlPath("cbc:LineExtensionAmount/text()") + private BigDecimal lineExtensionAmount; + + @XmlPath("cbc:TaxInclusiveAmount/text()") + private BigDecimal taxInclusiveAmount; + + @XmlPath("cbc:AllowanceTotalAmount/text()") + private BigDecimal allowanceTotalAmount; + + @XmlPath("cbc:PrepaidAmount/text()") + private BigDecimal prepaidAmount; + + @XmlPath("cbc:PayableAmount/text()") + private BigDecimal payableAmount; + } + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocumentLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocumentLine.java new file mode 100644 index 00000000..b162ab0b --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocumentLine.java @@ -0,0 +1,68 @@ +package io.github.project.openubl.xbuilder.content.unmarshall; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +import java.math.BigDecimal; +import java.util.List; + +@Data +@NoArgsConstructor +public class XMLSalesDocumentLine { + private BigDecimal quantity; + private String quantity_unitCode; + + @XmlPath("cbc:LineExtensionAmount/text()") + private BigDecimal lineExtensionAmount; + + @XmlPath("cac:PricingReference/cac:AlternativeConditionPrice/cbc:PriceAmount/text()") + private BigDecimal alternativeConditionPrice_priceAmount; + + @XmlPath("cac:PricingReference/cac:AlternativeConditionPrice/cbc:PriceTypeCode/text()") + private String alternativeConditionPrice_priceTypeCode; + + @XmlPath("cac:TaxTotal") + private TaxTotalLine taxTotal; + + @XmlPath("cac:Item/cbc:Description/text()") + private String description; + + @XmlPath("cac:Price/cbc:PriceAmount/text()") + private BigDecimal priceAmount; + + @Data + @NoArgsConstructor + public static class TaxTotalLine { + @XmlPath("cbc:TaxAmount/text()") + BigDecimal taxAmount; + + @XmlPath("cac:TaxSubtotal") + List taxSubtotals; + } + + @Data + @NoArgsConstructor + public static class TaxSubtotalLine { + @XmlPath("cbc:TaxableAmount/text()") + private BigDecimal taxableAmount; + + @XmlPath("cbc:TaxAmount/text()") + private BigDecimal taxAmount; + + @XmlPath("cac:TaxCategory/cbc:Percent/text()") + private BigDecimal percent; + + @XmlPath("cac:TaxCategory/cbc:TierRange/text()") + private String tierRange; + + @XmlPath("cac:TaxCategory/cbc:PerUnitAmount/text()") + private BigDecimal perUnitAmount; + + @XmlPath("cac:TaxCategory/cbc:TaxExemptionReasonCode/text()") + private String taxExemptionReasonCode; + + @XmlPath("cac:TaxCategory/cac:TaxScheme/cbc:ID/text()") + private String code; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/rules/enrich/body/detalle/TasaIcbRule.java b/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/rules/enrich/body/detalle/TasaIcbRule.java new file mode 100644 index 00000000..62f69bb9 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/rules/enrich/body/detalle/TasaIcbRule.java @@ -0,0 +1,48 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.detalle; + +import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; +import io.github.project.openubl.xbuilder.enricher.kie.AbstractBodyRule; +import io.github.project.openubl.xbuilder.enricher.kie.RulePhase; + +import java.math.BigDecimal; +import java.util.function.Consumer; + +import static io.github.project.openubl.xbuilder.enricher.kie.rules.utils.Helpers.isSalesDocumentItem; +import static io.github.project.openubl.xbuilder.enricher.kie.rules.utils.Helpers.whenSalesDocumentItem; + +@RulePhase(type = RulePhase.PhaseType.ENRICH) +public class TasaIcbRule extends AbstractBodyRule { + + @Override + public boolean test(Object object) { + return (isSalesDocumentItem.test(object) && whenSalesDocumentItem.apply(object) + .map(documento -> documento.getTasaIcb() == null) + .orElse(false) + ); + } + + @Override + public void modify(Object object) { + Consumer consumer = detalle -> { + BigDecimal tasaIcb = getRuleContext().getTasaIcb(); + detalle.setTasaIcb(tasaIcb); + }; + whenSalesDocumentItem.apply(object).ifPresent(consumer); + } +} diff --git a/core/src/main/resources/META-INF/services/io.github.project.openubl.xbuilder.enricher.kie.RuleFactory b/core/src/main/resources/META-INF/services/io.github.project.openubl.xbuilder.enricher.kie.RuleFactory index d9a49edc..4f48e915 100644 --- a/core/src/main/resources/META-INF/services/io.github.project.openubl.xbuilder.enricher.kie.RuleFactory +++ b/core/src/main/resources/META-INF/services/io.github.project.openubl.xbuilder.enricher.kie.RuleFactory @@ -44,6 +44,7 @@ io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.detalle.Unidad io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.detalle.IgvTipoRule io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.detalle.IscTipoRule io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.detalle.PrecioDeReferenciaTipoRule +io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.detalle.TasaIcbRule io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.detalle.TasaIgvRule io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.detalle.TasaIscRule diff --git a/core/src/main/resources/jaxb/xml-bindings/credit-note.xml b/core/src/main/resources/jaxb/xml-bindings/credit-note.xml new file mode 100644 index 00000000..7a26c4ec --- /dev/null +++ b/core/src/main/resources/jaxb/xml-bindings/credit-note.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/src/main/resources/jaxb/xml-bindings/debit-note.xml b/core/src/main/resources/jaxb/xml-bindings/debit-note.xml new file mode 100644 index 00000000..56601ea3 --- /dev/null +++ b/core/src/main/resources/jaxb/xml-bindings/debit-note.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/src/main/resources/jaxb/xml-bindings/invoice.xml b/core/src/main/resources/jaxb/xml-bindings/invoice.xml new file mode 100644 index 00000000..7f0c03d8 --- /dev/null +++ b/core/src/main/resources/jaxb/xml-bindings/invoice.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/src/main/resources/templates/Renderer/invoice.xml b/core/src/main/resources/templates/Renderer/invoice.xml index 005399f1..fa3ac8d4 100644 --- a/core/src/main/resources/templates/Renderer/invoice.xml +++ b/core/src/main/resources/templates/Renderer/invoice.xml @@ -8,9 +8,11 @@ {fechaVencimiento} {/if} {tipoComprobante} + {#if leyendas} {#for key in leyendas.keySet} {/for} + {/if} {#if observaciones} {/if} diff --git a/core/src/main/resources/templates/ubl/standard/include/document-line.xml b/core/src/main/resources/templates/ubl/standard/include/document-line.xml index 479e8d4b..762dafc4 100644 --- a/core/src/main/resources/templates/ubl/standard/include/document-line.xml +++ b/core/src/main/resources/templates/ubl/standard/include/document-line.xml @@ -45,7 +45,7 @@ {item.icb.scale(2)} {item.cantidad} - {tasaIcb.scale(2)} + {item.tasaIcb.scale(2)} 7152 ICBPER diff --git a/core/src/test/java/e2e/renderer/XMLAssertUtils.java b/core/src/test/java/e2e/renderer/XMLAssertUtils.java index 2ed9e696..d215afed 100644 --- a/core/src/test/java/e2e/renderer/XMLAssertUtils.java +++ b/core/src/test/java/e2e/renderer/XMLAssertUtils.java @@ -133,6 +133,11 @@ public static void assertSnapshot(String expected, Class clasz, String snapsh assertFalse(myDiff.hasDifferences(), expected + "\n" + myDiff); } + public static void assertSnapshot(String expected, String expectedReverse, Class clasz, String snapshotFile) throws SAXException { + assertSnapshot(expected, clasz, snapshotFile); + assertSnapshot(expectedReverse, clasz, snapshotFile); + } + public static void assertSendSunat(String xmlWithoutSignature, String xsdSchema, String... allowedNotes) throws Exception { String skipSunat = System.getProperty("skipSunat", "false"); if (skipSunat != null && skipSunat.equals("false")) { diff --git a/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java b/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java index 6ba5ea9a..972136af 100644 --- a/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java +++ b/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java @@ -24,6 +24,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -78,8 +79,11 @@ public void testIsc_sistemaAlValor() throws Exception { Template template = TemplateProducer.getInstance().getCreditNote(); String xml = template.data(input).render(); + CreditNote inputFromXml = Unmarshall.unmarshallCreditNote(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "isc_sistemaAlValor.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "isc_sistemaAlValor.xml"); assertSendSunat(xml, XMLAssertUtils.CREDIT_NOTE_XSD); } diff --git a/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java b/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java index 21189a28..56f073d3 100644 --- a/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java +++ b/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java @@ -23,6 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -76,8 +77,11 @@ public void testInvoiceWithCustomUnidadMedida() throws Exception { Template template = TemplateProducer.getInstance().getCreditNote(); String xml = template.data(input).render(); + CreditNote inputFromXml = Unmarshall.unmarshallCreditNote(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "ordenDeCompra.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "ordenDeCompra.xml"); assertSendSunat(xml, XMLAssertUtils.CREDIT_NOTE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java b/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java index 36ad4fe4..c332ca91 100644 --- a/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java +++ b/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java @@ -23,6 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -75,8 +76,11 @@ public void testInvoiceWithCustomUnidadMedida() throws Exception { Template template = TemplateProducer.getInstance().getCreditNote(); String xml = template.data(input).render(); + CreditNote inputFromXml = Unmarshall.unmarshallCreditNote(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "MinData_RUC.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "MinData_RUC.xml"); assertSendSunat(xml, XMLAssertUtils.CREDIT_NOTE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java b/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java index b5bcd326..81f069fc 100644 --- a/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java +++ b/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java @@ -23,6 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -75,8 +76,11 @@ public void testInvoiceWithCustomUnidadMedida() throws Exception { Template template = TemplateProducer.getInstance().getDebitNote(); String xml = template.data(input).render(); + DebitNote inputFromXml = Unmarshall.unmarshallDebitNote(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "MinData_RUC.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "MinData_RUC.xml"); assertSendSunat(xml, XMLAssertUtils.DEBIT_NOTE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java index f1e78a49..9cccd88e 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java @@ -24,6 +24,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.Anticipo; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -72,8 +73,11 @@ public void testFechaVencimiento() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "minAnticipos.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "minAnticipos.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java index 3447aa10..eabac22b 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java @@ -25,6 +25,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.Descuento; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -70,8 +71,11 @@ public void descuentoGlobal() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "descuentoGlobal.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "descuentoGlobal.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -112,8 +116,11 @@ public void descuentoGlobal_tipo02() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "descuentoGlobal_tipo02.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "descuentoGlobal_tipo02.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -154,8 +161,11 @@ public void descuentoGlobal_tipo03() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "descuentoGlobal_tipo03.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "descuentoGlobal_tipo03.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java index 09161538..6585b100 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java @@ -25,6 +25,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.Detraccion; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -74,8 +75,11 @@ public void testFechaVencimiento() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "detraccion.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "detraccion.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java index b9eb513f..38d51a17 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java @@ -24,6 +24,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -72,8 +73,11 @@ public void testDireccionEntregaMin() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "direccionEntregaMin.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "direccionEntregaMin.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -126,8 +130,11 @@ public void testDireccionEntregaFull() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "direccionEntregaFull.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "direccionEntregaFull.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java index 20e9c247..dac5f096 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java @@ -25,6 +25,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoRelacionado; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -78,8 +79,11 @@ public void testDocumentoRelacionado() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "documentoRelacionado.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "documentoRelacionado.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java index b5680606..0dd59215 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java @@ -23,6 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -72,8 +73,11 @@ public void testFechaVencimiento() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "conFechaVencimiento.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "conFechaVencimiento.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java index 566ea88c..4c0e1947 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java @@ -25,6 +25,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.FormaDePago; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -74,8 +75,11 @@ public void testInvoiceWithFormaPagoContadoPorDefecto() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "sinFormaPago.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "sinFormaPago.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -130,8 +134,11 @@ public void testInvoiceWithFormaPagoCredito() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "conFormaPago.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "conFormaPago.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java index 48eb0975..7d6cdf5b 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java @@ -25,6 +25,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Guia; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -75,8 +76,11 @@ public void testGuiaConSerieT() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "guiaSerieT.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "guiaSerieT.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java index 41a9da4f..218fd652 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java @@ -25,6 +25,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -74,8 +75,11 @@ public void testIsc_sistemaAlValor() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "isc_sistemaAlValor.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "isc_sistemaAlValor.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -119,8 +123,11 @@ public void testIsc_aplicacionAlMontoFijo() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "isc_aplicacionAlMontoFijo.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "isc_aplicacionAlMontoFijo.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -164,8 +171,11 @@ public void testIsc_sistemaDePreciosDeVentalAlPublico() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "isc_sistemaDePreciosDeVentalAlPublico.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "isc_sistemaDePreciosDeVentalAlPublico.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -216,8 +226,11 @@ public void testIsc_precioConImpuestos() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "isc_precioConImpuestos.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "isc_precioConImpuestos.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -298,8 +311,11 @@ public void testIsc_mixedTipoIgv() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "isc_mixedTipoIgv.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "isc_mixedTipoIgv.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java b/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java index 8a3c65ce..fced9901 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java @@ -23,6 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -60,8 +61,11 @@ public void testInvoice_withPrecioUnitario() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "with-precioUnitario.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "with-precioUnitario.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -94,8 +98,11 @@ public void testInvoice_withPrecioConIgv() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "with-precioUnitarioConImpuestos.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "with-precioUnitarioConImpuestos.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -128,8 +135,11 @@ public void testInvoice_withPrecioUnitario_andICB() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "with-precioUnitario-ICB.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "with-precioUnitario-ICB.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -163,8 +173,11 @@ public void testInvoice_withPrecioConIgv_andICB() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "with-precioUnitario-conImpuestos-ICB.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "with-precioUnitario-conImpuestos-ICB.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java b/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java index 63f6a190..cbe931b0 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java @@ -19,12 +19,11 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.catalogs.Catalog7; -import io.github.project.openubl.xbuilder.content.catalogs.Catalog8; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -67,8 +66,11 @@ public void testCustomMoneda() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "customMoneda.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "customMoneda.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java index 8b92c641..22ce64a1 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java @@ -23,6 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -71,8 +72,11 @@ public void testFechaVencimiento() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "ordenDeCompra.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "ordenDeCompra.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java b/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java index 1f6d9af8..906e236c 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java @@ -24,6 +24,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; import io.github.project.openubl.xbuilder.content.models.standard.general.Percepcion; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -66,8 +67,11 @@ public void testFechaVencimiento() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), "percepcion.xml"); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "percepcion.xml"); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java index 7a46b4d4..9262e1b2 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java @@ -26,6 +26,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -81,8 +82,11 @@ public void testInvoiceWithCustomUnidadMedida() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "customUnidadMedida.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "customUnidadMedida.xml"); assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -129,8 +133,11 @@ public void testInvoiceWithCustomFechaEmision() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "customFechaEmision.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "customFechaEmision.xml"); assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -184,8 +191,11 @@ public void testInvoiceWithCustomClienteDireccionAndContacto() throws Exception Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "customClienteDireccionAndContacto.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "customClienteDireccionAndContacto.xml"); assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -239,8 +249,11 @@ public void testInvoiceWithCustomProveedorDireccionAndContacto() throws Exceptio Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "customProveedorDireccionAndContacto.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "customProveedorDireccionAndContacto.xml"); assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -287,8 +300,11 @@ public void testInvoiceWithCustomFirmante() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "customFirmante.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "customFirmante.xml"); assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -332,8 +348,11 @@ public void testInvoiceWithICB_precioUnitario() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "icb.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "icb.xml"); assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -379,8 +398,11 @@ public void testInvoiceWithICB_precioConIgv() throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "icb.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "icb.xml"); assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -423,8 +445,11 @@ public void testInvoiceWithCustomProveedor_direccionNotNullAndCodigoLocalNull() Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "customCodigoLocal.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "customCodigoLocal.xml"); assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java index 5f398911..e2cbfd25 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java @@ -24,6 +24,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -71,8 +72,11 @@ public void testInvoice(Catalog7 tipoIgv) throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "invoice_pu_" + tipoIgv + ".xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "invoice_pu_" + tipoIgv + ".xml"); assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -111,8 +115,11 @@ public void testInvoiceWithPrecionConImpuestos(Catalog7 tipoIgv) throws Exceptio Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "invoice_pr_" + tipoIgv + ".xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "invoice_pr_" + tipoIgv + ".xml"); assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -152,8 +159,11 @@ public void testInvoiceWithPrecionConImpuestosAndIcb(Catalog7 tipoIgv) throws Ex Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "invoice_pr_icb_" + tipoIgv + ".xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "invoice_pr_icb_" + tipoIgv + ".xml"); assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -199,8 +209,11 @@ public void testInvoiceWithPrecionConImpuestosAndIcbAndIsc(Catalog7 tipoIgv) thr Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "invoice_pr_icb_isc_" + tipoIgv + ".xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "invoice_pr_icb_isc_" + tipoIgv + ".xml"); assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } } From 973c06b84482613376b0275eb31cdcebffd7606e Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sat, 25 Feb 2023 08:09:10 +0100 Subject: [PATCH 02/19] Refactor packaging of unmarshall classes --- .../Unmarshall.java => jaxb/Mapper.java} | 196 ++---------------- .../xbuilder/content/jaxb/Unmarshall.java | 181 ++++++++++++++++ .../adapters}/LocalDateAdapter.java | 2 +- .../adapters}/LocalTimeAdapter.java | 2 +- .../models}/XMLSalesDocument.java | 2 +- .../models}/XMLSalesDocumentLine.java | 2 +- .../jaxb/xml-bindings/credit-note.xml | 10 +- .../jaxb/xml-bindings/debit-note.xml | 10 +- .../resources/jaxb/xml-bindings/invoice.xml | 10 +- .../creditnote/CreditNoteIscTest.java | 2 +- .../CreditNoteOrdenDeCompraTest.java | 2 +- .../renderer/creditnote/CreditNoteTest.java | 2 +- .../e2e/renderer/debitnote/DebitNoteTest.java | 2 +- .../invoice/InvoiceAnticiposTest.java | 2 +- .../invoice/InvoiceDescuentosTest.java | 2 +- .../invoice/InvoiceDetraccionTest.java | 2 +- .../invoice/InvoiceDireccionEntregaTest.java | 2 +- .../InvoiceDocumentoRelacionadoTest.java | 2 +- .../invoice/InvoiceFechaVencimientoTest.java | 2 +- .../invoice/InvoiceFormaPagoTest.java | 2 +- .../renderer/invoice/InvoiceGuiasTest.java | 2 +- .../e2e/renderer/invoice/InvoiceIscTest.java | 2 +- .../renderer/invoice/InvoiceIssue30Test.java | 2 +- .../e2e/renderer/invoice/InvoiceMoneda.java | 2 +- .../invoice/InvoiceOrdeDeCompraTest.java | 2 +- .../invoice/InvoicePercepcionTest.java | 2 +- .../e2e/renderer/invoice/InvoiceTest.java | 2 +- .../renderer/invoice/InvoiceTipoIgvTest.java | 2 +- 28 files changed, 234 insertions(+), 219 deletions(-) rename core/src/main/java/io/github/project/openubl/xbuilder/content/{unmarshall/Unmarshall.java => jaxb/Mapper.java} (68%) create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java rename core/src/main/java/io/github/project/openubl/xbuilder/content/{unmarshall => jaxb/adapters}/LocalDateAdapter.java (85%) rename core/src/main/java/io/github/project/openubl/xbuilder/content/{unmarshall => jaxb/adapters}/LocalTimeAdapter.java (85%) rename core/src/main/java/io/github/project/openubl/xbuilder/content/{unmarshall => jaxb/models}/XMLSalesDocument.java (99%) rename core/src/main/java/io/github/project/openubl/xbuilder/content/{unmarshall => jaxb/models}/XMLSalesDocumentLine.java (96%) diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/Unmarshall.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java similarity index 68% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/Unmarshall.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java index 6ec348f7..7ca0584f 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/Unmarshall.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java @@ -1,4 +1,4 @@ -package io.github.project.openubl.xbuilder.content.unmarshall; +package io.github.project.openubl.xbuilder.content.jaxb; import io.github.project.openubl.xbuilder.content.catalogs.Catalog; import io.github.project.openubl.xbuilder.content.catalogs.Catalog12; @@ -7,203 +7,37 @@ import io.github.project.openubl.xbuilder.content.catalogs.Catalog53_Anticipo; import io.github.project.openubl.xbuilder.content.catalogs.Catalog53_DescuentoGlobal; import io.github.project.openubl.xbuilder.content.catalogs.CatalogContadoCredito; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Contacto; import io.github.project.openubl.xbuilder.content.models.common.Direccion; -import io.github.project.openubl.xbuilder.content.models.common.Document; import io.github.project.openubl.xbuilder.content.models.common.Firmante; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.Anticipo; -import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.CuotaDePago; -import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.Descuento; import io.github.project.openubl.xbuilder.content.models.standard.general.Detraccion; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoRelacionado; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.FormaDePago; import io.github.project.openubl.xbuilder.content.models.standard.general.Guia; -import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.models.standard.general.Note; import io.github.project.openubl.xbuilder.content.models.standard.general.Percepcion; -import io.github.project.openubl.xbuilder.content.models.standard.general.SalesDocument; import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImporteInvoice; import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImporteNote; import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImpuestos; -import org.eclipse.persistence.jaxb.JAXBContextFactory; -import org.eclipse.persistence.jaxb.JAXBContextProperties; -import org.xml.sax.InputSource; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import java.io.IOException; -import java.io.InputStream; -import java.io.StringReader; + import java.math.BigDecimal; import java.math.RoundingMode; import java.util.ArrayList; import java.util.Collections; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.Optional; import java.util.stream.Collectors; -public class Unmarshall { - - public static Invoice unmarshallInvoice(String xml) throws JAXBException, IOException { - try ( - InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/invoice.xml"); - StringReader reader = new StringReader(xml); - ) { - XMLSalesDocument xmlSalesDocument = unmarshall(documentOXM, new InputSource(reader)); - Invoice.InvoiceBuilder builder = Invoice.builder(); - - enrichSalesDocument(xmlSalesDocument, builder); - - // Fecha de vencimiento - builder.fechaVencimiento(xmlSalesDocument.getDueDate()); - - // Tipo de comprobante - builder.tipoComprobante(xmlSalesDocument.getInvoiceTypeCode()); - - // Observaciones - if (xmlSalesDocument.getNotes() != null) { - xmlSalesDocument.getNotes().stream() - .filter(e -> e.getLanguageLocaleId() == null) - .findFirst().ifPresent(n -> { - builder.observaciones(n.getValue()); - }); - } - - // Tipo de operacion - builder.tipoOperacion(xmlSalesDocument.getInvoiceTypeCode_listID()); - - // Forma de pago - builder.formaDePago(mapFormaDePago(xmlSalesDocument.getPaymentTerms())); - - // Total importe - builder.totalImporte(mapTotalImporteInvoice(xmlSalesDocument.getMonetaryTotal())); - - // Direccion entrega - builder.direccionEntrega(mapDireccion(xmlSalesDocument.getDeliveryLocation())); - - // Detraccion - builder.detraccion(mapDetraccion(xmlSalesDocument.getPaymentMeans(), xmlSalesDocument.getPaymentTerms())); - - // Percepcion - builder.percepcion(mapPercepcion(xmlSalesDocument.getPaymentTerms(), xmlSalesDocument.getAllowanceCharges())); - - // Anticipos - builder.anticipos(mapAnticipos(xmlSalesDocument.getAdditionalDocumentReferences(), xmlSalesDocument.getPrepaidPayments(), xmlSalesDocument.getAllowanceCharges())); - - // Descuentos - builder.descuentos(mapDescuentos(xmlSalesDocument.getAllowanceCharges())); - - return builder.build(); - } - } - - public static CreditNote unmarshallCreditNote(String xml) throws JAXBException, IOException { - try ( - InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/credit-note.xml"); - StringReader reader = new StringReader(xml); - ) { - XMLSalesDocument xmlSalesDocument = unmarshall(documentOXM, new InputSource(reader)); - CreditNote.CreditNoteBuilder builder = CreditNote.builder(); - - enrichSalesDocument(xmlSalesDocument, builder); - enrichNote(xmlSalesDocument, builder); - - return builder.build(); - } - } - - public static DebitNote unmarshallDebitNote(String xml) throws JAXBException, IOException { - try ( - InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/debit-note.xml"); - StringReader reader = new StringReader(xml); - ) { - XMLSalesDocument xmlSalesDocument = unmarshall(documentOXM, new InputSource(reader)); - DebitNote.DebitNoteBuilder builder = DebitNote.builder(); - - enrichSalesDocument(xmlSalesDocument, builder); - enrichNote(xmlSalesDocument, builder); - - return builder.build(); - } - } - - public static void enrichNote(XMLSalesDocument xmlSalesDocument, Note.NoteBuilder builder) { - enrichDocument(xmlSalesDocument, builder); - - // ComprobanteAfectado - builder.comprobanteAfectadoSerieNumero(xmlSalesDocument.getDiscrepancyResponse_referenceId()); - builder.comprobanteAfectadoTipo(xmlSalesDocument.getDiscrepancyResponse_responseCode()); - builder.sustentoDescripcion(xmlSalesDocument.getDiscrepancyResponse_description()); - - // Total importe - builder.totalImporte(mapTotalImporteNote(xmlSalesDocument.getMonetaryTotal())); - } - - public static T unmarshall(InputStream documentOXML, InputSource inputSource) throws JAXBException { - Map properties = new HashMap<>(); - properties.put(JAXBContextProperties.OXM_METADATA_SOURCE, List.of( - Objects.requireNonNull(documentOXML) - )); - - JAXBContext jaxbContext = JAXBContextFactory.createContext(Unmarshall.class.getPackageName(), null, properties); - Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); - return (T) unmarshaller.unmarshal(inputSource); - } - - public static void enrichSalesDocument(XMLSalesDocument xmlSalesDocument, SalesDocument.SalesDocumentBuilder builder) { - enrichDocument(xmlSalesDocument, builder); - - // Leyendas - Optional> notes = Optional - .ofNullable(xmlSalesDocument.getNotes()) - .map(o -> o.stream() - .filter(note -> note.getLanguageLocaleId() != null) - .collect(Collectors.toMap(XMLSalesDocument.Note::getLanguageLocaleId, XMLSalesDocument.Note::getValue)) - ); - notes.ifPresent(builder::leyendas); - - // Serie y numero - String[] split = xmlSalesDocument.getDocumentId().split("-"); - if (split.length == 2) { - builder.serie(split[0]); - builder.numero(Integer.parseInt(split[1])); - } - - // - builder.horaEmision(xmlSalesDocument.getIssueTime()); - builder.ordenDeCompra(xmlSalesDocument.getOrderReferenceId()); - - // Cliente - builder.cliente(mapCliente(xmlSalesDocument.getAccountingCustomerParty())); - - // Total impuestos - builder.totalImpuestos(mapTotalImpuestos(xmlSalesDocument.getTaxTotal())); - - // Guias - builder.guias(mapGuias(xmlSalesDocument.getDespatchDocumentReferences())); - - // Documentos relacionados - builder.documentosRelacionados(mapDocumentosRelacionados(xmlSalesDocument.getAdditionalDocumentReferences())); - - // Detalles - builder.detalles(mapDetalles(xmlSalesDocument.getLines())); - } - - public static void enrichDocument(XMLSalesDocument xmlSalesDocument, Document.DocumentBuilder builder) { - builder.moneda(xmlSalesDocument.getDocumentCurrencyCode()); - builder.fechaEmision(xmlSalesDocument.getIssueDate()); - builder.proveedor(mapProveedor(xmlSalesDocument.getAccountingSupplierParty())); - builder.firmante(mapFirmante(xmlSalesDocument.getSignature())); - } +public class Mapper { public static BigDecimal mapPorcentaje(BigDecimal number) { return Optional.ofNullable(number) @@ -351,7 +185,7 @@ public static List mapGuias(List mapDocumentosRelacionados(List additionalDocumentReferences) { + public static List mapDocumentosRelacionados(List additionalDocumentReferences) { if (additionalDocumentReferences == null) { return Collections.emptyList(); } @@ -372,7 +206,7 @@ private static List mapDocumentosRelacionados(List mapDetalles(List lines) { + public static List mapDetalles(List lines) { if (lines == null) { return Collections.emptyList(); } @@ -430,7 +264,7 @@ private static List mapDetalles(List paymentTerms) { + public static FormaDePago mapFormaDePago(List paymentTerms) { if (paymentTerms == null) { return null; } @@ -466,7 +300,7 @@ private static FormaDePago mapFormaDePago(List pa .build(); } - private static TotalImporteInvoice mapTotalImporteInvoice(XMLSalesDocument.MonetaryTotal monetaryTotal) { + public static TotalImporteInvoice mapTotalImporteInvoice(XMLSalesDocument.MonetaryTotal monetaryTotal) { if (monetaryTotal == null) { return null; } @@ -480,7 +314,7 @@ private static TotalImporteInvoice mapTotalImporteInvoice(XMLSalesDocument.Monet .build(); } - private static TotalImporteNote mapTotalImporteNote(XMLSalesDocument.MonetaryTotal monetaryTotal) { + public static TotalImporteNote mapTotalImporteNote(XMLSalesDocument.MonetaryTotal monetaryTotal) { if (monetaryTotal == null) { return null; } @@ -492,7 +326,7 @@ private static TotalImporteNote mapTotalImporteNote(XMLSalesDocument.MonetaryTot .build(); } - private static Detraccion mapDetraccion(XMLSalesDocument.PaymentMeans paymentMeans, List paymentTerms) { + public static Detraccion mapDetraccion(XMLSalesDocument.PaymentMeans paymentMeans, List paymentTerms) { if (paymentMeans == null || paymentTerms == null) { return null; } @@ -513,7 +347,7 @@ private static Detraccion mapDetraccion(XMLSalesDocument.PaymentMeans paymentMea return builder.build(); } - private static Percepcion mapPercepcion(List paymentTerms, List allowanceCharges) { + public static Percepcion mapPercepcion(List paymentTerms, List allowanceCharges) { if (paymentTerms == null || allowanceCharges == null) { return null; } @@ -543,7 +377,7 @@ private static Percepcion mapPercepcion(List paym return builder.build(); } - private static List mapAnticipos(List additionalDocumentReferences, List prepaidPayments, List allowanceCharges) { + public static List mapAnticipos(List additionalDocumentReferences, List prepaidPayments, List allowanceCharges) { if (additionalDocumentReferences == null || prepaidPayments == null || allowanceCharges == null) { return Collections.emptyList(); } @@ -582,7 +416,7 @@ private static List mapAnticipos(List mapDescuentos(List allowanceCharges) { + public static List mapDescuentos(List allowanceCharges) { if (allowanceCharges == null) { return Collections.emptyList(); } @@ -602,5 +436,5 @@ private static List mapDescuentos(List builder = Invoice.builder(); + + enrichSalesDocument(xmlSalesDocument, builder); + + // Fecha de vencimiento + builder.fechaVencimiento(xmlSalesDocument.getDueDate()); + + // Tipo de comprobante + builder.tipoComprobante(xmlSalesDocument.getInvoiceTypeCode()); + + // Observaciones + if (xmlSalesDocument.getNotes() != null) { + xmlSalesDocument.getNotes().stream() + .filter(e -> e.getLanguageLocaleId() == null) + .findFirst().ifPresent(n -> { + builder.observaciones(n.getValue()); + }); + } + + // Tipo de operacion + builder.tipoOperacion(xmlSalesDocument.getInvoiceTypeCode_listID()); + + // Forma de pago + builder.formaDePago(Mapper.mapFormaDePago(xmlSalesDocument.getPaymentTerms())); + + // Total importe + builder.totalImporte(Mapper.mapTotalImporteInvoice(xmlSalesDocument.getMonetaryTotal())); + + // Direccion entrega + builder.direccionEntrega(Mapper.mapDireccion(xmlSalesDocument.getDeliveryLocation())); + + // Detraccion + builder.detraccion(Mapper.mapDetraccion(xmlSalesDocument.getPaymentMeans(), xmlSalesDocument.getPaymentTerms())); + + // Percepcion + builder.percepcion(Mapper.mapPercepcion(xmlSalesDocument.getPaymentTerms(), xmlSalesDocument.getAllowanceCharges())); + + // Anticipos + builder.anticipos(Mapper.mapAnticipos(xmlSalesDocument.getAdditionalDocumentReferences(), xmlSalesDocument.getPrepaidPayments(), xmlSalesDocument.getAllowanceCharges())); + + // Descuentos + builder.descuentos(Mapper.mapDescuentos(xmlSalesDocument.getAllowanceCharges())); + + return builder.build(); + } + } + + public static CreditNote unmarshallCreditNote(String xml) throws JAXBException, IOException { + try ( + InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/credit-note.xml"); + StringReader reader = new StringReader(xml); + ) { + XMLSalesDocument xmlSalesDocument = unmarshall(documentOXM, new InputSource(reader)); + CreditNote.CreditNoteBuilder builder = CreditNote.builder(); + + enrichSalesDocument(xmlSalesDocument, builder); + enrichNote(xmlSalesDocument, builder); + + return builder.build(); + } + } + + public static DebitNote unmarshallDebitNote(String xml) throws JAXBException, IOException { + try ( + InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/debit-note.xml"); + StringReader reader = new StringReader(xml); + ) { + XMLSalesDocument xmlSalesDocument = unmarshall(documentOXM, new InputSource(reader)); + DebitNote.DebitNoteBuilder builder = DebitNote.builder(); + + enrichSalesDocument(xmlSalesDocument, builder); + enrichNote(xmlSalesDocument, builder); + + return builder.build(); + } + } + + public static T unmarshall(InputStream documentOXML, InputSource inputSource) throws JAXBException { + Map properties = new HashMap<>(); + properties.put(JAXBContextProperties.OXM_METADATA_SOURCE, List.of( + Objects.requireNonNull(documentOXML) + )); + + JAXBContext jaxbContext = JAXBContextFactory.createContext(Unmarshall.class.getPackageName(), null, properties); + Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); + return (T) unmarshaller.unmarshal(inputSource); + } + + public static void enrichSalesDocument(XMLSalesDocument xmlSalesDocument, SalesDocument.SalesDocumentBuilder builder) { + enrichDocument(xmlSalesDocument, builder); + + // Leyendas + Optional> notes = Optional + .ofNullable(xmlSalesDocument.getNotes()) + .map(o -> o.stream() + .filter(note -> note.getLanguageLocaleId() != null) + .collect(Collectors.toMap(XMLSalesDocument.Note::getLanguageLocaleId, XMLSalesDocument.Note::getValue)) + ); + notes.ifPresent(builder::leyendas); + + // Serie y numero + String[] split = xmlSalesDocument.getDocumentId().split("-"); + if (split.length == 2) { + builder.serie(split[0]); + builder.numero(Integer.parseInt(split[1])); + } + + // + builder.horaEmision(xmlSalesDocument.getIssueTime()); + builder.ordenDeCompra(xmlSalesDocument.getOrderReferenceId()); + + // Cliente + builder.cliente(Mapper.mapCliente(xmlSalesDocument.getAccountingCustomerParty())); + + // Total impuestos + builder.totalImpuestos(Mapper.mapTotalImpuestos(xmlSalesDocument.getTaxTotal())); + + // Guias + builder.guias(Mapper.mapGuias(xmlSalesDocument.getDespatchDocumentReferences())); + + // Documentos relacionados + builder.documentosRelacionados(Mapper.mapDocumentosRelacionados(xmlSalesDocument.getAdditionalDocumentReferences())); + + // Detalles + builder.detalles(Mapper.mapDetalles(xmlSalesDocument.getLines())); + } + + public static void enrichNote(XMLSalesDocument xmlSalesDocument, Note.NoteBuilder builder) { + enrichDocument(xmlSalesDocument, builder); + + // ComprobanteAfectado + builder.comprobanteAfectadoSerieNumero(xmlSalesDocument.getDiscrepancyResponse_referenceId()); + builder.comprobanteAfectadoTipo(xmlSalesDocument.getDiscrepancyResponse_responseCode()); + builder.sustentoDescripcion(xmlSalesDocument.getDiscrepancyResponse_description()); + + // Total importe + builder.totalImporte(Mapper.mapTotalImporteNote(xmlSalesDocument.getMonetaryTotal())); + } + + public static void enrichDocument(XMLSalesDocument xmlSalesDocument, Document.DocumentBuilder builder) { + builder.moneda(xmlSalesDocument.getDocumentCurrencyCode()); + builder.fechaEmision(xmlSalesDocument.getIssueDate()); + builder.proveedor(Mapper.mapProveedor(xmlSalesDocument.getAccountingSupplierParty())); + builder.firmante(Mapper.mapFirmante(xmlSalesDocument.getSignature())); + } + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalDateAdapter.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalDateAdapter.java similarity index 85% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalDateAdapter.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalDateAdapter.java index fb08a9e1..bb8e6bf6 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalDateAdapter.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalDateAdapter.java @@ -1,4 +1,4 @@ -package io.github.project.openubl.xbuilder.content.unmarshall; +package io.github.project.openubl.xbuilder.content.jaxb.adapters; import javax.xml.bind.annotation.adapters.XmlAdapter; import java.time.LocalDate; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalTimeAdapter.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalTimeAdapter.java similarity index 85% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalTimeAdapter.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalTimeAdapter.java index a02b4df2..54b5a99a 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/LocalTimeAdapter.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalTimeAdapter.java @@ -1,4 +1,4 @@ -package io.github.project.openubl.xbuilder.content.unmarshall; +package io.github.project.openubl.xbuilder.content.jaxb.adapters; import javax.xml.bind.annotation.adapters.XmlAdapter; import java.time.LocalTime; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java similarity index 99% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocument.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java index 549e7d5a..1132372f 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocument.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java @@ -1,4 +1,4 @@ -package io.github.project.openubl.xbuilder.content.unmarshall; +package io.github.project.openubl.xbuilder.content.jaxb.models; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocumentLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java similarity index 96% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocumentLine.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java index b162ab0b..1bb364f6 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/unmarshall/XMLSalesDocumentLine.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java @@ -1,4 +1,4 @@ -package io.github.project.openubl.xbuilder.content.unmarshall; +package io.github.project.openubl.xbuilder.content.jaxb.models; import lombok.Data; import lombok.NoArgsConstructor; diff --git a/core/src/main/resources/jaxb/xml-bindings/credit-note.xml b/core/src/main/resources/jaxb/xml-bindings/credit-note.xml index 7a26c4ec..29a663d3 100644 --- a/core/src/main/resources/jaxb/xml-bindings/credit-note.xml +++ b/core/src/main/resources/jaxb/xml-bindings/credit-note.xml @@ -1,5 +1,5 @@ - + @@ -7,16 +7,16 @@ - - + + - - + + diff --git a/core/src/main/resources/jaxb/xml-bindings/debit-note.xml b/core/src/main/resources/jaxb/xml-bindings/debit-note.xml index 56601ea3..7acd3982 100644 --- a/core/src/main/resources/jaxb/xml-bindings/debit-note.xml +++ b/core/src/main/resources/jaxb/xml-bindings/debit-note.xml @@ -1,5 +1,5 @@ - + @@ -7,16 +7,16 @@ - - + + - - + + diff --git a/core/src/main/resources/jaxb/xml-bindings/invoice.xml b/core/src/main/resources/jaxb/xml-bindings/invoice.xml index 7f0c03d8..30431553 100644 --- a/core/src/main/resources/jaxb/xml-bindings/invoice.xml +++ b/core/src/main/resources/jaxb/xml-bindings/invoice.xml @@ -1,5 +1,5 @@ - + @@ -7,16 +7,16 @@ - - + + - - + + diff --git a/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java b/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java index 972136af..adebe7b9 100644 --- a/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java +++ b/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java @@ -24,7 +24,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java b/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java index 56f073d3..35a31f15 100644 --- a/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java +++ b/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java @@ -23,7 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java b/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java index c332ca91..8a50cd7c 100644 --- a/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java +++ b/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java @@ -23,7 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java b/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java index 81f069fc..111bee81 100644 --- a/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java +++ b/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java @@ -23,7 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java index 9cccd88e..82ddba63 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java @@ -24,7 +24,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.Anticipo; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java index eabac22b..53be8888 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java @@ -25,7 +25,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.Descuento; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java index 6585b100..3cfe7441 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java @@ -25,7 +25,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.Detraccion; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java index 38d51a17..8f408d0b 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java @@ -24,7 +24,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java index dac5f096..222f5d76 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java @@ -25,7 +25,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoRelacionado; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java index 0dd59215..8a3aeea2 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java @@ -23,7 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java index 4c0e1947..e61a32a0 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java @@ -25,7 +25,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.FormaDePago; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java index 7d6cdf5b..e943d0bd 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java @@ -25,7 +25,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Guia; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java index 218fd652..3dc2e867 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java @@ -25,7 +25,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java b/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java index fced9901..ccf8fd9a 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java @@ -23,7 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java b/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java index cbe931b0..d966718a 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java @@ -23,7 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java index 22ce64a1..0e168adb 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java @@ -23,7 +23,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java b/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java index 906e236c..303190fd 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java @@ -24,7 +24,7 @@ import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; import io.github.project.openubl.xbuilder.content.models.standard.general.Percepcion; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java index 9262e1b2..76369aab 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java @@ -26,7 +26,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java index e2cbfd25..27f29919 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java @@ -24,7 +24,7 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.unmarshall.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; From 96bf9090e87438617ecbf4102ada50d45d20bd2d Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sat, 25 Feb 2023 10:48:16 +0100 Subject: [PATCH 03/19] Add perception and retention to jaxb-pojo --- .../openubl/xbuilder/content/jaxb/Mapper.java | 31 ++- .../xbuilder/content/jaxb/Unmarshall.java | 190 ++++++++++++++++-- .../jaxb/adapters/LocalDateAdapter.java | 16 ++ .../jaxb/adapters/LocalTimeAdapter.java | 16 ++ .../xbuilder/content/jaxb/models/Address.java | 49 +++++ .../xbuilder/content/jaxb/models/Contact.java | 31 +++ .../content/jaxb/models/Customer.java | 41 ++++ .../content/jaxb/models/Signature.java | 31 +++ .../content/jaxb/models/Supplier.java | 40 ++++ .../jaxb/models/XMLPercepcionRetencion.java | 61 ++++++ .../XMLPercepcionRetencionInformation.java | 46 +++++ ...epcionRetencionSunatDocumentReference.java | 55 +++++ .../content/jaxb/models/XMLSalesDocument.java | 102 ++-------- .../jaxb/models/XMLSalesDocumentLine.java | 16 ++ .../jaxb/xml-bindings/perception.xml | 37 ++++ .../resources/jaxb/xml-bindings/retention.xml | 37 ++++ .../renderer/perception/PerceptionTest.java | 7 +- .../e2e/renderer/retention/RetentionTest.java | 7 +- 18 files changed, 700 insertions(+), 113 deletions(-) create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Address.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Contact.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Customer.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Signature.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Supplier.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionInformation.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReference.java create mode 100644 core/src/main/resources/jaxb/xml-bindings/perception.xml create mode 100644 core/src/main/resources/jaxb/xml-bindings/retention.xml diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java index 7ca0584f..d7304321 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb; import io.github.project.openubl.xbuilder.content.catalogs.Catalog; @@ -7,6 +23,11 @@ import io.github.project.openubl.xbuilder.content.catalogs.Catalog53_Anticipo; import io.github.project.openubl.xbuilder.content.catalogs.Catalog53_DescuentoGlobal; import io.github.project.openubl.xbuilder.content.catalogs.CatalogContadoCredito; +import io.github.project.openubl.xbuilder.content.jaxb.models.Address; +import io.github.project.openubl.xbuilder.content.jaxb.models.Contact; +import io.github.project.openubl.xbuilder.content.jaxb.models.Customer; +import io.github.project.openubl.xbuilder.content.jaxb.models.Signature; +import io.github.project.openubl.xbuilder.content.jaxb.models.Supplier; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine; import io.github.project.openubl.xbuilder.content.models.common.Cliente; @@ -45,7 +66,7 @@ public static BigDecimal mapPorcentaje(BigDecimal number) { .orElse(null); } - public static Proveedor mapProveedor(XMLSalesDocument.Supplier supplier) { + public static Proveedor mapProveedor(Supplier supplier) { if (supplier == null) { return null; } @@ -59,7 +80,7 @@ public static Proveedor mapProveedor(XMLSalesDocument.Supplier supplier) { .build(); } - public static Cliente mapCliente(XMLSalesDocument.Customer customer) { + public static Cliente mapCliente(Customer customer) { if (customer == null) { return null; } @@ -73,7 +94,7 @@ public static Cliente mapCliente(XMLSalesDocument.Customer customer) { .build(); } - public static Direccion mapDireccion(XMLSalesDocument.Address address) { + public static Direccion mapDireccion(Address address) { if (address == null) { return null; } @@ -90,7 +111,7 @@ public static Direccion mapDireccion(XMLSalesDocument.Address address) { .build(); } - public static Contacto mapContacto(XMLSalesDocument.Contact contact) { + public static Contacto mapContacto(Contact contact) { if (contact == null) { return null; } @@ -101,7 +122,7 @@ public static Contacto mapContacto(XMLSalesDocument.Contact contact) { .build(); } - public static Firmante mapFirmante(XMLSalesDocument.Signature signature) { + public static Firmante mapFirmante(Signature signature) { if (signature == null) { return null; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java index cb67ef9b..ab75d940 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java @@ -1,12 +1,38 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencion; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionInformation; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionSunatDocumentReference; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; import io.github.project.openubl.xbuilder.content.models.common.Document; +import io.github.project.openubl.xbuilder.content.models.common.TipoCambio; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; import io.github.project.openubl.xbuilder.content.models.standard.general.Note; +import io.github.project.openubl.xbuilder.content.models.standard.general.Percepcion; import io.github.project.openubl.xbuilder.content.models.standard.general.SalesDocument; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.BasePercepcionRetencion; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.PercepcionRetencionOperacion; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Perception; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Retention; import org.eclipse.persistence.jaxb.JAXBContextFactory; import org.eclipse.persistence.jaxb.JAXBContextProperties; import org.xml.sax.InputSource; @@ -31,20 +57,20 @@ public static Invoice unmarshallInvoice(String xml) throws JAXBException, IOExce InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/invoice.xml"); StringReader reader = new StringReader(xml); ) { - XMLSalesDocument xmlSalesDocument = unmarshall(documentOXM, new InputSource(reader)); + XMLSalesDocument xmlDocument = unmarshall(documentOXM, new InputSource(reader)); Invoice.InvoiceBuilder builder = Invoice.builder(); - enrichSalesDocument(xmlSalesDocument, builder); + enrichSalesDocument(xmlDocument, builder); // Fecha de vencimiento - builder.fechaVencimiento(xmlSalesDocument.getDueDate()); + builder.fechaVencimiento(xmlDocument.getDueDate()); // Tipo de comprobante - builder.tipoComprobante(xmlSalesDocument.getInvoiceTypeCode()); + builder.tipoComprobante(xmlDocument.getInvoiceTypeCode()); // Observaciones - if (xmlSalesDocument.getNotes() != null) { - xmlSalesDocument.getNotes().stream() + if (xmlDocument.getNotes() != null) { + xmlDocument.getNotes().stream() .filter(e -> e.getLanguageLocaleId() == null) .findFirst().ifPresent(n -> { builder.observaciones(n.getValue()); @@ -52,28 +78,28 @@ public static Invoice unmarshallInvoice(String xml) throws JAXBException, IOExce } // Tipo de operacion - builder.tipoOperacion(xmlSalesDocument.getInvoiceTypeCode_listID()); + builder.tipoOperacion(xmlDocument.getInvoiceTypeCode_listID()); // Forma de pago - builder.formaDePago(Mapper.mapFormaDePago(xmlSalesDocument.getPaymentTerms())); + builder.formaDePago(Mapper.mapFormaDePago(xmlDocument.getPaymentTerms())); // Total importe - builder.totalImporte(Mapper.mapTotalImporteInvoice(xmlSalesDocument.getMonetaryTotal())); + builder.totalImporte(Mapper.mapTotalImporteInvoice(xmlDocument.getMonetaryTotal())); // Direccion entrega - builder.direccionEntrega(Mapper.mapDireccion(xmlSalesDocument.getDeliveryLocation())); + builder.direccionEntrega(Mapper.mapDireccion(xmlDocument.getDeliveryLocation())); // Detraccion - builder.detraccion(Mapper.mapDetraccion(xmlSalesDocument.getPaymentMeans(), xmlSalesDocument.getPaymentTerms())); + builder.detraccion(Mapper.mapDetraccion(xmlDocument.getPaymentMeans(), xmlDocument.getPaymentTerms())); // Percepcion - builder.percepcion(Mapper.mapPercepcion(xmlSalesDocument.getPaymentTerms(), xmlSalesDocument.getAllowanceCharges())); + builder.percepcion(Mapper.mapPercepcion(xmlDocument.getPaymentTerms(), xmlDocument.getAllowanceCharges())); // Anticipos - builder.anticipos(Mapper.mapAnticipos(xmlSalesDocument.getAdditionalDocumentReferences(), xmlSalesDocument.getPrepaidPayments(), xmlSalesDocument.getAllowanceCharges())); + builder.anticipos(Mapper.mapAnticipos(xmlDocument.getAdditionalDocumentReferences(), xmlDocument.getPrepaidPayments(), xmlDocument.getAllowanceCharges())); // Descuentos - builder.descuentos(Mapper.mapDescuentos(xmlSalesDocument.getAllowanceCharges())); + builder.descuentos(Mapper.mapDescuentos(xmlDocument.getAllowanceCharges())); return builder.build(); } @@ -84,11 +110,11 @@ public static CreditNote unmarshallCreditNote(String xml) throws JAXBException, InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/credit-note.xml"); StringReader reader = new StringReader(xml); ) { - XMLSalesDocument xmlSalesDocument = unmarshall(documentOXM, new InputSource(reader)); + XMLSalesDocument xmlDocument = unmarshall(documentOXM, new InputSource(reader)); CreditNote.CreditNoteBuilder builder = CreditNote.builder(); - enrichSalesDocument(xmlSalesDocument, builder); - enrichNote(xmlSalesDocument, builder); + enrichSalesDocument(xmlDocument, builder); + enrichNote(xmlDocument, builder); return builder.build(); } @@ -99,11 +125,77 @@ public static DebitNote unmarshallDebitNote(String xml) throws JAXBException, IO InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/debit-note.xml"); StringReader reader = new StringReader(xml); ) { - XMLSalesDocument xmlSalesDocument = unmarshall(documentOXM, new InputSource(reader)); + XMLSalesDocument xmlDocument = unmarshall(documentOXM, new InputSource(reader)); DebitNote.DebitNoteBuilder builder = DebitNote.builder(); - enrichSalesDocument(xmlSalesDocument, builder); - enrichNote(xmlSalesDocument, builder); + enrichSalesDocument(xmlDocument, builder); + enrichNote(xmlDocument, builder); + + return builder.build(); + } + } + + public static Perception unmarshallPerception(String xml) throws JAXBException, IOException { + try ( + InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/perception.xml"); + StringReader reader = new StringReader(xml); + ) { + XMLPercepcionRetencion xmlDocument = unmarshall(documentOXM, new InputSource(reader)); + Perception.PerceptionBuilder builder = Perception.builder(); + + enrichBasePercepcionRetencion(xmlDocument, builder); + + // Serie + String[] split = xmlDocument.getDocumentId().split("-"); + if (split.length == 2) { + builder.serie(split[0]); + } + + // Tipo de regimen + builder.tipoRegimen(xmlDocument.getSunatSystemCode()); + + // ImporteTotalPercibido, ImporteTotalCobrado + XMLPercepcionRetencionSunatDocumentReference sunatDocumentReference = xmlDocument.getSunatDocumentReference(); + if (sunatDocumentReference != null) { + XMLPercepcionRetencionInformation sunatInformation = sunatDocumentReference.getSunatInformation(); + if (sunatInformation != null) { + builder.importeTotalPercibido(sunatInformation.getSunatAmount()); + builder.importeTotalCobrado(sunatInformation.getSunatNetTotal()); + } + } + + return builder.build(); + } + } + + public static Retention unmarshallRetention(String xml) throws JAXBException, IOException { + try ( + InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/retention.xml"); + StringReader reader = new StringReader(xml); + ) { + XMLPercepcionRetencion xmlDocument = unmarshall(documentOXM, new InputSource(reader)); + Retention.RetentionBuilder builder = Retention.builder(); + + enrichBasePercepcionRetencion(xmlDocument, builder); + + // Serie + String[] split = xmlDocument.getDocumentId().split("-"); + if (split.length == 2) { + builder.serie(split[0]); + } + + // Tipo de regimen + builder.tipoRegimen(xmlDocument.getSunatSystemCode()); + + // ImporteTotalPercibido, ImporteTotalCobrado + XMLPercepcionRetencionSunatDocumentReference sunatDocumentReference = xmlDocument.getSunatDocumentReference(); + if (sunatDocumentReference != null) { + XMLPercepcionRetencionInformation sunatInformation = sunatDocumentReference.getSunatInformation(); + if (sunatInformation != null) { + builder.importeTotalRetenido(sunatInformation.getSunatAmount()); + builder.importeTotalPagado(sunatInformation.getSunatNetTotal()); + } + } return builder.build(); } @@ -178,4 +270,62 @@ public static void enrichDocument(XMLSalesDocument xmlSalesDocument, Document.Do builder.firmante(Mapper.mapFirmante(xmlSalesDocument.getSignature())); } + public static void enrichBasePercepcionRetencion(XMLPercepcionRetencion xmlDocument, BasePercepcionRetencion.BasePercepcionRetencionBuilder builder) { + enrichDocument(xmlDocument, builder); + + // Numero + String[] split = xmlDocument.getDocumentId().split("-"); + if (split.length == 2) { + builder.numero(Integer.parseInt(split[1])); + } + + // Tipo regimen porcentaje + builder.tipoRegimenPorcentaje(xmlDocument.getSunatPercent()); + + // Observacion + builder.observacion(xmlDocument.getNote()); + + // Cliente + builder.cliente(Mapper.mapCliente(xmlDocument.getAccountingCustomerParty())); + + // Operacion + XMLPercepcionRetencionSunatDocumentReference sunatDocumentReference = xmlDocument.getSunatDocumentReference(); + + if (sunatDocumentReference != null) { + XMLPercepcionRetencionInformation sunatInformation = sunatDocumentReference.getSunatInformation(); + + TipoCambio tipoCambio = null; + if (sunatInformation != null && sunatInformation.getExchangeRate() != null) { + tipoCambio = TipoCambio.builder() + .fecha(sunatInformation.getExchangeRate().getDate()) + .valor(sunatInformation.getExchangeRate().getCanculationRate()) + .build(); + } + + builder.operacion(PercepcionRetencionOperacion.builder() + .numeroOperacion(sunatDocumentReference.getPayment_id()) + .fechaOperacion(sunatDocumentReference.getPayment_paidDate()) + .importeOperacion(sunatDocumentReference.getPayment_paidAmount()) + .comprobante(ComprobanteAfectado.builder() + .moneda(sunatDocumentReference.getTotalInvoiceAmount_currencyId()) + .tipoComprobante(sunatDocumentReference.getId_schemeId()) + .serieNumero(sunatDocumentReference.getId()) + .fechaEmision(sunatDocumentReference.getIssueDate()) + .importeTotal(sunatDocumentReference.getTotalInvoiceAmount()) + .build() + ) + .tipoCambio(tipoCambio) + .build() + ); + } + + } + + public static void enrichDocument(XMLPercepcionRetencion xmlDocument, Document.DocumentBuilder builder) { + builder.moneda(xmlDocument.getTotalInvoiceAmount_currencyId()); + builder.fechaEmision(xmlDocument.getIssueDate()); + builder.proveedor(Mapper.mapProveedor(xmlDocument.getAccountingSupplierParty())); + builder.firmante(Mapper.mapFirmante(xmlDocument.getSignature())); + } + } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalDateAdapter.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalDateAdapter.java index bb8e6bf6..fc5d5769 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalDateAdapter.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalDateAdapter.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.adapters; import javax.xml.bind.annotation.adapters.XmlAdapter; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalTimeAdapter.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalTimeAdapter.java index 54b5a99a..1e1dcd9d 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalTimeAdapter.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/adapters/LocalTimeAdapter.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.adapters; import javax.xml.bind.annotation.adapters.XmlAdapter; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Address.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Address.java new file mode 100644 index 00000000..4c291c5e --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Address.java @@ -0,0 +1,49 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +@Data +@NoArgsConstructor +public class Address { + @XmlPath("cbc:ID/text()") + private String id; + + @XmlPath("cbc:AddressTypeCode/text()") + private String addressTypeCode; + + @XmlPath("cbc:CitySubdivisionName/text()") + private String citySubdivisionName; + + @XmlPath("cbc:CityName/text()") + private String cityName; + + @XmlPath("cbc:CountrySubentity/text()") + private String countrySubEntity; + + @XmlPath("cbc:District/text()") + private String district; + + @XmlPath("cac:AddressLine/cbc:Line/text()") + private String addressLine; + + @XmlPath("cac:Country/cbc:IdentificationCode/text()") + private String identificationCode; +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Contact.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Contact.java new file mode 100644 index 00000000..24fd2a3b --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Contact.java @@ -0,0 +1,31 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +@Data +@NoArgsConstructor +public class Contact { + @XmlPath("cbc:Telephone/text()") + private String telephone; + + @XmlPath("cbc:ElectronicMail/text()") + private String electronicMail; +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Customer.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Customer.java new file mode 100644 index 00000000..82b6dda8 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Customer.java @@ -0,0 +1,41 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +@Data +@NoArgsConstructor +public class Customer { + + @XmlPath("cac:PartyIdentification/cbc:ID/text()") + private String partyIdentification_id; + + @XmlPath("cac:PartyIdentification/cbc:ID/@schemeID") + private String partyIdentification_id_schemeId; + + @XmlPath("cac:PartyLegalEntity/cbc:RegistrationName/text()") + private String registrationName; + + @XmlPath("cac:PartyLegalEntity/cac:RegistrationAddress") + private Address address; + + @XmlPath("cac:Contact") + private Contact contact; +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Signature.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Signature.java new file mode 100644 index 00000000..75a6ca30 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Signature.java @@ -0,0 +1,31 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +@Data +@NoArgsConstructor +public class Signature { + @XmlPath("cbc:ID/text()") + private String id; + + @XmlPath("cac:SignatoryParty/cac:PartyName/cbc:Name/text()") + private String partyName; +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Supplier.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Supplier.java new file mode 100644 index 00000000..23c85fb9 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Supplier.java @@ -0,0 +1,40 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +@Data +@NoArgsConstructor +public class Supplier { + @XmlPath("cac:PartyIdentification/cbc:ID/text()") + private String partyIdentification_id; + + @XmlPath("cac:PartyName/cbc:Name/text()") + private String partyName; + + @XmlPath("cac:PartyLegalEntity/cbc:RegistrationName/text()") + private String registrationName; + + @XmlPath("cac:PartyLegalEntity/cac:RegistrationAddress") + private Address address; + + @XmlPath("cac:Contact") + private Contact contact; +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java new file mode 100644 index 00000000..cb568bdb --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java @@ -0,0 +1,61 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +import java.math.BigDecimal; +import java.time.LocalDate; + +@Data +@NoArgsConstructor +public class XMLPercepcionRetencion { + + @XmlPath("cbc:ID/text()") + private String documentId; + + @XmlPath("cbc:IssueDate/text()") + private LocalDate issueDate; + + private String sunatSystemCode; + private BigDecimal sunatPercent; + + @XmlPath("cbc:Note/text()") + private String note; + + @XmlPath("cbc:TotalInvoiceAmount/text()") + private BigDecimal totalInvoiceAmount; + + @XmlPath("cbc:TotalInvoiceAmount/@currencyID") + private String totalInvoiceAmount_currencyId; + + private BigDecimal sunatTotal; + + @XmlPath("cac:Signature") + private Signature signature; + + @XmlPath("cac:AgentParty") + private Supplier accountingSupplierParty; + + @XmlPath("cac:ReceiverParty") + private Customer accountingCustomerParty; + + private XMLPercepcionRetencionSunatDocumentReference sunatDocumentReference; + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionInformation.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionInformation.java new file mode 100644 index 00000000..814ea6ae --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionInformation.java @@ -0,0 +1,46 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +import java.math.BigDecimal; +import java.time.LocalDate; + +@Data +@NoArgsConstructor +public class XMLPercepcionRetencionInformation { + + private BigDecimal sunatAmount; + private LocalDate sunatDate; + private BigDecimal sunatNetTotal; + + @XmlPath("cac:ExchangeRate") + private ExchangeRate exchangeRate; + + @Data + @NoArgsConstructor + public static class ExchangeRate { + @XmlPath("cbc:CalculationRate/text()") + private BigDecimal canculationRate; + + @XmlPath("cbc:Date/text()") + private LocalDate date; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReference.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReference.java new file mode 100644 index 00000000..f4cc3dd3 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReference.java @@ -0,0 +1,55 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +import java.math.BigDecimal; +import java.time.LocalDate; + +@Data +@NoArgsConstructor +public class XMLPercepcionRetencionSunatDocumentReference { + + @XmlPath("cbc:ID/text()") + private String id; + + @XmlPath("cbc:ID/@schemeID") + private String id_schemeId; + + @XmlPath("cbc:IssueDate/text()") + private LocalDate issueDate; + + @XmlPath("cbc:TotalInvoiceAmount/text()") + private BigDecimal totalInvoiceAmount; + + @XmlPath("cbc:TotalInvoiceAmount/@currencyID") + private String totalInvoiceAmount_currencyId; + + @XmlPath("cac:Payment/cbc:ID/text()") + private Integer payment_id; + + @XmlPath("cac:Payment/cbc:PaidAmount/text()") + private BigDecimal payment_paidAmount; + + @XmlPath("cac:Payment/cbc:PaidDate/text()") + private LocalDate payment_paidDate; + + private XMLPercepcionRetencionInformation sunatInformation; +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java index 1132372f..c03c4f0b 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.models; import lombok.Data; @@ -125,92 +141,6 @@ public static class AdditionalDocumentReference { private String documentStatusCode; } - @Data - @NoArgsConstructor - public static class Signature { - @XmlPath("cbc:ID/text()") - private String id; - - @XmlPath("cac:SignatoryParty/cac:PartyName/cbc:Name/text()") - private String partyName; - } - - @Data - @NoArgsConstructor - public static class Address { - @XmlPath("cbc:ID/text()") - private String id; - - @XmlPath("cbc:AddressTypeCode/text()") - private String addressTypeCode; - - @XmlPath("cbc:CitySubdivisionName/text()") - private String citySubdivisionName; - - @XmlPath("cbc:CityName/text()") - private String cityName; - - @XmlPath("cbc:CountrySubentity/text()") - private String countrySubEntity; - - @XmlPath("cbc:District/text()") - private String district; - - @XmlPath("cac:AddressLine/cbc:Line/text()") - private String addressLine; - - @XmlPath("cac:Country/cbc:IdentificationCode/text()") - private String identificationCode; - } - - @Data - @NoArgsConstructor - public static class Contact { - @XmlPath("cbc:Telephone/text()") - private String telephone; - - @XmlPath("cbc:ElectronicMail/text()") - private String electronicMail; - } - - @Data - @NoArgsConstructor - public static class Supplier { - @XmlPath("cac:PartyIdentification/cbc:ID/text()") - private String partyIdentification_id; - - @XmlPath("cac:PartyName/cbc:Name/text()") - private String partyName; - - @XmlPath("cac:PartyLegalEntity/cbc:RegistrationName/text()") - private String registrationName; - - @XmlPath("cac:PartyLegalEntity/cac:RegistrationAddress") - private Address address; - - @XmlPath("cac:Contact") - private Contact contact; - } - - @Data - @NoArgsConstructor - public static class Customer { - @XmlPath("cac:PartyIdentification/cbc:ID/text()") - private String partyIdentification_id; - - @XmlPath("cac:PartyIdentification/cbc:ID/@schemeID") - private String partyIdentification_id_schemeId; - - @XmlPath("cac:PartyLegalEntity/cbc:RegistrationName/text()") - private String registrationName; - - @XmlPath("cac:PartyLegalEntity/cac:RegistrationAddress") - private Address address; - - @XmlPath("cac:Contact") - private Contact contact; - } - @Data @NoArgsConstructor public static class PaymentMeans { diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java index 1bb364f6..8dabaf90 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.models; import lombok.Data; diff --git a/core/src/main/resources/jaxb/xml-bindings/perception.xml b/core/src/main/resources/jaxb/xml-bindings/perception.xml new file mode 100644 index 00000000..120ace6f --- /dev/null +++ b/core/src/main/resources/jaxb/xml-bindings/perception.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/src/main/resources/jaxb/xml-bindings/retention.xml b/core/src/main/resources/jaxb/xml-bindings/retention.xml new file mode 100644 index 00000000..dcdb5fb1 --- /dev/null +++ b/core/src/main/resources/jaxb/xml-bindings/retention.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/src/test/java/e2e/renderer/perception/PerceptionTest.java b/core/src/test/java/e2e/renderer/perception/PerceptionTest.java index a80b29e9..51ed7acd 100644 --- a/core/src/test/java/e2e/renderer/perception/PerceptionTest.java +++ b/core/src/test/java/e2e/renderer/perception/PerceptionTest.java @@ -21,8 +21,10 @@ import io.github.project.openubl.xbuilder.content.catalogs.Catalog1; import io.github.project.openubl.xbuilder.content.catalogs.Catalog22; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; +import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.PercepcionRetencionOperacion; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Perception; @@ -84,8 +86,11 @@ public void testSimplePerception() throws Exception { Template template = TemplateProducer.getInstance().getPerception(); String xml = template.data(input).render(); + Perception inputFromXml = Unmarshall.unmarshallPerception(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "perception_simple.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "perception_simple.xml"); assertSendSunat(xml, XMLAssertUtils.PERCEPTION_XSD); } diff --git a/core/src/test/java/e2e/renderer/retention/RetentionTest.java b/core/src/test/java/e2e/renderer/retention/RetentionTest.java index 9c9c4338..75cb72ed 100644 --- a/core/src/test/java/e2e/renderer/retention/RetentionTest.java +++ b/core/src/test/java/e2e/renderer/retention/RetentionTest.java @@ -21,10 +21,12 @@ import io.github.project.openubl.xbuilder.content.catalogs.Catalog1; import io.github.project.openubl.xbuilder.content.catalogs.Catalog23; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.PercepcionRetencionOperacion; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Perception; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Retention; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; @@ -84,8 +86,11 @@ public void testSimplePerception() throws Exception { Template template = TemplateProducer.getInstance().getRetention(); String xml = template.data(input).render(); + Retention inputFromXml = Unmarshall.unmarshallRetention(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "retention_simple.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "retention_simple.xml"); assertSendSunat(xml, XMLAssertUtils.RETENTION_XSD); } From d5545183722c4ddaee530a3ea49dee9a1dccbfbc Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sat, 25 Feb 2023 10:50:52 +0100 Subject: [PATCH 04/19] Rename xml classes --- .../openubl/xbuilder/content/jaxb/Mapper.java | 20 +++++++++---------- .../models/{Address.java => XMLAddress.java} | 2 +- .../models/{Contact.java => XMLContact.java} | 2 +- .../{Customer.java => XMLCustomer.java} | 6 +++--- .../jaxb/models/XMLPercepcionRetencion.java | 6 +++--- .../content/jaxb/models/XMLSalesDocument.java | 8 ++++---- .../{Signature.java => XMLSignature.java} | 2 +- .../{Supplier.java => XMLSupplier.java} | 6 +++--- 8 files changed, 26 insertions(+), 26 deletions(-) rename core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/{Address.java => XMLAddress.java} (98%) rename core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/{Contact.java => XMLContact.java} (97%) rename core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/{Customer.java => XMLCustomer.java} (93%) rename core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/{Signature.java => XMLSignature.java} (97%) rename core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/{Supplier.java => XMLSupplier.java} (93%) diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java index d7304321..91f79d3c 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java @@ -23,11 +23,11 @@ import io.github.project.openubl.xbuilder.content.catalogs.Catalog53_Anticipo; import io.github.project.openubl.xbuilder.content.catalogs.Catalog53_DescuentoGlobal; import io.github.project.openubl.xbuilder.content.catalogs.CatalogContadoCredito; -import io.github.project.openubl.xbuilder.content.jaxb.models.Address; -import io.github.project.openubl.xbuilder.content.jaxb.models.Contact; -import io.github.project.openubl.xbuilder.content.jaxb.models.Customer; -import io.github.project.openubl.xbuilder.content.jaxb.models.Signature; -import io.github.project.openubl.xbuilder.content.jaxb.models.Supplier; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLAddress; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLContact; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLCustomer; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSignature; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplier; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine; import io.github.project.openubl.xbuilder.content.models.common.Cliente; @@ -66,7 +66,7 @@ public static BigDecimal mapPorcentaje(BigDecimal number) { .orElse(null); } - public static Proveedor mapProveedor(Supplier supplier) { + public static Proveedor mapProveedor(XMLSupplier supplier) { if (supplier == null) { return null; } @@ -80,7 +80,7 @@ public static Proveedor mapProveedor(Supplier supplier) { .build(); } - public static Cliente mapCliente(Customer customer) { + public static Cliente mapCliente(XMLCustomer customer) { if (customer == null) { return null; } @@ -94,7 +94,7 @@ public static Cliente mapCliente(Customer customer) { .build(); } - public static Direccion mapDireccion(Address address) { + public static Direccion mapDireccion(XMLAddress address) { if (address == null) { return null; } @@ -111,7 +111,7 @@ public static Direccion mapDireccion(Address address) { .build(); } - public static Contacto mapContacto(Contact contact) { + public static Contacto mapContacto(XMLContact contact) { if (contact == null) { return null; } @@ -122,7 +122,7 @@ public static Contacto mapContacto(Contact contact) { .build(); } - public static Firmante mapFirmante(Signature signature) { + public static Firmante mapFirmante(XMLSignature signature) { if (signature == null) { return null; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Address.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLAddress.java similarity index 98% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Address.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLAddress.java index 4c291c5e..bc786b49 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Address.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLAddress.java @@ -22,7 +22,7 @@ @Data @NoArgsConstructor -public class Address { +public class XMLAddress { @XmlPath("cbc:ID/text()") private String id; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Contact.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLContact.java similarity index 97% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Contact.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLContact.java index 24fd2a3b..f1e3f403 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Contact.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLContact.java @@ -22,7 +22,7 @@ @Data @NoArgsConstructor -public class Contact { +public class XMLContact { @XmlPath("cbc:Telephone/text()") private String telephone; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Customer.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCustomer.java similarity index 93% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Customer.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCustomer.java index 82b6dda8..a4e797f7 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Customer.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCustomer.java @@ -22,7 +22,7 @@ @Data @NoArgsConstructor -public class Customer { +public class XMLCustomer { @XmlPath("cac:PartyIdentification/cbc:ID/text()") private String partyIdentification_id; @@ -34,8 +34,8 @@ public class Customer { private String registrationName; @XmlPath("cac:PartyLegalEntity/cac:RegistrationAddress") - private Address address; + private XMLAddress address; @XmlPath("cac:Contact") - private Contact contact; + private XMLContact contact; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java index cb568bdb..4e5f6d9f 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java @@ -48,13 +48,13 @@ public class XMLPercepcionRetencion { private BigDecimal sunatTotal; @XmlPath("cac:Signature") - private Signature signature; + private XMLSignature signature; @XmlPath("cac:AgentParty") - private Supplier accountingSupplierParty; + private XMLSupplier accountingSupplierParty; @XmlPath("cac:ReceiverParty") - private Customer accountingCustomerParty; + private XMLCustomer accountingCustomerParty; private XMLPercepcionRetencionSunatDocumentReference sunatDocumentReference; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java index c03c4f0b..7ef69745 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java @@ -63,16 +63,16 @@ public class XMLSalesDocument { private List additionalDocumentReferences; @XmlPath("cac:Signature") - private Signature signature; + private XMLSignature signature; @XmlPath("cac:AccountingSupplierParty/cac:Party") - private Supplier accountingSupplierParty; + private XMLSupplier accountingSupplierParty; @XmlPath("cac:AccountingCustomerParty/cac:Party") - private Customer accountingCustomerParty; + private XMLCustomer accountingCustomerParty; @XmlPath("cac:Delivery/cac:DeliveryLocation/cac:Address") - private Address deliveryLocation; + private XMLAddress deliveryLocation; @XmlPath("cac:PaymentMeans") private PaymentMeans paymentMeans; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Signature.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSignature.java similarity index 97% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Signature.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSignature.java index 75a6ca30..742eaa0e 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Signature.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSignature.java @@ -22,7 +22,7 @@ @Data @NoArgsConstructor -public class Signature { +public class XMLSignature { @XmlPath("cbc:ID/text()") private String id; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Supplier.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplier.java similarity index 93% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Supplier.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplier.java index 23c85fb9..f768f484 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/Supplier.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplier.java @@ -22,7 +22,7 @@ @Data @NoArgsConstructor -public class Supplier { +public class XMLSupplier { @XmlPath("cac:PartyIdentification/cbc:ID/text()") private String partyIdentification_id; @@ -33,8 +33,8 @@ public class Supplier { private String registrationName; @XmlPath("cac:PartyLegalEntity/cac:RegistrationAddress") - private Address address; + private XMLAddress address; @XmlPath("cac:Contact") - private Contact contact; + private XMLContact contact; } From 7dd4ea6fd80c311917bcd18a597dcbdaf06db6a4 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sat, 25 Feb 2023 11:32:57 +0100 Subject: [PATCH 05/19] Add Voided documents to jaxb --- .../xbuilder/content/jaxb/Unmarshall.java | 70 ++++++++++++++++--- .../content/jaxb/models/XMLSunatDocument.java | 44 ++++++++++++ .../XMLSunatDocumentVoidedDocument.java | 34 +++++++++ .../XMLSunatDocumentVoidedDocumentLine.java | 38 ++++++++++ .../content/models/sunat/SunatDocument.java | 10 --- .../jaxb/xml-bindings/voided-documents.xml | 27 +++++++ .../voideddocument/VoidedDocumentsTest.java | 16 ++++- 7 files changed, 218 insertions(+), 21 deletions(-) create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocument.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocument.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentLine.java create mode 100644 core/src/main/resources/jaxb/xml-bindings/voided-documents.xml diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java index ab75d940..20fd0335 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java @@ -20,14 +20,19 @@ import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionInformation; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionSunatDocumentReference; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSunatDocument; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSunatDocumentVoidedDocument; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSunatDocumentVoidedDocumentLine; import io.github.project.openubl.xbuilder.content.models.common.Document; import io.github.project.openubl.xbuilder.content.models.common.TipoCambio; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; import io.github.project.openubl.xbuilder.content.models.standard.general.Note; -import io.github.project.openubl.xbuilder.content.models.standard.general.Percepcion; import io.github.project.openubl.xbuilder.content.models.standard.general.SalesDocument; +import io.github.project.openubl.xbuilder.content.models.sunat.SunatDocument; +import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocuments; +import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocumentsItem; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.BasePercepcionRetencion; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.PercepcionRetencionOperacion; @@ -201,6 +206,35 @@ public static Retention unmarshallRetention(String xml) throws JAXBException, IO } } + public static VoidedDocuments unmarshallVoidedDocuments(String xml) throws JAXBException, IOException { + try ( + InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/voided-documents.xml"); + StringReader reader = new StringReader(xml); + ) { + XMLSunatDocumentVoidedDocument xmlDocument = unmarshall(documentOXM, new InputSource(reader)); + VoidedDocuments.VoidedDocumentsBuilder builder = VoidedDocuments.builder(); + + enrichSunatDocument(xmlDocument, builder); + + // Detalles + List lines = xmlDocument.getLines(); + if (lines != null) { + builder.comprobantes(lines.stream() + .map(line -> VoidedDocumentsItem.builder() + .tipoComprobante(line.getDocumentTypeCode()) + .serie(line.getDocumentSerialID()) + .numero(line.getDocumentNumberID()) + .descripcionSustento(line.getVoidReasonDescription()) + .build() + ) + .collect(Collectors.toList()) + ); + } + + return builder.build(); + } + } + public static T unmarshall(InputStream documentOXML, InputSource inputSource) throws JAXBException { Map properties = new HashMap<>(); properties.put(JAXBContextProperties.OXM_METADATA_SOURCE, List.of( @@ -263,13 +297,6 @@ public static void enrichNote(XMLSalesDocument xmlSalesDocument, Note.NoteBuilde builder.totalImporte(Mapper.mapTotalImporteNote(xmlSalesDocument.getMonetaryTotal())); } - public static void enrichDocument(XMLSalesDocument xmlSalesDocument, Document.DocumentBuilder builder) { - builder.moneda(xmlSalesDocument.getDocumentCurrencyCode()); - builder.fechaEmision(xmlSalesDocument.getIssueDate()); - builder.proveedor(Mapper.mapProveedor(xmlSalesDocument.getAccountingSupplierParty())); - builder.firmante(Mapper.mapFirmante(xmlSalesDocument.getSignature())); - } - public static void enrichBasePercepcionRetencion(XMLPercepcionRetencion xmlDocument, BasePercepcionRetencion.BasePercepcionRetencionBuilder builder) { enrichDocument(xmlDocument, builder); @@ -321,6 +348,26 @@ public static void enrichBasePercepcionRetencion(XMLPercepcionRetencion xmlDocum } + public static void enrichSunatDocument(XMLSunatDocument xmlDocument, SunatDocument.SunatDocumentBuilder builder) { + enrichDocument(xmlDocument, builder); + + // Numero + String[] split = xmlDocument.getDocumentId().split("-"); + if (split.length == 3) { + builder.numero(Integer.parseInt(split[2])); + } + + // Fecha emision comprobante + builder.fechaEmisionComprobantes(xmlDocument.getReferenceDate()); + } + + public static void enrichDocument(XMLSalesDocument xmlSalesDocument, Document.DocumentBuilder builder) { + builder.moneda(xmlSalesDocument.getDocumentCurrencyCode()); + builder.fechaEmision(xmlSalesDocument.getIssueDate()); + builder.proveedor(Mapper.mapProveedor(xmlSalesDocument.getAccountingSupplierParty())); + builder.firmante(Mapper.mapFirmante(xmlSalesDocument.getSignature())); + } + public static void enrichDocument(XMLPercepcionRetencion xmlDocument, Document.DocumentBuilder builder) { builder.moneda(xmlDocument.getTotalInvoiceAmount_currencyId()); builder.fechaEmision(xmlDocument.getIssueDate()); @@ -328,4 +375,11 @@ public static void enrichDocument(XMLPercepcionRetencion xmlDocument, Document.D builder.firmante(Mapper.mapFirmante(xmlDocument.getSignature())); } + public static void enrichDocument(XMLSunatDocument xmlDocument, Document.DocumentBuilder builder) { + builder.moneda(null); + builder.fechaEmision(xmlDocument.getIssueDate()); + builder.proveedor(Mapper.mapProveedor(xmlDocument.getAccountingSupplierParty())); + builder.firmante(Mapper.mapFirmante(xmlDocument.getSignature())); + } + } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocument.java new file mode 100644 index 00000000..4676f91b --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocument.java @@ -0,0 +1,44 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +import java.time.LocalDate; + +@Data +@NoArgsConstructor +public abstract class XMLSunatDocument { + + @XmlPath("cbc:ID/text()") + private String documentId; + + @XmlPath("cbc:ReferenceDate/text()") + private LocalDate referenceDate; + + @XmlPath("cbc:IssueDate/text()") + private LocalDate issueDate; + + @XmlPath("cac:Signature") + private XMLSignature signature; + + @XmlPath("cac:AccountingSupplierParty") + private XMLSupplier accountingSupplierParty; + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocument.java new file mode 100644 index 00000000..10cd674a --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocument.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +import java.util.List; + +@Data +@EqualsAndHashCode(callSuper = true) +@NoArgsConstructor +public class XMLSunatDocumentVoidedDocument extends XMLSunatDocument { + + @XmlPath("sac:VoidedDocumentsLine") + private List lines; + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentLine.java new file mode 100644 index 00000000..c46b0e58 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentLine.java @@ -0,0 +1,38 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +@Data +@NoArgsConstructor +public class XMLSunatDocumentVoidedDocumentLine { + + @XmlPath("cbc:DocumentTypeCode/text()") + private String documentTypeCode; + + @XmlPath("sac:DocumentSerialID/text()") + private String documentSerialID; + + @XmlPath("sac:DocumentNumberID/text()") + private Integer documentNumberID; + + @XmlPath("sac:VoidReasonDescription/text()") + private String voidReasonDescription; +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/sunat/SunatDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/sunat/SunatDocument.java index 8520fad5..78faf28c 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/sunat/SunatDocument.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/sunat/SunatDocument.java @@ -17,8 +17,6 @@ package io.github.project.openubl.xbuilder.content.models.sunat; import io.github.project.openubl.xbuilder.content.models.common.Document; -import io.github.project.openubl.xbuilder.content.models.common.Firmante; -import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; @@ -39,17 +37,9 @@ public class SunatDocument extends Document { @Schema(requiredMode = Schema.RequiredMode.REQUIRED, minimum = "1", maximum = "99999999") private Integer numero; - /** - * Fecha de emisión del comprobante. Ejemplo 2022-12-25 (YYYY-MM-SS) - */ - @Schema(description = "Format: \"YYYY-MM-SS\". Ejemplo: 2022-12-25", pattern = "^\\d{4}-\\d{2}-\\d{2}$") - private LocalDate fechaEmision; - /** * Fecha de emisión de los comprobantes dados de baja. Ejemplo 2022-12-25 (YYYY-MM-SS) */ @Schema(description = "Format: \"YYYY-MM-SS\". Ejemplo: 2022-12-25", pattern = "^\\d{4}-\\d{2}-\\d{2}$") private LocalDate fechaEmisionComprobantes; - private Firmante firmante; - private Proveedor proveedor; } diff --git a/core/src/main/resources/jaxb/xml-bindings/voided-documents.xml b/core/src/main/resources/jaxb/xml-bindings/voided-documents.xml new file mode 100644 index 00000000..5a12e261 --- /dev/null +++ b/core/src/main/resources/jaxb/xml-bindings/voided-documents.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/src/test/java/e2e/renderer/voideddocument/VoidedDocumentsTest.java b/core/src/test/java/e2e/renderer/voideddocument/VoidedDocumentsTest.java index 7f077b66..fc6b31b2 100644 --- a/core/src/test/java/e2e/renderer/voideddocument/VoidedDocumentsTest.java +++ b/core/src/test/java/e2e/renderer/voideddocument/VoidedDocumentsTest.java @@ -19,6 +19,7 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog1_Invoice; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocuments; import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocumentsItem; @@ -69,8 +70,11 @@ public void testMultipleVoidedDocuments() throws Exception { Template template = TemplateProducer.getInstance().getVoidedDocument(); String xml = template.data(input).render(); + VoidedDocuments inputFromXml = Unmarshall.unmarshallVoidedDocuments(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "voidedDocument.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "voidedDocument.xml"); assertSendSunat(xml, XMLAssertUtils.VOIDED_DOCUMENTS_XSD); } @@ -108,8 +112,11 @@ public void testMultipleVoidedDocuments_autoGeneratedFechaEmision() throws Excep Template template = TemplateProducer.getInstance().getVoidedDocument(); String xml = template.data(input).render(); + VoidedDocuments inputFromXml = Unmarshall.unmarshallVoidedDocuments(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "voidedDocument_autoGeneratedFechaEmision.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "voidedDocument_autoGeneratedFechaEmision.xml"); assertSendSunat(xml, XMLAssertUtils.VOIDED_DOCUMENTS_XSD); } @@ -146,8 +153,11 @@ public void testMultipleVoidedDocuments_autoGeneratedTipoComprobante() throws Ex Template template = TemplateProducer.getInstance().getVoidedDocument(); String xml = template.data(input).render(); + VoidedDocuments inputFromXml = Unmarshall.unmarshallVoidedDocuments(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "voidedDocument_autoGeneratedTipoComprobante.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "voidedDocument_autoGeneratedTipoComprobante.xml"); assertSendSunat(xml, XMLAssertUtils.VOIDED_DOCUMENTS_XSD); } } From 851dbccc0615f463d7cd66a425f93443ec8d54d5 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sat, 25 Feb 2023 14:15:05 +0100 Subject: [PATCH 06/19] Add Summary documents to jaxb --- .../openubl/xbuilder/content/jaxb/Mapper.java | 2 +- .../xbuilder/content/jaxb/Unmarshall.java | 103 +++++++++++++++++- .../XMLSunatDocumentSummaryDocuments.java | 34 ++++++ .../XMLSunatDocumentSummaryDocumentsLine.java | 102 +++++++++++++++++ ...a => XMLSunatDocumentVoidedDocuments.java} | 4 +- ... XMLSunatDocumentVoidedDocumentsLine.java} | 2 +- .../models/sunat/resumen/Comprobante.java | 3 + .../xbuilder/enricher/ContentEnricher.java | 4 + .../enricher/kie/AbstractBodyRule.java | 4 - .../body/summaryDocumentItem/MonedaRule.java | 49 +++++++++ .../kie/ruleunits/BodyRuleContext.java | 1 + ....openubl.xbuilder.enricher.kie.RuleFactory | 13 ++- .../jaxb/xml-bindings/summary-documents.xml | 27 +++++ .../jaxb/xml-bindings/voided-documents.xml | 2 +- .../templates/Renderer/summaryDocuments.xml | 20 ++-- .../SummaryDocumentsTest.java | 6 +- 16 files changed, 346 insertions(+), 30 deletions(-) create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocuments.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocumentsLine.java rename core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/{XMLSunatDocumentVoidedDocument.java => XMLSunatDocumentVoidedDocuments.java} (88%) rename core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/{XMLSunatDocumentVoidedDocumentLine.java => XMLSunatDocumentVoidedDocumentsLine.java} (95%) create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/rules/enrich/body/summaryDocumentItem/MonedaRule.java create mode 100644 core/src/main/resources/jaxb/xml-bindings/summary-documents.xml diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java index 91f79d3c..f60cf88d 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java @@ -457,5 +457,5 @@ public static List mapDescuentos(List builder = VoidedDocuments.builder(); enrichSunatDocument(xmlDocument, builder); // Detalles - List lines = xmlDocument.getLines(); + List lines = xmlDocument.getLines(); if (lines != null) { builder.comprobantes(lines.stream() .map(line -> VoidedDocumentsItem.builder() @@ -235,6 +247,89 @@ public static VoidedDocuments unmarshallVoidedDocuments(String xml) throws JAXBE } } + public static SummaryDocuments unmarshallSummaryDocuments(String xml) throws JAXBException, IOException { + try ( + InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/summary-documents.xml"); + StringReader reader = new StringReader(xml); + ) { + XMLSunatDocumentSummaryDocuments xmlDocument = unmarshall(documentOXM, new InputSource(reader)); + SummaryDocuments.SummaryDocumentsBuilder builder = SummaryDocuments.builder(); + + enrichSunatDocument(xmlDocument, builder); + + // Detalles + List lines = xmlDocument.getLines(); + if (lines != null) { + builder.comprobantes(lines.stream() + .map(line -> { + Map billingPayments = Optional.ofNullable(line.getBillingPayments()) + .orElse(Collections.emptyList()) + .stream() + .collect(Collectors.toMap( + XMLSunatDocumentSummaryDocumentsLine.BillingPayment::getInstructionId, + XMLSunatDocumentSummaryDocumentsLine.BillingPayment::getPaidAmount + )); + + Map taxTotals = Optional.ofNullable(line.getTaxTotals()) + .orElse(Collections.emptyList()) + .stream() + .collect(Collectors.toMap( + taxTotal -> { + String code = taxTotal.getTaxSubtotals() != null ? taxTotal.getTaxSubtotals().getCode() : ""; + return Catalog + .valueOfCode(Catalog5.class, code) + .orElse(null); + }, + XMLSunatDocumentSummaryDocumentsLine.TaxTotalSummaryDocuments::getTaxAmount + )); + + io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteAfectado comprobanteAfectado = Optional.ofNullable(line.getBillingReference()) + .map(billingReference -> io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteAfectado.builder() + .serieNumero(billingReference.getInvoiceDocumentReference_id()) + .tipoComprobante(billingReference.getInvoiceDocumentReference_documentTypeCode()) + .build() + ) + .orElse(null); + + return SummaryDocumentsItem.builder() + .tipoOperacion(line.getStatus_conditionCode()) + .comprobante(Comprobante.builder() + .moneda(line.getTotalAmount_currencyID()) + .tipoComprobante(line.getDocumentTypeCode()) + .serieNumero(line.getDocumentId()) + .cliente(Cliente.builder() + .numeroDocumentoIdentidad(line.getAccountingCustomerParty_customerAssignedAccountId()) + .tipoDocumentoIdentidad(line.getAccountingCustomerParty_additionalAccountID()) + .build() + ) + .comprobanteAfectado(comprobanteAfectado) + .valorVenta(ComprobanteValorVenta.builder() + .importeTotal(line.getTotalAmount()) + .gravado(billingPayments.get("01")) + .exonerado(billingPayments.get("02")) + .inafecto(billingPayments.get("03")) + .gratuito(billingPayments.get("05")) + .otrosCargos(line.getAllowanceCharge_amount()) + .build() + ) + .impuestos(ComprobanteImpuestos.builder() + .igv(taxTotals.get(Catalog5.IGV)) + .icb(taxTotals.get(Catalog5.ICBPER)) + .build() + ) + .build() + ) + .build(); + } + ) + .collect(Collectors.toList()) + ); + } + + return builder.build(); + } + } + public static T unmarshall(InputStream documentOXML, InputSource inputSource) throws JAXBException { Map properties = new HashMap<>(); properties.put(JAXBContextProperties.OXM_METADATA_SOURCE, List.of( diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocuments.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocuments.java new file mode 100644 index 00000000..92b0d63a --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocuments.java @@ -0,0 +1,34 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +import java.util.List; + +@Data +@EqualsAndHashCode(callSuper = true) +@NoArgsConstructor +public class XMLSunatDocumentSummaryDocuments extends XMLSunatDocument { + + @XmlPath("sac:SummaryDocumentsLine") + private List lines; + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocumentsLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocumentsLine.java new file mode 100644 index 00000000..acfea5ce --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocumentsLine.java @@ -0,0 +1,102 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +import java.math.BigDecimal; +import java.util.List; + +@Data +@NoArgsConstructor +public class XMLSunatDocumentSummaryDocumentsLine { + + @XmlPath("cbc:DocumentTypeCode/text()") + private String documentTypeCode; + + @XmlPath("cbc:ID/text()") + private String documentId; + + @XmlPath("cac:AccountingCustomerParty/cbc:CustomerAssignedAccountID/text()") + private String accountingCustomerParty_customerAssignedAccountId; + + @XmlPath("cac:AccountingCustomerParty/cbc:AdditionalAccountID/text()") + private String accountingCustomerParty_additionalAccountID; + + @XmlPath("cac:BillingReference") + private BillingReference billingReference; + + @XmlPath("cac:Status/cbc:ConditionCode/text()") + private String status_conditionCode; + + @XmlPath("sac:TotalAmount/text()") + private BigDecimal totalAmount; + + @XmlPath("sac:TotalAmount/@currencyID") + private String totalAmount_currencyID; + + @XmlPath("sac:BillingPayment") + private List billingPayments; + + @XmlPath("cac:AllowanceCharge/cbc:Amount/text()") + private BigDecimal allowanceCharge_amount; + + @XmlPath("cac:TaxTotal") + private List taxTotals; + + @Data + @NoArgsConstructor + public static class BillingPayment { + @XmlPath("cbc:PaidAmount/text()") + BigDecimal paidAmount; + + @XmlPath("cbc:InstructionID/text()") + String instructionId; + } + + @Data + @NoArgsConstructor + public static class BillingReference { + @XmlPath("cac:InvoiceDocumentReference/cbc:ID/text()") + private String invoiceDocumentReference_id; + + @XmlPath("cac:InvoiceDocumentReference/cbc:DocumentTypeCode/text()") + private String invoiceDocumentReference_documentTypeCode; + } + + @Data + @NoArgsConstructor + public static class TaxTotalSummaryDocuments { + @XmlPath("cbc:TaxAmount/text()") + BigDecimal taxAmount; + + @XmlPath("cac:TaxSubtotal") + TaxSubtotalTaxTotalSummaryDocuments taxSubtotals; + } + + @Data + @NoArgsConstructor + public static class TaxSubtotalTaxTotalSummaryDocuments { + @XmlPath("cbc:TaxAmount/text()") + private BigDecimal taxAmount; + + @XmlPath("cac:TaxCategory/cac:TaxScheme/cbc:ID/text()") + private String code; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocuments.java similarity index 88% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocument.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocuments.java index 10cd674a..78c02414 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocument.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocuments.java @@ -26,9 +26,9 @@ @Data @EqualsAndHashCode(callSuper = true) @NoArgsConstructor -public class XMLSunatDocumentVoidedDocument extends XMLSunatDocument { +public class XMLSunatDocumentVoidedDocuments extends XMLSunatDocument { @XmlPath("sac:VoidedDocumentsLine") - private List lines; + private List lines; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentsLine.java similarity index 95% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentLine.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentsLine.java index c46b0e58..bf3c35af 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentLine.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentsLine.java @@ -22,7 +22,7 @@ @Data @NoArgsConstructor -public class XMLSunatDocumentVoidedDocumentLine { +public class XMLSunatDocumentVoidedDocumentsLine { @XmlPath("cbc:DocumentTypeCode/text()") private String documentTypeCode; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/sunat/resumen/Comprobante.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/sunat/resumen/Comprobante.java index 8909a5e8..ccceb930 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/sunat/resumen/Comprobante.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/sunat/resumen/Comprobante.java @@ -29,6 +29,9 @@ @AllArgsConstructor public class Comprobante { + @Schema(requiredMode = Schema.RequiredMode.AUTO, description = "Moneda del comprobante declarado") + private String moneda; + @Schema(requiredMode = Schema.RequiredMode.REQUIRED, description = "Catalogo 01") private String tipoComprobante; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/enricher/ContentEnricher.java b/core/src/main/java/io/github/project/openubl/xbuilder/enricher/ContentEnricher.java index ace33234..5ba3e545 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/enricher/ContentEnricher.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/enricher/ContentEnricher.java @@ -60,6 +60,7 @@ public void enrich(Invoice input) { // Body BodyRuleContext ruleContextBody = BodyRuleContext.builder() + .moneda(input.getMoneda()) .tasaIgv(input.getTasaIgv()) .tasaIvap(input.getTasaIvap()) .tasaIcb(input.getTasaIcb()) @@ -93,6 +94,7 @@ private void enrichNote(Note input) { // Body BodyRuleContext ruleContextBody = BodyRuleContext.builder() + .moneda(input.getMoneda()) .tasaIgv(input.getTasaIgv()) .tasaIcb(input.getTasaIcb()) .build(); @@ -114,6 +116,7 @@ public void enrich(VoidedDocuments input) { // Body BodyRuleContext ruleContextBody = BodyRuleContext.builder() + .moneda(input.getMoneda()) .build(); RuleUnit ruleUnitBody = new BodyRuleUnit(phaseType, defaults, ruleContextBody); @@ -134,6 +137,7 @@ public void enrich(SummaryDocuments input) { // Body BodyRuleContext ruleContextBody = BodyRuleContext.builder() + .moneda(input.getMoneda()) .build(); RuleUnit ruleUnitBody = new BodyRuleUnit(phaseType, defaults, ruleContextBody); diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/AbstractBodyRule.java b/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/AbstractBodyRule.java index abf22eca..d87e9ea2 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/AbstractBodyRule.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/AbstractBodyRule.java @@ -35,10 +35,6 @@ public Rule create(Defaults defaults, RuleContext ruleContext) { return this; } - public Defaults getDefaults() { - return defaults; - } - public BodyRuleContext getRuleContext() { return ruleContext; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/rules/enrich/body/summaryDocumentItem/MonedaRule.java b/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/rules/enrich/body/summaryDocumentItem/MonedaRule.java new file mode 100644 index 00000000..3c543bb4 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/rules/enrich/body/summaryDocumentItem/MonedaRule.java @@ -0,0 +1,49 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.summaryDocumentItem; + +import io.github.project.openubl.xbuilder.content.models.sunat.resumen.SummaryDocumentsItem; +import io.github.project.openubl.xbuilder.enricher.kie.AbstractBodyRule; +import io.github.project.openubl.xbuilder.enricher.kie.RulePhase; + +import java.util.function.Consumer; + +import static io.github.project.openubl.xbuilder.enricher.kie.rules.utils.Helpers.isSummaryDocumentsItem; +import static io.github.project.openubl.xbuilder.enricher.kie.rules.utils.Helpers.whenSummaryDocumentsItem; + +@RulePhase(type = RulePhase.PhaseType.ENRICH) +public class MonedaRule extends AbstractBodyRule { + + @Override + public boolean test(Object object) { + return (isSummaryDocumentsItem.test(object) && whenSummaryDocumentsItem.apply(object) + .map(item -> item.getComprobante() != null && + item.getComprobante().getMoneda() == null + ) + .orElse(false) + ); + } + + @Override + public void modify(Object object) { + Consumer consumer = item -> { + String moneda = getRuleContext().getMoneda(); + item.getComprobante().setMoneda(moneda); + }; + whenSummaryDocumentsItem.apply(object).ifPresent(consumer); + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/ruleunits/BodyRuleContext.java b/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/ruleunits/BodyRuleContext.java index af875a95..35bba6e7 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/ruleunits/BodyRuleContext.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/enricher/kie/ruleunits/BodyRuleContext.java @@ -26,6 +26,7 @@ @Builder public class BodyRuleContext implements RuleContext { + private String moneda; private BigDecimal tasaIgv; private BigDecimal tasaIvap; private BigDecimal tasaIcb; diff --git a/core/src/main/resources/META-INF/services/io.github.project.openubl.xbuilder.enricher.kie.RuleFactory b/core/src/main/resources/META-INF/services/io.github.project.openubl.xbuilder.enricher.kie.RuleFactory index 4f48e915..4932d66b 100644 --- a/core/src/main/resources/META-INF/services/io.github.project.openubl.xbuilder.enricher.kie.RuleFactory +++ b/core/src/main/resources/META-INF/services/io.github.project.openubl.xbuilder.enricher.kie.RuleFactory @@ -57,6 +57,13 @@ io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.descuento.Tipo io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.descuento.FactorRule io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.descuento.MontoBaseRule +## Enrich - VoidedDocuments +io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.voidedDocumentItem.TipoComprobanteRule + +## Enrich - SummaryDocuments +io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.summaryDocumentItem.TipoOperacionRule +io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.summaryDocumentItem.MonedaRule + ## Process - Detalle io.github.project.openubl.xbuilder.enricher.kie.rules.process.body.detalle.PrecioDeReferenciaRule io.github.project.openubl.xbuilder.enricher.kie.rules.process.body.detalle.PrecioRule @@ -67,9 +74,3 @@ io.github.project.openubl.xbuilder.enricher.kie.rules.process.body.detalle.IgvRu io.github.project.openubl.xbuilder.enricher.kie.rules.process.body.detalle.IscBaseImponibleRule io.github.project.openubl.xbuilder.enricher.kie.rules.process.body.detalle.IscRule io.github.project.openubl.xbuilder.enricher.kie.rules.process.body.detalle.TotalImpuestosRule - -# VoidedDocuments -io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.voidedDocumentItem.TipoComprobanteRule - -# SummaryDocuments -io.github.project.openubl.xbuilder.enricher.kie.rules.enrich.body.summaryDocumentItem.TipoOperacionRule \ No newline at end of file diff --git a/core/src/main/resources/jaxb/xml-bindings/summary-documents.xml b/core/src/main/resources/jaxb/xml-bindings/summary-documents.xml new file mode 100644 index 00000000..06ce283f --- /dev/null +++ b/core/src/main/resources/jaxb/xml-bindings/summary-documents.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/core/src/main/resources/jaxb/xml-bindings/voided-documents.xml b/core/src/main/resources/jaxb/xml-bindings/voided-documents.xml index 5a12e261..2e4cc97e 100644 --- a/core/src/main/resources/jaxb/xml-bindings/voided-documents.xml +++ b/core/src/main/resources/jaxb/xml-bindings/voided-documents.xml @@ -12,7 +12,7 @@ - + diff --git a/core/src/main/resources/templates/Renderer/summaryDocuments.xml b/core/src/main/resources/templates/Renderer/summaryDocuments.xml index cb768818..b2eda8cf 100644 --- a/core/src/main/resources/templates/Renderer/summaryDocuments.xml +++ b/core/src/main/resources/templates/Renderer/summaryDocuments.xml @@ -41,42 +41,42 @@ {it.tipoOperacion} - {it.comprobante.valorVenta.importeTotal} + {it.comprobante.valorVenta.importeTotal} {#if it.comprobante.valorVenta.gravado} - {it.comprobante.valorVenta.gravado} + {it.comprobante.valorVenta.gravado} 01 {/if} {#if it.comprobante.valorVenta.exonerado} - {it.comprobante.valorVenta.exonerado} + {it.comprobante.valorVenta.exonerado} 02 {/if} {#if it.comprobante.valorVenta.inafecto} - {it.comprobante.valorVenta.inafecto} + {it.comprobante.valorVenta.inafecto} 03 {/if} {#if it.comprobante.valorVenta.gratuito} - {it.comprobante.valorVenta.gratuito} + {it.comprobante.valorVenta.gratuito} 05 {/if} {#if it.comprobante.valorVenta.otrosCargos} true - {it.comprobante.valorVenta.otrosCargos} + {it.comprobante.valorVenta.otrosCargos} {/if} {#if it.comprobante.impuestos.igv} - {it.comprobante.impuestos.igv} + {it.comprobante.impuestos.igv} - {it.comprobante.impuestos.igv} + {it.comprobante.impuestos.igv} 1000 @@ -89,9 +89,9 @@ {/if} {#if it.comprobante.impuestos.icb} - {it.comprobante.impuestos.icb} + {it.comprobante.impuestos.icb} - {it.comprobante.impuestos.icb} + {it.comprobante.impuestos.icb} 7152 diff --git a/core/src/test/java/e2e/renderer/summarydocuments/SummaryDocumentsTest.java b/core/src/test/java/e2e/renderer/summarydocuments/SummaryDocumentsTest.java index 55dab141..cb300951 100644 --- a/core/src/test/java/e2e/renderer/summarydocuments/SummaryDocumentsTest.java +++ b/core/src/test/java/e2e/renderer/summarydocuments/SummaryDocumentsTest.java @@ -22,6 +22,7 @@ import io.github.project.openubl.xbuilder.content.catalogs.Catalog19; import io.github.project.openubl.xbuilder.content.catalogs.Catalog1_Invoice; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.sunat.resumen.Comprobante; @@ -116,8 +117,11 @@ public void testMultipleVoidedDocuments() throws Exception { Template template = TemplateProducer.getInstance().getSummaryDocuments(); String xml = template.data(input).render(); + SummaryDocuments inputFromXml = Unmarshall.unmarshallSummaryDocuments(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "summaryDocuments.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "summaryDocuments.xml"); assertSendSunat(xml, XMLAssertUtils.SUMMARY_DOCUMENTS_XSD); } From 60bd405f083ced6f1fbca2c4eac57b2efc1cfb5e Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sat, 25 Feb 2023 15:31:35 +0100 Subject: [PATCH 07/19] Add Despatch advice to jaxb --- .../xbuilder/content/jaxb/Unmarshall.java | 164 +++++++++++++- .../jaxb/models/XMLDespatchAdvice.java | 208 ++++++++++++++++++ .../jaxb/models/XMLDespatchAdviceLine.java | 44 ++++ .../jaxb/xml-bindings/despatch-advice.xml | 19 ++ .../templates/Renderer/despatchAdvice.xml | 4 +- core/src/test/java/e2e/AbstractTest.java | 16 +- .../java/e2e/renderer/XMLAssertUtils.java | 2 +- .../creditnote/CreditNoteIscTest.java | 12 +- .../despatchadvice/DespatchAdviceTest.java | 6 +- .../DespatchAdviceTest/minData.xml | 4 +- 10 files changed, 459 insertions(+), 20 deletions(-) create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdvice.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdviceLine.java create mode 100644 core/src/main/resources/jaxb/xml-bindings/despatch-advice.xml diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java index e866063a..b5212274 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java @@ -18,6 +18,7 @@ import io.github.project.openubl.xbuilder.content.catalogs.Catalog; import io.github.project.openubl.xbuilder.content.catalogs.Catalog5; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencion; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionInformation; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionSunatDocumentReference; @@ -29,12 +30,23 @@ import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSunatDocumentVoidedDocumentsLine; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Document; +import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.common.TipoCambio; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; import io.github.project.openubl.xbuilder.content.models.standard.general.Note; import io.github.project.openubl.xbuilder.content.models.standard.general.SalesDocument; +import io.github.project.openubl.xbuilder.content.models.standard.guia.DespatchAdvice; +import io.github.project.openubl.xbuilder.content.models.standard.guia.DespatchAdviceItem; +import io.github.project.openubl.xbuilder.content.models.standard.guia.Destinatario; +import io.github.project.openubl.xbuilder.content.models.standard.guia.Destino; +import io.github.project.openubl.xbuilder.content.models.standard.guia.DocumentoBaja; +import io.github.project.openubl.xbuilder.content.models.standard.guia.DocumentoRelacionado; +import io.github.project.openubl.xbuilder.content.models.standard.guia.Envio; +import io.github.project.openubl.xbuilder.content.models.standard.guia.Partida; +import io.github.project.openubl.xbuilder.content.models.standard.guia.Remitente; +import io.github.project.openubl.xbuilder.content.models.standard.guia.Transportista; import io.github.project.openubl.xbuilder.content.models.sunat.SunatDocument; import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocuments; import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocumentsItem; @@ -283,15 +295,15 @@ public static SummaryDocuments unmarshallSummaryDocuments(String xml) throws JAX XMLSunatDocumentSummaryDocumentsLine.TaxTotalSummaryDocuments::getTaxAmount )); - io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteAfectado comprobanteAfectado = Optional.ofNullable(line.getBillingReference()) - .map(billingReference -> io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteAfectado.builder() - .serieNumero(billingReference.getInvoiceDocumentReference_id()) - .tipoComprobante(billingReference.getInvoiceDocumentReference_documentTypeCode()) - .build() - ) - .orElse(null); + io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteAfectado comprobanteAfectado = Optional.ofNullable(line.getBillingReference()) + .map(billingReference -> io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteAfectado.builder() + .serieNumero(billingReference.getInvoiceDocumentReference_id()) + .tipoComprobante(billingReference.getInvoiceDocumentReference_documentTypeCode()) + .build() + ) + .orElse(null); - return SummaryDocumentsItem.builder() + return SummaryDocumentsItem.builder() .tipoOperacion(line.getStatus_conditionCode()) .comprobante(Comprobante.builder() .moneda(line.getTotalAmount_currencyID()) @@ -330,6 +342,142 @@ public static SummaryDocuments unmarshallSummaryDocuments(String xml) throws JAX } } + public static DespatchAdvice unmarshallDespatchAdvice(String xml) throws JAXBException, IOException { + try ( + InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/despatch-advice.xml"); + StringReader reader = new StringReader(xml); + ) { + XMLDespatchAdvice xmlDocument = unmarshall(documentOXM, new InputSource(reader)); + DespatchAdvice.DespatchAdviceBuilder builder = DespatchAdvice.builder(); + + // Serie y numero + String[] split = xmlDocument.getDocumentId().split("-"); + if (split.length == 2) { + builder.serie(split[0]); + builder.numero(Integer.parseInt(split[1])); + } + + builder.fechaEmision(xmlDocument.getIssueDate()); + builder.horaEmision(xmlDocument.getIssueTime()); + builder.tipoComprobante(xmlDocument.getDespatchAdviceTypeCode()); + builder.observaciones(xmlDocument.getNote()); + builder.documentoBaja(Optional.ofNullable(xmlDocument.getOrderReference()) + .map(elem -> DocumentoBaja.builder() + .serieNumero(elem.getId()) + .tipoDocumento(elem.getOrderTypeCode()) + .build() + ) + .orElse(null) + ); + builder.documentoRelacionado(Optional.ofNullable(xmlDocument.getAdditionalDocumentReference()) + .map(elem -> DocumentoRelacionado.builder() + .serieNumero(elem.getId()) + .tipoDocumento(elem.getDocumentTypeCode()) + .build() + ) + .orElse(null) + ); + builder.firmante(Mapper.mapFirmante(xmlDocument.getSignature())); + + builder.remitente(Optional.ofNullable(xmlDocument.getDespatchSupplierParty()) + .map(elem -> Remitente.builder() + .ruc(elem.getCustomerAssignedAccountID()) + .razonSocial(elem.getRegistrationName()) + .build() + ) + .orElse(null) + ); + + builder.destinatario(Optional.ofNullable(xmlDocument.getDeliveryCustomerParty()) + .map(elem -> Destinatario.builder() + .numeroDocumentoIdentidad(elem.getPartyIdentification_id()) + .nombre(elem.getRegistrationName()) + .tipoDocumentoIdentidad(elem.getCustomerAssignedAccountID_schemeId()) + .build() + ) + .orElse(null) + ); + + builder.proveedor(Optional.ofNullable(xmlDocument.getSellerSupplierParty()) + .map(elem -> Proveedor.builder() + .ruc(elem.getCustomerAssignedAccountId()) + .nombreComercial(elem.getRegistrationName()) + .build() + ) + .orElse(null) + ); + + builder.envio(Optional.ofNullable(xmlDocument.getShipment()) + .map(elem -> { + Transportista transportista = null; + if (elem.getCarrierParty() != null || elem.getTransportMeans() != null || elem.getDriverPerson() != null) { + Transportista.TransportistaBuilder transportistaBuilder = Transportista.builder(); + + Optional.ofNullable(elem.getCarrierParty()) + .ifPresent(carrierParty -> transportistaBuilder + .tipoDocumentoIdentidad(carrierParty.getPartyIdentification_schemeId()) + .numeroDocumentoIdentidad(carrierParty.getPartyIdentification_id()) + .nombre(carrierParty.getPartyName()) + ); + Optional.ofNullable(elem.getTransportMeans()) + .ifPresent(transportMeans -> transportistaBuilder + .placaDelVehiculo(transportMeans.getLicensePlateId()) + ); + Optional.ofNullable(elem.getDriverPerson()) + .ifPresent(driverPerson -> transportistaBuilder + .choferTipoDocumentoIdentidad(driverPerson.getId()) + .choferTipoDocumentoIdentidad(driverPerson.getId_schemeId()) + ); + + transportista = transportistaBuilder.build(); + } + + return Envio.builder() + .tipoTraslado(elem.getHandlingCode()) + .motivoTraslado(elem.getInformation()) + .pesoTotal(elem.getGrossWeightMeasure()) + .pesoTotalUnidadMedida(elem.getGrossWeightMeasure_unitCode()) + .numeroDeBultos(elem.getTotalTransportHandlingUnitQuantity()) + .transbordoProgramado(elem.getSplitConsignmentIndicator()) + .tipoModalidadTraslado(elem.getTransportModeCode()) + .fechaTraslado(elem.getStartDate()) + .transportista(transportista) + .destino(Destino.builder() + .ubigeo(elem.getDeliveryAddress_id()) + .direccion(elem.getDeliveryAddress_line()) + .build() + ) + .numeroDeContenedor(elem.getTransportEquipment_id()) + .partida(Partida.builder() + .ubigeo(elem.getOriginAddress_id()) + .direccion(elem.getOriginAddress_streetName()) + .build() + ) + .codigoDePuerto(elem.getFirstArrivalPortLocation_id()) + .build(); + } + ) + .orElse(null) + ); + + builder.detalles(Optional.ofNullable(xmlDocument.getLines()) + .orElse(Collections.emptyList()) + .stream() + .map(elem -> DespatchAdviceItem.builder() + .cantidad(elem.getDeliveredQuantity()) + .unidadMedida(elem.getDeliveredQuantity_unitCode()) + .descripcion(elem.getItemName()) + .codigo(elem.getSellersItemIdentification_id()) + .codigoSunat(elem.getItemClassificationCode()) + .build() + ) + .collect(Collectors.toList()) + ); + + return builder.build(); + } + } + public static T unmarshall(InputStream documentOXML, InputSource inputSource) throws JAXBException { Map properties = new HashMap<>(); properties.put(JAXBContextProperties.OXM_METADATA_SOURCE, List.of( diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdvice.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdvice.java new file mode 100644 index 00000000..22a75bcd --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdvice.java @@ -0,0 +1,208 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +import java.math.BigDecimal; +import java.time.LocalDate; +import java.time.LocalTime; +import java.util.List; + +@Data +@NoArgsConstructor +public class XMLDespatchAdvice { + + @XmlPath("cbc:ID/text()") + private String documentId; + + @XmlPath("cbc:IssueDate/text()") + private LocalDate issueDate; + + @XmlPath("cbc:IssueTime/text()") + private LocalTime issueTime; + + @XmlPath("cbc:DespatchAdviceTypeCode/text()") + private String despatchAdviceTypeCode; + + @XmlPath("cbc:Note/text()") + private String note; + + @XmlPath("cac:OrderReference") + private OrderReference orderReference; + + @XmlPath("cac:AdditionalDocumentReference") + private AdditionalDocumentReference additionalDocumentReference; + + @XmlPath("cac:Signature") + private XMLSignature signature; + + @XmlPath("cac:DespatchSupplierParty") + private DespatchSupplierParty despatchSupplierParty; + + @XmlPath("cac:DeliveryCustomerParty") + private DeliveryCustomerParty deliveryCustomerParty; + + @XmlPath("cac:SellerSupplierParty") + private SellerSupplierParty sellerSupplierParty; + + @XmlPath("cac:Shipment") + private Shipment shipment; + + @XmlPath("cac:DespatchLine") + private List lines; + + @Data + @NoArgsConstructor + public static class OrderReference { + @XmlPath("cbc:ID/text()") + private String id; + + @XmlPath("cbc:OrderTypeCode/text()") + private String orderTypeCode; + } + + @Data + @NoArgsConstructor + public static class AdditionalDocumentReference { + @XmlPath("cbc:ID/text()") + private String id; + + @XmlPath("cbc:DocumentTypeCode/text()") + private String documentTypeCode; + } + + @Data + @NoArgsConstructor + public static class DespatchSupplierParty { + @XmlPath("cac:Party/cac:PartyIdentification/cbc:ID/text()") + private String customerAssignedAccountID; + + @XmlPath("cac:Party/cac:PartyLegalEntity/cbc:RegistrationName/text()") + private String registrationName; + } + + @Data + @NoArgsConstructor + public static class DeliveryCustomerParty { + @XmlPath("cac:Party/cac:PartyIdentification/cbc:ID/text()") + private String partyIdentification_id; + + @XmlPath("cac:Party/cac:PartyIdentification/cbc:ID/@schemeID") + private String customerAssignedAccountID_schemeId; + + @XmlPath("cac:Party/cac:PartyLegalEntity/cbc:RegistrationName/text()") + private String registrationName; + } + + @Data + @NoArgsConstructor + public static class SellerSupplierParty { + @XmlPath("cbc:CustomerAssignedAccountID/text()") + private String customerAssignedAccountId; + + @XmlPath("cac:Party/cac:PartyLegalEntity/cbc:RegistrationName/text()") + private String registrationName; + } + + @Data + @NoArgsConstructor + public static class Shipment { + @XmlPath("cbc:HandlingCode/text()") + private String handlingCode; + + @XmlPath("cbc:Information/text()") + private String information; + + @XmlPath("cbc:GrossWeightMeasure/text()") + private BigDecimal grossWeightMeasure; + + @XmlPath("cbc:GrossWeightMeasure/@unitCode") + private String grossWeightMeasure_unitCode; + + @XmlPath("cbc:TotalTransportHandlingUnitQuantity/text()") + private Integer totalTransportHandlingUnitQuantity; + + @XmlPath("cbc:SplitConsignmentIndicator/text()") + private Boolean splitConsignmentIndicator; + + @XmlPath("cac:ShipmentStage/cbc:TransportModeCode/text()") + private String transportModeCode; + + @XmlPath("cac:ShipmentStage/cac:TransitPeriod/cbc:StartDate/text()") + private LocalDate startDate; + + @XmlPath("cac:ShipmentStage/cac:CarrierParty") + private CarrierParty carrierParty; + + @XmlPath("cac:ShipmentStage/cac:TransportMeans") + private TransportMeans transportMeans; + + @XmlPath("cac:ShipmentStage/cac:DriverPerson") + private DriverPerson driverPerson; + + @XmlPath("cac:Delivery/cac:DeliveryAddress/cbc:ID/text()") + private String deliveryAddress_id; + + @XmlPath("cac:Delivery/cac:DeliveryAddress/cac:AddressLine/cbc:Line/text()") + private String deliveryAddress_line; + + @XmlPath("cac:TransportHandlingUnit/cac:TransportEquipment/cbc:ID/text()") + private String transportEquipment_id; + + @XmlPath("cac:OriginAddress/cbc:ID/text()") + private String originAddress_id; + + @XmlPath("cac:OriginAddress/cbc:StreetName/text()") + private String originAddress_streetName; + + @XmlPath("cac:FirstArrivalPortLocation/cbc:ID/text()") + private String firstArrivalPortLocation_id; + } + + @Data + @NoArgsConstructor + public static class CarrierParty { + @XmlPath("cac:PartyIdentification/cbc:ID/text()") + private String partyIdentification_id; + + @XmlPath("cac:PartyIdentification/cbc:ID/@schemeID") + private String partyIdentification_schemeId; + + @XmlPath("cac:PartyName/cbc:Name/text()") + private String partyName; + } + + @Data + @NoArgsConstructor + public static class TransportMeans { + @XmlPath("cac:RoadTransport/cbc:LicensePlateID/text()") + private String licensePlateId; + } + + @Data + @NoArgsConstructor + public static class DriverPerson { + @XmlPath("cbc:ID/text()") + private String id; + + @XmlPath("cbc:ID/@schemeID") + private String id_schemeId; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdviceLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdviceLine.java new file mode 100644 index 00000000..477e7f39 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdviceLine.java @@ -0,0 +1,44 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; +import org.eclipse.persistence.oxm.annotations.XmlPath; + +import java.math.BigDecimal; + +@Data +@NoArgsConstructor +public class XMLDespatchAdviceLine { + + @XmlPath("cbc:DeliveredQuantity/text()") + private BigDecimal deliveredQuantity; + + @XmlPath("cbc:DeliveredQuantity/@unitCode") + private String deliveredQuantity_unitCode; + + @XmlPath("cac:Item/cbc:Name/text()") + private String itemName; + + @XmlPath("cac:Item/cac:SellersItemIdentification/cbc:ID/text()") + private String sellersItemIdentification_id; + + @XmlPath("cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode/text()") + private String itemClassificationCode; + +} diff --git a/core/src/main/resources/jaxb/xml-bindings/despatch-advice.xml b/core/src/main/resources/jaxb/xml-bindings/despatch-advice.xml new file mode 100644 index 00000000..f8e6851c --- /dev/null +++ b/core/src/main/resources/jaxb/xml-bindings/despatch-advice.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/core/src/main/resources/templates/Renderer/despatchAdvice.xml b/core/src/main/resources/templates/Renderer/despatchAdvice.xml index 3ec0fc50..3d220ca4 100644 --- a/core/src/main/resources/templates/Renderer/despatchAdvice.xml +++ b/core/src/main/resources/templates/Renderer/despatchAdvice.xml @@ -106,8 +106,8 @@ {/if} - {envio.partida.ubigeo }} - {envio.partida.direccion }} + {envio.partida.ubigeo} + {envio.partida.direccion} {#if envio.codigoDePuerto} diff --git a/core/src/test/java/e2e/AbstractTest.java b/core/src/test/java/e2e/AbstractTest.java index 743fd2bf..21eda27d 100644 --- a/core/src/test/java/e2e/AbstractTest.java +++ b/core/src/test/java/e2e/AbstractTest.java @@ -17,6 +17,7 @@ package e2e; import e2e.renderer.XMLAssertUtils; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; @@ -47,8 +48,11 @@ protected void assertInput(Invoice input, String snapshot) throws Exception { Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); + Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), snapshot); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshot); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); } @@ -60,8 +64,11 @@ protected void assertInput(CreditNote input, String snapshot) throws Exception { Template template = TemplateProducer.getInstance().getCreditNote(); String xml = template.data(input).render(); + CreditNote inputFromXml = Unmarshall.unmarshallCreditNote(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), snapshot); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshot); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.CREDIT_NOTE_XSD); } @@ -73,8 +80,11 @@ protected void assertInput(DebitNote input, String snapshot) throws Exception { Template template = TemplateProducer.getInstance().getDebitNote(); String xml = template.data(input).render(); + DebitNote inputFromXml = Unmarshall.unmarshallDebitNote(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - XMLAssertUtils.assertSnapshot(xml, getClass(), snapshot); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshot); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.DEBIT_NOTE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/XMLAssertUtils.java b/core/src/test/java/e2e/renderer/XMLAssertUtils.java index d215afed..87f771df 100644 --- a/core/src/test/java/e2e/renderer/XMLAssertUtils.java +++ b/core/src/test/java/e2e/renderer/XMLAssertUtils.java @@ -98,7 +98,7 @@ public class XMLAssertUtils { } } - public static void assertSnapshot(String expected, Class clasz, String snapshotFile) throws SAXException { + private static void assertSnapshot(String expected, Class clasz, String snapshotFile) throws SAXException { String rootDir = clasz.getName().replaceAll("\\.", "/"); // Update snapshots and if updated do not verify since it doesn't make sense anymore diff --git a/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java b/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java index adebe7b9..ff04712c 100644 --- a/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java +++ b/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java @@ -20,11 +20,11 @@ import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; import io.github.project.openubl.xbuilder.content.catalogs.Catalog8; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; @@ -129,8 +129,11 @@ public void testIsc_aplicacionAlMontoFijo() throws Exception { Template template = TemplateProducer.getInstance().getCreditNote(); String xml = template.data(input).render(); + CreditNote inputFromXml = Unmarshall.unmarshallCreditNote(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "isc_aplicacionAlMontoFijo.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "isc_aplicacionAlMontoFijo.xml"); assertSendSunat(xml, XMLAssertUtils.CREDIT_NOTE_XSD); } @@ -176,8 +179,11 @@ public void testIsc_sistemaDePreciosDeVentalAlPublico() throws Exception { Template template = TemplateProducer.getInstance().getCreditNote(); String xml = template.data(input).render(); + CreditNote inputFromXml = Unmarshall.unmarshallCreditNote(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "isc_sistemaDePreciosDeVentalAlPublico.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "isc_sistemaDePreciosDeVentalAlPublico.xml"); assertSendSunat(xml, XMLAssertUtils.CREDIT_NOTE_XSD); } } diff --git a/core/src/test/java/e2e/renderer/despatchadvice/DespatchAdviceTest.java b/core/src/test/java/e2e/renderer/despatchadvice/DespatchAdviceTest.java index 083bd92b..0674621b 100644 --- a/core/src/test/java/e2e/renderer/despatchadvice/DespatchAdviceTest.java +++ b/core/src/test/java/e2e/renderer/despatchadvice/DespatchAdviceTest.java @@ -22,6 +22,7 @@ import io.github.project.openubl.xbuilder.content.catalogs.Catalog18; import io.github.project.openubl.xbuilder.content.catalogs.Catalog20; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.standard.guia.DespatchAdvice; import io.github.project.openubl.xbuilder.content.models.standard.guia.DespatchAdviceItem; import io.github.project.openubl.xbuilder.content.models.standard.guia.Destinatario; @@ -93,8 +94,11 @@ public void testBasicMinData() throws Exception { Template template = TemplateProducer.getInstance().getDespatchAdvice(); String xml = template.data(input).render(); + DespatchAdvice inputFromXml = Unmarshall.unmarshallDespatchAdvice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + // Then - assertSnapshot(xml, getClass(), "minData.xml"); + assertSnapshot(xml, reconstructedXml, getClass(), "minData.xml"); assertSendSunat(xml, XMLAssertUtils.DESPATCH_ADVICE_XSD); } diff --git a/core/src/test/resources/e2e/renderer/despatchadvice/DespatchAdviceTest/minData.xml b/core/src/test/resources/e2e/renderer/despatchadvice/DespatchAdviceTest/minData.xml index ed28a68b..5494d7fd 100644 --- a/core/src/test/resources/e2e/renderer/despatchadvice/DespatchAdviceTest/minData.xml +++ b/core/src/test/resources/e2e/renderer/despatchadvice/DespatchAdviceTest/minData.xml @@ -72,8 +72,8 @@ - 010101} - DireccionOrigen} + 010101 + DireccionOrigen From ae464bc68443686e20f24d189660ce732e84d119 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sat, 25 Feb 2023 15:40:35 +0100 Subject: [PATCH 08/19] REfactor imports --- .../github/project/openubl/xbuilder/content/jaxb/Mapper.java | 4 ++-- .../project/openubl/xbuilder/enricher/ContentEnricher.java | 1 - .../e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java | 2 +- .../src/test/java/e2e/renderer/creditnote/CreditNoteTest.java | 2 +- core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java | 2 +- .../test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java | 2 +- .../test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java | 2 +- .../test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java | 2 +- .../e2e/renderer/invoice/InvoiceDireccionEntregaTest.java | 2 +- .../e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java | 2 +- .../e2e/renderer/invoice/InvoiceFechaVencimientoTest.java | 2 +- .../test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java | 2 +- core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java | 2 +- core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java | 2 +- .../test/java/e2e/renderer/invoice/InvoiceIssue30Test.java | 2 +- core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java | 2 +- .../java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java | 2 +- .../test/java/e2e/renderer/invoice/InvoicePercepcionTest.java | 2 +- core/src/test/java/e2e/renderer/invoice/InvoiceTest.java | 2 +- .../test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java | 2 +- .../src/test/java/e2e/renderer/perception/PerceptionTest.java | 1 - core/src/test/java/e2e/renderer/retention/RetentionTest.java | 1 - 22 files changed, 20 insertions(+), 23 deletions(-) diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java index f60cf88d..0b4d2fa9 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java @@ -26,10 +26,10 @@ import io.github.project.openubl.xbuilder.content.jaxb.models.XMLAddress; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLContact; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLCustomer; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSignature; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplier; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSignature; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplier; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Contacto; import io.github.project.openubl.xbuilder.content.models.common.Direccion; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/enricher/ContentEnricher.java b/core/src/main/java/io/github/project/openubl/xbuilder/enricher/ContentEnricher.java index 5ba3e545..1ba1a9f1 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/enricher/ContentEnricher.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/enricher/ContentEnricher.java @@ -34,7 +34,6 @@ import io.github.project.openubl.xbuilder.enricher.kie.ruleunits.HeaderRuleContext; import io.github.project.openubl.xbuilder.enricher.kie.ruleunits.HeaderRuleUnit; -import java.time.LocalDate; import java.util.stream.Stream; public class ContentEnricher { diff --git a/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java b/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java index 35a31f15..59880a1f 100644 --- a/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java +++ b/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java @@ -19,11 +19,11 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java b/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java index 8a50cd7c..0ed45977 100644 --- a/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java +++ b/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java @@ -19,11 +19,11 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java b/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java index 111bee81..e266964f 100644 --- a/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java +++ b/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java @@ -19,11 +19,11 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java index 82ddba63..428434c8 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java @@ -19,12 +19,12 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.Anticipo; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java index 53be8888..777567da 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java @@ -20,12 +20,12 @@ import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog53; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.Descuento; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java index 3cfe7441..affc4111 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java @@ -20,12 +20,12 @@ import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog59; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.Detraccion; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java index 8f408d0b..ef906905 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java @@ -19,12 +19,12 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Direccion; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java index 222f5d76..046ac61e 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java @@ -20,12 +20,12 @@ import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog12; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoRelacionado; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java index 8a3aeea2..da05490a 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java @@ -19,11 +19,11 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java index e61a32a0..9c996878 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java @@ -19,13 +19,13 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CuotaDePago; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.FormaDePago; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java index e943d0bd..8d90ba92 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java @@ -20,12 +20,12 @@ import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog1; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Guia; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java index 3dc2e867..6f600242 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java @@ -21,11 +21,11 @@ import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; import io.github.project.openubl.xbuilder.content.catalogs.Catalog7; import io.github.project.openubl.xbuilder.content.catalogs.Catalog8; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java b/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java index ccf8fd9a..0601788a 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java @@ -19,11 +19,11 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java b/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java index d966718a..214d7bff 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java @@ -19,11 +19,11 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java index 0e168adb..9eb1f486 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java @@ -19,11 +19,11 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java b/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java index 303190fd..313b41c9 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java @@ -19,12 +19,12 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; import io.github.project.openubl.xbuilder.content.models.standard.general.Percepcion; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java index 76369aab..bd6a40b7 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java @@ -19,6 +19,7 @@ import e2e.AbstractTest; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Contacto; import io.github.project.openubl.xbuilder.content.models.common.Direccion; @@ -26,7 +27,6 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java index 27f29919..4bda3e6b 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java @@ -20,11 +20,11 @@ import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; import io.github.project.openubl.xbuilder.content.catalogs.Catalog7; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; diff --git a/core/src/test/java/e2e/renderer/perception/PerceptionTest.java b/core/src/test/java/e2e/renderer/perception/PerceptionTest.java index 51ed7acd..9df822b1 100644 --- a/core/src/test/java/e2e/renderer/perception/PerceptionTest.java +++ b/core/src/test/java/e2e/renderer/perception/PerceptionTest.java @@ -24,7 +24,6 @@ import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; -import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.PercepcionRetencionOperacion; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Perception; diff --git a/core/src/test/java/e2e/renderer/retention/RetentionTest.java b/core/src/test/java/e2e/renderer/retention/RetentionTest.java index 75cb72ed..a52286ed 100644 --- a/core/src/test/java/e2e/renderer/retention/RetentionTest.java +++ b/core/src/test/java/e2e/renderer/retention/RetentionTest.java @@ -26,7 +26,6 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.PercepcionRetencionOperacion; -import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Perception; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Retention; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; From 36aa9a1cd24a53ce4d48d9cf5ab840dc20f6275b Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sun, 26 Feb 2023 10:14:41 +0100 Subject: [PATCH 09/19] Refactor tests --- core/pom.xml | 13 + .../xbuilder/content/jaxb/Unmarshall.java | 16 +- core/src/test/java/e2e/AbstractTest.java | 150 +- .../creditnote/CreditNoteIscTest.java | 50 +- .../CreditNoteOrdenDeCompraTest.java | 22 +- .../renderer/creditnote/CreditNoteTest.java | 22 +- .../e2e/renderer/debitnote/DebitNoteTest.java | 22 +- .../despatchadvice/DespatchAdviceTest.java | 22 +- .../invoice/InvoiceAnticiposTest.java | 19 +- .../invoice/InvoiceDescuentosTest.java | 47 +- .../invoice/InvoiceDetraccionTest.java | 19 +- .../invoice/InvoiceDireccionEntregaTest.java | 33 +- .../InvoiceDocumentoRelacionadoTest.java | 19 +- .../invoice/InvoiceFechaVencimientoTest.java | 19 +- .../invoice/InvoiceFormaPagoTest.java | 33 +- .../renderer/invoice/InvoiceGuiasTest.java | 19 +- .../e2e/renderer/invoice/InvoiceIscTest.java | 75 +- .../renderer/invoice/InvoiceIssue30Test.java | 61 +- .../e2e/renderer/invoice/InvoiceMoneda.java | 19 +- .../invoice/InvoiceOrdeDeCompraTest.java | 19 +- .../invoice/InvoicePercepcionTest.java | 19 +- .../e2e/renderer/invoice/InvoiceTest.java | 120 +- .../renderer/invoice/InvoiceTipoIgvTest.java | 64 +- .../renderer/perception/PerceptionTest.java | 22 +- .../e2e/renderer/retention/RetentionTest.java | 22 +- .../SummaryDocumentsTest.java | 22 +- .../voideddocument/VoidedDocumentsTest.java | 50 +- quarkus-extension/integration-tests/pom.xml | 19 + .../xbuilder/it/QuarkusXbuilderResource.java | 38 +- .../it/QuarkusXbuilderResourceTest.java | 1210 +---------------- .../Group1Test/factura1Con3Items.yaml | 324 +++++ .../Group1Test/factura2Con2Items.yaml | 271 ++++ .../Group1Test/factura3Con1Items.yaml | 218 +++ .../Group1Test/factura4Con5Items.yaml | 430 ++++++ .../Group1Test/factura5Con4Items.yaml | 377 +++++ .../Group1Test/notaDeCreditoDeFactura2.yaml | 268 ++++ .../Group1Test/notaDeCreditoDeFactura3.yaml | 215 +++ .../Group1Test/notaDeCreditoDeFactura4.yaml | 427 ++++++ .../Group1Test/notaDeDebitoDeFactura2.yaml | 268 ++++ .../Group1Test/notaDeDebitoDeFactura3.yaml | 215 +++ .../Group1Test/notaDeDebitoDeFactura4.yaml | 427 ++++++ .../factura1Con1Items.yaml | 218 +++ .../factura2Con4Items.yaml | 389 ++++++ .../factura3Con7Items.yaml | 548 ++++++++ .../factura4Con5Items.yaml | 442 ++++++ .../factura5Con6Items.yaml | 495 +++++++ .../notaDeCreditoDeFactura1.yaml | 215 +++ .../notaDeCreditoDeFactura3.yaml | 545 ++++++++ .../notaDeCreditoDeFactura5.yaml | 439 ++++++ .../notaDeDebitoDeFactura1.yaml | 215 +++ .../notaDeDebitoDeFactura3.yaml | 545 ++++++++ .../notaDeDebitoDeFactura5.yaml | 492 +++++++ .../Group2InafectoTest/factura1Con1Items.yaml | 218 +++ .../Group2InafectoTest/factura2Con4Items.yaml | 389 ++++++ .../Group2InafectoTest/factura3Con7Items.yaml | 548 ++++++++ .../Group2InafectoTest/factura4Con5Items.yaml | 442 ++++++ .../Group2InafectoTest/factura5Con6Items.yaml | 495 +++++++ .../notaDeCreditoDeFactura1.yaml | 215 +++ .../notaDeCreditoDeFactura3.yaml | 545 ++++++++ .../notaDeCreditoDeFactura5.yaml | 439 ++++++ .../notaDeDebitoDeFactura1.yaml | 215 +++ .../notaDeDebitoDeFactura3.yaml | 545 ++++++++ .../notaDeDebitoDeFactura5.yaml | 492 +++++++ .../Group3Test/factura1Con7Items.yaml | 536 ++++++++ .../Group3Test/factura2Con2Items.yaml | 271 ++++ .../Group3Test/factura3Con5Items.yaml | 430 ++++++ .../Group3Test/factura4Con4Items.yaml | 377 +++++ .../Group3Test/factura5Con3Items.yaml | 324 +++++ .../Group4Test/factura1Con2Items.yaml | 282 ++++ .../Group4Test/factura2Con2Items.yaml | 282 ++++ .../Group4Test/factura3Con4Items.yaml | 388 ++++++ .../Group4Test/factura4Con3Items.yaml | 347 +++++ .../Group4Test/factura5Con5Items.yaml | 441 ++++++ .../Group4Test/notaDeCreditoDeFactura2.yaml | 268 ++++ .../Group4Test/notaDeCreditoDeFactura3.yaml | 321 +++++ .../Group4Test/notaDeCreditoDeFactura5.yaml | 427 ++++++ .../Group4Test/notaDeDebitoDeFactura2.yaml | 268 ++++ .../Group4Test/notaDeDebitoDeFactura3.yaml | 321 +++++ .../Group4Test/notaDeDebitoDeFactura5.yaml | 427 ++++++ .../Group5Test/factura1Con5Items.yaml | 506 +++++++ .../Group5Test/notaDeCreditoDeFactura1.yaml | 503 +++++++ .../Group5Test/notaDeDebitoDeFactura2.yaml | 503 +++++++ .../Group6Test/factura1Con5Items.yaml | 449 ++++++ .../Group6Test/notaDeCreditoDeFactura1.yaml | 427 ++++++ .../Group6Test/notaDeDebitoDeFactura1.yaml | 427 ++++++ .../Group7Test/factura1Con5Items.yaml | 506 +++++++ .../Group7Test/notaDeCreditoDeFactura1.yaml | 503 +++++++ .../Group7Test/notaDeDebitoDeFactura2.yaml | 503 +++++++ .../isc_aplicacionAlMontoFijo.yaml | 292 ++++ .../CreditNoteIscTest/isc_sistemaAlValor.yaml | 292 ++++ ...isc_sistemaDePreciosDeVentalAlPublico.yaml | 292 ++++ .../ordenDeCompra.yaml | 272 ++++ .../CreditNoteTest/MinData_RUC.yaml | 268 ++++ .../debitnote/DebitNoteTest/MinData_RUC.yaml | 268 ++++ .../DespatchAdviceTest/minData.yaml | 144 ++ .../InvoiceAnticiposTest/minAnticipos.yaml | 296 ++++ .../descuentoGlobal.yaml | 229 ++++ .../descuentoGlobal_tipo02.yaml | 229 ++++ .../descuentoGlobal_tipo03.yaml | 229 ++++ .../InvoiceDetraccionTest/detraccion.yaml | 239 ++++ .../direccionEntregaFull.yaml | 300 ++++ .../direccionEntregaMin.yaml | 284 ++++ .../documentoRelacionado.yaml | 281 ++++ .../conFechaVencimiento.yaml | 273 ++++ .../InvoiceFormaPagoTest/conFormaPago.yaml | 288 ++++ .../InvoiceFormaPagoTest/sinFormaPago.yaml | 271 ++++ .../invoice/InvoiceGuiasTest/guiaSerieT.yaml | 277 ++++ .../isc_aplicacionAlMontoFijo.yaml | 295 ++++ .../InvoiceIscTest/isc_mixedTipoIgv.yaml | 519 +++++++ .../isc_precioConImpuestos.yaml | 342 +++++ .../InvoiceIscTest/isc_sistemaAlValor.yaml | 295 ++++ ...isc_sistemaDePreciosDeVentalAlPublico.yaml | 295 ++++ .../with-precioUnitario-ICB.yaml | 241 ++++ .../with-precioUnitario-conImpuestos-ICB.yaml | 241 ++++ .../with-precioUnitario.yaml | 218 +++ .../with-precioUnitarioConImpuestos.yaml | 218 +++ .../invoice/InvoiceMoneda/customMoneda.yaml | 218 +++ .../ordenDeCompra.yaml | 275 ++++ .../InvoicePercepcionTest/percepcion.yaml | 237 ++++ .../customClienteDireccionAndContacto.yaml | 301 ++++ .../InvoiceTest/customCodigoLocal.yaml | 275 ++++ .../InvoiceTest/customFechaEmision.yaml | 273 ++++ .../invoice/InvoiceTest/customFirmante.yaml | 271 ++++ .../customProveedorDireccionAndContacto.yaml | 296 ++++ .../InvoiceTest/customUnidadMedida.yaml | 271 ++++ .../e2e/renderer/invoice/InvoiceTest/icb.yaml | 306 +++++ ...nvoice_pr_EXONERADO_OPERACION_ONEROSA.yaml | 218 +++ ...e_pr_EXONERADO_TRANSFERENCIA_GRATUITA.yaml | 218 +++ .../invoice_pr_EXPORTACION.yaml | 217 +++ .../invoice_pr_GRAVADO_BONIFICACIONES.yaml | 218 +++ .../invoice_pr_GRAVADO_IVAP.yaml | 220 +++ .../invoice_pr_GRAVADO_OPERACION_ONEROSA.yaml | 218 +++ .../invoice_pr_GRAVADO_RETIRO.yaml | 218 +++ ...nvoice_pr_GRAVADO_RETIRO_POR_DONACION.yaml | 218 +++ ...ADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml | 218 +++ .../invoice_pr_GRAVADO_RETIRO_POR_PREMIO.yaml | 218 +++ ...oice_pr_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml | 218 +++ ...invoice_pr_INAFECTO_OPERACION_ONEROSA.yaml | 218 +++ .../invoice_pr_INAFECTO_RETIRO.yaml | 218 +++ ...e_pr_INAFECTO_RETIRO_POR_BONIFICACION.yaml | 218 +++ ...NAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml | 218 +++ ..._INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml | 218 +++ ...invoice_pr_INAFECTO_RETIRO_POR_PREMIO.yaml | 218 +++ ...ice_pr_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml | 218 +++ ...ce_pr_icb_EXONERADO_OPERACION_ONEROSA.yaml | 241 ++++ ..._icb_EXONERADO_TRANSFERENCIA_GRATUITA.yaml | 241 ++++ .../invoice_pr_icb_EXPORTACION.yaml | 240 ++++ ...invoice_pr_icb_GRAVADO_BONIFICACIONES.yaml | 241 ++++ .../invoice_pr_icb_GRAVADO_IVAP.yaml | 243 ++++ ...oice_pr_icb_GRAVADO_OPERACION_ONEROSA.yaml | 241 ++++ .../invoice_pr_icb_GRAVADO_RETIRO.yaml | 241 ++++ ...ce_pr_icb_GRAVADO_RETIRO_POR_DONACION.yaml | 241 ++++ ...ADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml | 241 ++++ ...oice_pr_icb_GRAVADO_RETIRO_POR_PREMIO.yaml | 241 ++++ ..._pr_icb_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml | 241 ++++ ...ice_pr_icb_INAFECTO_OPERACION_ONEROSA.yaml | 241 ++++ .../invoice_pr_icb_INAFECTO_RETIRO.yaml | 241 ++++ ..._icb_INAFECTO_RETIRO_POR_BONIFICACION.yaml | 241 ++++ ...NAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml | 241 ++++ ..._INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml | 241 ++++ ...ice_pr_icb_INAFECTO_RETIRO_POR_PREMIO.yaml | 241 ++++ ...pr_icb_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml | 241 ++++ ...r_icb_isc_EXONERADO_OPERACION_ONEROSA.yaml | 241 ++++ ..._isc_EXONERADO_TRANSFERENCIA_GRATUITA.yaml | 241 ++++ .../invoice_pr_icb_isc_EXPORTACION.yaml | 240 ++++ ...ice_pr_icb_isc_GRAVADO_BONIFICACIONES.yaml | 241 ++++ ..._pr_icb_isc_GRAVADO_OPERACION_ONEROSA.yaml | 265 ++++ .../invoice_pr_icb_isc_GRAVADO_RETIRO.yaml | 241 ++++ ...r_icb_isc_GRAVADO_RETIRO_POR_DONACION.yaml | 241 ++++ ...ADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml | 241 ++++ ..._pr_icb_isc_GRAVADO_RETIRO_POR_PREMIO.yaml | 241 ++++ ...icb_isc_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml | 241 ++++ ...pr_icb_isc_INAFECTO_OPERACION_ONEROSA.yaml | 241 ++++ .../invoice_pr_icb_isc_INAFECTO_RETIRO.yaml | 241 ++++ ..._isc_INAFECTO_RETIRO_POR_BONIFICACION.yaml | 241 ++++ ...NAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml | 241 ++++ ..._INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml | 241 ++++ ...pr_icb_isc_INAFECTO_RETIRO_POR_PREMIO.yaml | 241 ++++ ...cb_isc_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml | 241 ++++ ...nvoice_pu_EXONERADO_OPERACION_ONEROSA.yaml | 218 +++ ...e_pu_EXONERADO_TRANSFERENCIA_GRATUITA.yaml | 218 +++ .../invoice_pu_EXPORTACION.yaml | 217 +++ .../invoice_pu_GRAVADO_BONIFICACIONES.yaml | 218 +++ .../invoice_pu_GRAVADO_IVAP.yaml | 220 +++ .../invoice_pu_GRAVADO_OPERACION_ONEROSA.yaml | 218 +++ .../invoice_pu_GRAVADO_RETIRO.yaml | 218 +++ ...nvoice_pu_GRAVADO_RETIRO_POR_DONACION.yaml | 218 +++ ...ADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml | 218 +++ .../invoice_pu_GRAVADO_RETIRO_POR_PREMIO.yaml | 218 +++ ...oice_pu_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml | 218 +++ ...invoice_pu_INAFECTO_OPERACION_ONEROSA.yaml | 218 +++ .../invoice_pu_INAFECTO_RETIRO.yaml | 218 +++ ...e_pu_INAFECTO_RETIRO_POR_BONIFICACION.yaml | 218 +++ ...NAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml | 218 +++ ..._INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml | 218 +++ ...invoice_pu_INAFECTO_RETIRO_POR_PREMIO.yaml | 218 +++ ...ice_pu_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml | 218 +++ .../PerceptionTest/perception_simple.yaml | 121 ++ .../RetentionTest/retention_simple.yaml | 121 ++ .../summaryDocuments.yaml | 190 +++ .../VoidedDocumentsTest/voidedDocument.yaml | 98 ++ ...dedDocument_autoGeneratedFechaEmision.yaml | 98 ++ ...Document_autoGeneratedTipoComprobante.yaml | 98 ++ 203 files changed, 50314 insertions(+), 1980 deletions(-) create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura1Con3Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura2Con2Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura3Con1Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura4Con5Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura5Con4Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura2.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura3.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura4.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura2.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura3.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura4.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura1Con1Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura2Con4Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura3Con7Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura4Con5Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura5Con6Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura1.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura3.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura5.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura1.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura3.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura5.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura1Con1Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura2Con4Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura3Con7Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura4Con5Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura5Con6Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura1.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura3.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura5.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura1.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura3.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura5.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura1Con7Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura2Con2Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura3Con5Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura4Con4Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura5Con3Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura1Con2Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura2Con2Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura3Con4Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura4Con3Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura5Con5Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura2.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura3.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura5.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura2.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura3.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura5.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/factura1Con5Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeCreditoDeFactura1.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeDebitoDeFactura2.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/factura1Con5Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeCreditoDeFactura1.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeDebitoDeFactura1.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/factura1Con5Items.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeCreditoDeFactura1.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeDebitoDeFactura2.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_aplicacionAlMontoFijo.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaAlValor.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest/ordenDeCompra.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteTest/MinData_RUC.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/debitnote/DebitNoteTest/MinData_RUC.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/despatchadvice/DespatchAdviceTest/minData.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceAnticiposTest/minAnticipos.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo02.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo03.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDetraccionTest/detraccion.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaFull.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaMin.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest/documentoRelacionado.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFechaVencimientoTest/conFechaVencimiento.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/conFormaPago.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/sinFormaPago.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceGuiasTest/guiaSerieT.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_aplicacionAlMontoFijo.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_mixedTipoIgv.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_precioConImpuestos.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaAlValor.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-ICB.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-conImpuestos-ICB.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitarioConImpuestos.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceMoneda/customMoneda.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceOrdeDeCompraTest/ordenDeCompra.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoicePercepcionTest/percepcion.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customClienteDireccionAndContacto.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customCodigoLocal.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFechaEmision.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFirmante.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customProveedorDireccionAndContacto.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customUnidadMedida.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/icb.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_OPERACION_ONEROSA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_TRANSFERENCIA_GRATUITA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXPORTACION.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_BONIFICACIONES.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_IVAP.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_OPERACION_ONEROSA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_DONACION.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PREMIO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_OPERACION_ONEROSA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_BONIFICACION.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PREMIO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_OPERACION_ONEROSA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_TRANSFERENCIA_GRATUITA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXPORTACION.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_BONIFICACIONES.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_IVAP.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_OPERACION_ONEROSA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_DONACION.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PREMIO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_OPERACION_ONEROSA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_BONIFICACION.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PREMIO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_OPERACION_ONEROSA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_TRANSFERENCIA_GRATUITA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXPORTACION.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_BONIFICACIONES.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_OPERACION_ONEROSA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_DONACION.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PREMIO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_OPERACION_ONEROSA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_BONIFICACION.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PREMIO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_OPERACION_ONEROSA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_TRANSFERENCIA_GRATUITA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXPORTACION.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_BONIFICACIONES.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_IVAP.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_OPERACION_ONEROSA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_DONACION.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PREMIO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_OPERACION_ONEROSA.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_BONIFICACION.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PREMIO.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/perception/PerceptionTest/perception_simple.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/retention/RetentionTest/retention_simple.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/summarydocuments/SummaryDocumentsTest/summaryDocuments.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedFechaEmision.yaml create mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedTipoComprobante.yaml diff --git a/core/pom.xml b/core/pom.xml index 38937e74..d3d4617f 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -52,6 +52,19 @@ jackson-databind 2.14.2 + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + 2.14.2 + test + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + 2.14.2 + test + + io.swagger.core.v3 swagger-annotations diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java index b5212274..b5e118a7 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java @@ -478,7 +478,7 @@ public static DespatchAdvice unmarshallDespatchAdvice(String xml) throws JAXBExc } } - public static T unmarshall(InputStream documentOXML, InputSource inputSource) throws JAXBException { + private static T unmarshall(InputStream documentOXML, InputSource inputSource) throws JAXBException { Map properties = new HashMap<>(); properties.put(JAXBContextProperties.OXM_METADATA_SOURCE, List.of( Objects.requireNonNull(documentOXML) @@ -489,7 +489,7 @@ public static T unmarshall(InputStream documentOXML, InputSource inputSource return (T) unmarshaller.unmarshal(inputSource); } - public static void enrichSalesDocument(XMLSalesDocument xmlSalesDocument, SalesDocument.SalesDocumentBuilder builder) { + private static void enrichSalesDocument(XMLSalesDocument xmlSalesDocument, SalesDocument.SalesDocumentBuilder builder) { enrichDocument(xmlSalesDocument, builder); // Leyendas @@ -528,7 +528,7 @@ public static void enrichSalesDocument(XMLSalesDocument xmlSalesDocument, SalesD builder.detalles(Mapper.mapDetalles(xmlSalesDocument.getLines())); } - public static void enrichNote(XMLSalesDocument xmlSalesDocument, Note.NoteBuilder builder) { + private static void enrichNote(XMLSalesDocument xmlSalesDocument, Note.NoteBuilder builder) { enrichDocument(xmlSalesDocument, builder); // ComprobanteAfectado @@ -540,7 +540,7 @@ public static void enrichNote(XMLSalesDocument xmlSalesDocument, Note.NoteBuilde builder.totalImporte(Mapper.mapTotalImporteNote(xmlSalesDocument.getMonetaryTotal())); } - public static void enrichBasePercepcionRetencion(XMLPercepcionRetencion xmlDocument, BasePercepcionRetencion.BasePercepcionRetencionBuilder builder) { + private static void enrichBasePercepcionRetencion(XMLPercepcionRetencion xmlDocument, BasePercepcionRetencion.BasePercepcionRetencionBuilder builder) { enrichDocument(xmlDocument, builder); // Numero @@ -591,7 +591,7 @@ public static void enrichBasePercepcionRetencion(XMLPercepcionRetencion xmlDocum } - public static void enrichSunatDocument(XMLSunatDocument xmlDocument, SunatDocument.SunatDocumentBuilder builder) { + private static void enrichSunatDocument(XMLSunatDocument xmlDocument, SunatDocument.SunatDocumentBuilder builder) { enrichDocument(xmlDocument, builder); // Numero @@ -604,21 +604,21 @@ public static void enrichSunatDocument(XMLSunatDocument xmlDocument, SunatDocume builder.fechaEmisionComprobantes(xmlDocument.getReferenceDate()); } - public static void enrichDocument(XMLSalesDocument xmlSalesDocument, Document.DocumentBuilder builder) { + private static void enrichDocument(XMLSalesDocument xmlSalesDocument, Document.DocumentBuilder builder) { builder.moneda(xmlSalesDocument.getDocumentCurrencyCode()); builder.fechaEmision(xmlSalesDocument.getIssueDate()); builder.proveedor(Mapper.mapProveedor(xmlSalesDocument.getAccountingSupplierParty())); builder.firmante(Mapper.mapFirmante(xmlSalesDocument.getSignature())); } - public static void enrichDocument(XMLPercepcionRetencion xmlDocument, Document.DocumentBuilder builder) { + private static void enrichDocument(XMLPercepcionRetencion xmlDocument, Document.DocumentBuilder builder) { builder.moneda(xmlDocument.getTotalInvoiceAmount_currencyId()); builder.fechaEmision(xmlDocument.getIssueDate()); builder.proveedor(Mapper.mapProveedor(xmlDocument.getAccountingSupplierParty())); builder.firmante(Mapper.mapFirmante(xmlDocument.getSignature())); } - public static void enrichDocument(XMLSunatDocument xmlDocument, Document.DocumentBuilder builder) { + private static void enrichDocument(XMLSunatDocument xmlDocument, Document.DocumentBuilder builder) { builder.moneda(null); builder.fechaEmision(xmlDocument.getIssueDate()); builder.proveedor(Mapper.mapProveedor(xmlDocument.getAccountingSupplierParty())); diff --git a/core/src/test/java/e2e/AbstractTest.java b/core/src/test/java/e2e/AbstractTest.java index 21eda27d..2f308fa9 100644 --- a/core/src/test/java/e2e/AbstractTest.java +++ b/core/src/test/java/e2e/AbstractTest.java @@ -16,19 +16,36 @@ */ package e2e; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; +import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator; +import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.models.standard.guia.DespatchAdvice; +import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocuments; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Perception; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Retention; +import io.github.project.openubl.xbuilder.content.models.sunat.resumen.SummaryDocuments; import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.github.project.openubl.xbuilder.enricher.config.DateProvider; import io.github.project.openubl.xbuilder.enricher.config.Defaults; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; +import java.io.IOException; import java.math.BigDecimal; +import java.net.URISyntaxException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.time.LocalDate; +import java.util.Map; public class AbstractTest { @@ -40,7 +57,32 @@ public class AbstractTest { protected static final DateProvider dateProvider = () -> LocalDate.of(2019, 12, 24); - protected void assertInput(Invoice input, String snapshot) throws Exception { + public YAMLMapper getYamlMapper() { + YAMLMapper mapper = new YAMLMapper(new YAMLFactory()); + mapper.registerModule(new JavaTimeModule()); + mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); + mapper.configure(YAMLGenerator.Feature.LITERAL_BLOCK_STYLE, true); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + return mapper; + } + + public void writeYaml(String kind, Object input, String snapshotFilename) throws URISyntaxException, IOException { + String rootDir = getClass().getName().replaceAll("\\.", "/"); + + String snapshotFileContent = Files.readString(Paths.get(getClass().getClassLoader().getResource(rootDir + "/" + snapshotFilename).toURI())); + + Path directoryPath = Paths.get("target", "openubl", "testcases").resolve(rootDir); + Files.createDirectories(directoryPath); + Path filePath = directoryPath.resolve(snapshotFilename.replaceAll(".xml", "") + ".yaml"); + + getYamlMapper().writeValue(filePath.toFile(), Map.of( + "kind", kind, + "input", input, + "snapshot", snapshotFileContent + )); + } + + protected void assertInput(Invoice input, String snapshotFilename) throws Exception { ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); enricher.enrich(input); @@ -52,11 +94,13 @@ protected void assertInput(Invoice input, String snapshot) throws Exception { String reconstructedXml = template.data(inputFromXml).render(); // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshot); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + + writeYaml("Invoice", input, snapshotFilename); } - protected void assertInput(CreditNote input, String snapshot) throws Exception { + protected void assertInput(CreditNote input, String snapshotFilename) throws Exception { ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); enricher.enrich(input); @@ -68,11 +112,13 @@ protected void assertInput(CreditNote input, String snapshot) throws Exception { String reconstructedXml = template.data(inputFromXml).render(); // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshot); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.CREDIT_NOTE_XSD); + + writeYaml("CreditNote", input, snapshotFilename); } - protected void assertInput(DebitNote input, String snapshot) throws Exception { + protected void assertInput(DebitNote input, String snapshotFilename) throws Exception { ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); enricher.enrich(input); @@ -84,7 +130,99 @@ protected void assertInput(DebitNote input, String snapshot) throws Exception { String reconstructedXml = template.data(inputFromXml).render(); // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshot); + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.DEBIT_NOTE_XSD); + + writeYaml("DebitNote", input, snapshotFilename); + } + + protected void assertInput(VoidedDocuments input, String snapshotFilename) throws Exception { + ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); + enricher.enrich(input); + + // When + Template template = TemplateProducer.getInstance().getVoidedDocument(); + String xml = template.data(input).render(); + + VoidedDocuments inputFromXml = Unmarshall.unmarshallVoidedDocuments(xml); + String reconstructedXml = template.data(inputFromXml).render(); + + // Then + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); + XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.VOIDED_DOCUMENTS_XSD); + + writeYaml("VoidedDocuments", input, snapshotFilename); + } + + protected void assertInput(SummaryDocuments input, String snapshotFilename) throws Exception { + ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); + enricher.enrich(input); + + // When + Template template = TemplateProducer.getInstance().getSummaryDocuments(); + String xml = template.data(input).render(); + + SummaryDocuments inputFromXml = Unmarshall.unmarshallSummaryDocuments(xml); + String reconstructedXml = template.data(inputFromXml).render(); + + // Then + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); + XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.SUMMARY_DOCUMENTS_XSD); + + writeYaml("SummaryDocuments", input, snapshotFilename); + } + + protected void assertInput(Perception input, String snapshotFilename) throws Exception { + ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); + enricher.enrich(input); + + // When + Template template = TemplateProducer.getInstance().getPerception(); + String xml = template.data(input).render(); + + Perception inputFromXml = Unmarshall.unmarshallPerception(xml); + String reconstructedXml = template.data(inputFromXml).render(); + + // Then + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); + XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.PERCEPTION_XSD); + + writeYaml("Perception", input, snapshotFilename); + } + + protected void assertInput(Retention input, String snapshotFilename) throws Exception { + ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); + enricher.enrich(input); + + // When + Template template = TemplateProducer.getInstance().getRetention(); + String xml = template.data(input).render(); + + Retention inputFromXml = Unmarshall.unmarshallRetention(xml); + String reconstructedXml = template.data(inputFromXml).render(); + + // Then + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); + XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.RETENTION_XSD); + + writeYaml("Retention", input, snapshotFilename); + } + + protected void assertInput(DespatchAdvice input, String snapshotFilename) throws Exception { + ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); + enricher.enrich(input); + + // When + Template template = TemplateProducer.getInstance().getDespatchAdvice(); + String xml = template.data(input).render(); + + DespatchAdvice inputFromXml = Unmarshall.unmarshallDespatchAdvice(xml); + String reconstructedXml = template.data(inputFromXml).render(); + + // Then + XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); + XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.DESPATCH_ADVICE_XSD); + + writeYaml("DespatchAdvice", input, snapshotFilename); } } diff --git a/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java b/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java index ff04712c..54d3713e 100644 --- a/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java +++ b/core/src/test/java/e2e/renderer/creditnote/CreditNoteIscTest.java @@ -17,24 +17,16 @@ package e2e.renderer.creditnote; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; import io.github.project.openubl.xbuilder.content.catalogs.Catalog8; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; -import static e2e.renderer.XMLAssertUtils.assertSendSunat; -import static e2e.renderer.XMLAssertUtils.assertSnapshot; - public class CreditNoteIscTest extends AbstractTest { @Test @@ -72,19 +64,7 @@ public void testIsc_sistemaAlValor() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getCreditNote(); - String xml = template.data(input).render(); - - CreditNote inputFromXml = Unmarshall.unmarshallCreditNote(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "isc_sistemaAlValor.xml"); - assertSendSunat(xml, XMLAssertUtils.CREDIT_NOTE_XSD); + assertInput(input, "isc_sistemaAlValor.xml"); } @Test @@ -122,19 +102,7 @@ public void testIsc_aplicacionAlMontoFijo() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getCreditNote(); - String xml = template.data(input).render(); - - CreditNote inputFromXml = Unmarshall.unmarshallCreditNote(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "isc_aplicacionAlMontoFijo.xml"); - assertSendSunat(xml, XMLAssertUtils.CREDIT_NOTE_XSD); + assertInput(input, "isc_aplicacionAlMontoFijo.xml"); } @Test @@ -172,18 +140,6 @@ public void testIsc_sistemaDePreciosDeVentalAlPublico() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getCreditNote(); - String xml = template.data(input).render(); - - CreditNote inputFromXml = Unmarshall.unmarshallCreditNote(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "isc_sistemaDePreciosDeVentalAlPublico.xml"); - assertSendSunat(xml, XMLAssertUtils.CREDIT_NOTE_XSD); + assertInput(input, "isc_sistemaDePreciosDeVentalAlPublico.xml"); } } diff --git a/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java b/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java index 59880a1f..50c7b3d4 100644 --- a/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java +++ b/core/src/test/java/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest.java @@ -17,23 +17,15 @@ package e2e.renderer.creditnote; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; -import static e2e.renderer.XMLAssertUtils.assertSendSunat; -import static e2e.renderer.XMLAssertUtils.assertSnapshot; - public class CreditNoteOrdenDeCompraTest extends AbstractTest { @Test @@ -70,18 +62,6 @@ public void testInvoiceWithCustomUnidadMedida() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getCreditNote(); - String xml = template.data(input).render(); - - CreditNote inputFromXml = Unmarshall.unmarshallCreditNote(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "ordenDeCompra.xml"); - assertSendSunat(xml, XMLAssertUtils.CREDIT_NOTE_XSD); + assertInput(input, "ordenDeCompra.xml"); } } diff --git a/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java b/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java index 0ed45977..69f627a4 100644 --- a/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java +++ b/core/src/test/java/e2e/renderer/creditnote/CreditNoteTest.java @@ -17,23 +17,15 @@ package e2e.renderer.creditnote; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; -import static e2e.renderer.XMLAssertUtils.assertSendSunat; -import static e2e.renderer.XMLAssertUtils.assertSnapshot; - public class CreditNoteTest extends AbstractTest { @Test @@ -69,18 +61,6 @@ public void testInvoiceWithCustomUnidadMedida() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getCreditNote(); - String xml = template.data(input).render(); - - CreditNote inputFromXml = Unmarshall.unmarshallCreditNote(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "MinData_RUC.xml"); - assertSendSunat(xml, XMLAssertUtils.CREDIT_NOTE_XSD); + assertInput(input, "MinData_RUC.xml"); } } diff --git a/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java b/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java index e266964f..b4487913 100644 --- a/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java +++ b/core/src/test/java/e2e/renderer/debitnote/DebitNoteTest.java @@ -17,23 +17,15 @@ package e2e.renderer.debitnote; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; -import static e2e.renderer.XMLAssertUtils.assertSendSunat; -import static e2e.renderer.XMLAssertUtils.assertSnapshot; - public class DebitNoteTest extends AbstractTest { @Test @@ -69,18 +61,6 @@ public void testInvoiceWithCustomUnidadMedida() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getDebitNote(); - String xml = template.data(input).render(); - - DebitNote inputFromXml = Unmarshall.unmarshallDebitNote(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "MinData_RUC.xml"); - assertSendSunat(xml, XMLAssertUtils.DEBIT_NOTE_XSD); + assertInput(input, "MinData_RUC.xml"); } } diff --git a/core/src/test/java/e2e/renderer/despatchadvice/DespatchAdviceTest.java b/core/src/test/java/e2e/renderer/despatchadvice/DespatchAdviceTest.java index 0674621b..97f4f870 100644 --- a/core/src/test/java/e2e/renderer/despatchadvice/DespatchAdviceTest.java +++ b/core/src/test/java/e2e/renderer/despatchadvice/DespatchAdviceTest.java @@ -17,12 +17,10 @@ package e2e.renderer.despatchadvice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog1; import io.github.project.openubl.xbuilder.content.catalogs.Catalog18; import io.github.project.openubl.xbuilder.content.catalogs.Catalog20; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.standard.guia.DespatchAdvice; import io.github.project.openubl.xbuilder.content.models.standard.guia.DespatchAdviceItem; import io.github.project.openubl.xbuilder.content.models.standard.guia.Destinatario; @@ -30,16 +28,10 @@ import io.github.project.openubl.xbuilder.content.models.standard.guia.Envio; import io.github.project.openubl.xbuilder.content.models.standard.guia.Partida; import io.github.project.openubl.xbuilder.content.models.standard.guia.Remitente; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; -import static e2e.renderer.XMLAssertUtils.assertSendSunat; -import static e2e.renderer.XMLAssertUtils.assertSnapshot; - public class DespatchAdviceTest extends AbstractTest { @Test @@ -87,19 +79,7 @@ public void testBasicMinData() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getDespatchAdvice(); - String xml = template.data(input).render(); - - DespatchAdvice inputFromXml = Unmarshall.unmarshallDespatchAdvice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "minData.xml"); - assertSendSunat(xml, XMLAssertUtils.DESPATCH_ADVICE_XSD); + assertInput(input, "minData.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java index 428434c8..d97df134 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceAnticiposTest.java @@ -17,17 +17,12 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.Anticipo; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -66,18 +61,6 @@ public void testFechaVencimiento() throws Exception { .anticipo(Anticipo.builder().comprobanteSerieNumero("F001-2").monto(new BigDecimal("100")).build()) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "minAnticipos.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "minAnticipos.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java index 777567da..ed275aa6 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDescuentosTest.java @@ -17,18 +17,13 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog53; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.Descuento; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -64,19 +59,7 @@ public void descuentoGlobal() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "descuentoGlobal.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "descuentoGlobal.xml"); } @Test @@ -109,19 +92,7 @@ public void descuentoGlobal_tipo02() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "descuentoGlobal_tipo02.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "descuentoGlobal_tipo02.xml"); } @Test @@ -154,19 +125,7 @@ public void descuentoGlobal_tipo03() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "descuentoGlobal_tipo03.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "descuentoGlobal_tipo03.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java index affc4111..a899cf33 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDetraccionTest.java @@ -17,18 +17,13 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog59; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.Detraccion; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -68,18 +63,6 @@ public void testFechaVencimiento() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "detraccion.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "detraccion.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java index ef906905..a7433c14 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDireccionEntregaTest.java @@ -17,17 +17,12 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Direccion; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -66,19 +61,7 @@ public void testDireccionEntregaMin() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "direccionEntregaMin.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "direccionEntregaMin.xml"); } @Test @@ -123,18 +106,6 @@ public void testDireccionEntregaFull() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "direccionEntregaFull.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "direccionEntregaFull.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java index 046ac61e..7fa943b1 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest.java @@ -17,18 +17,13 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog12; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoRelacionado; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -72,18 +67,6 @@ public void testDocumentoRelacionado() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "documentoRelacionado.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "documentoRelacionado.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java index da05490a..2b6bad40 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceFechaVencimientoTest.java @@ -17,16 +17,11 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -66,18 +61,6 @@ public void testFechaVencimiento() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "conFechaVencimiento.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "conFechaVencimiento.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java index 9c996878..9e08b31e 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceFormaPagoTest.java @@ -17,18 +17,13 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.CuotaDePago; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.FormaDePago; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -68,19 +63,7 @@ public void testInvoiceWithFormaPagoContadoPorDefecto() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "sinFormaPago.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "sinFormaPago.xml"); } @Test @@ -127,18 +110,6 @@ public void testInvoiceWithFormaPagoCredito() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "conFormaPago.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "conFormaPago.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java index 8d90ba92..97896236 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceGuiasTest.java @@ -17,18 +17,13 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog1; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Guia; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -69,18 +64,6 @@ public void testGuiaConSerieT() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "guiaSerieT.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "guiaSerieT.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java index 6f600242..4d457a5c 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceIscTest.java @@ -17,18 +17,13 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; import io.github.project.openubl.xbuilder.content.catalogs.Catalog7; import io.github.project.openubl.xbuilder.content.catalogs.Catalog8; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -68,19 +63,7 @@ public void testIsc_sistemaAlValor() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "isc_sistemaAlValor.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "isc_sistemaAlValor.xml"); } @Test @@ -116,19 +99,7 @@ public void testIsc_aplicacionAlMontoFijo() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "isc_aplicacionAlMontoFijo.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "isc_aplicacionAlMontoFijo.xml"); } @Test @@ -164,19 +135,7 @@ public void testIsc_sistemaDePreciosDeVentalAlPublico() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "isc_sistemaDePreciosDeVentalAlPublico.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "isc_sistemaDePreciosDeVentalAlPublico.xml"); } @Test @@ -219,19 +178,7 @@ public void testIsc_precioConImpuestos() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "isc_precioConImpuestos.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "isc_precioConImpuestos.xml"); } @Test @@ -304,18 +251,6 @@ public void testIsc_mixedTipoIgv() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "isc_mixedTipoIgv.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "isc_mixedTipoIgv.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java b/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java index 0601788a..4634d684 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceIssue30Test.java @@ -17,16 +17,11 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -54,19 +49,7 @@ public void testInvoice_withPrecioUnitario() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "with-precioUnitario.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "with-precioUnitario.xml"); } @Test @@ -91,19 +74,7 @@ public void testInvoice_withPrecioConIgv() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "with-precioUnitarioConImpuestos.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "with-precioUnitarioConImpuestos.xml"); } @Test @@ -128,19 +99,7 @@ public void testInvoice_withPrecioUnitario_andICB() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "with-precioUnitario-ICB.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "with-precioUnitario-ICB.xml"); } @Test @@ -166,18 +125,6 @@ public void testInvoice_withPrecioConIgv_andICB() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "with-precioUnitario-conImpuestos-ICB.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "with-precioUnitario-conImpuestos-ICB.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java b/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java index 214d7bff..e3b598ec 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceMoneda.java @@ -17,16 +17,11 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -59,19 +54,7 @@ public void testCustomMoneda() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "customMoneda.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "customMoneda.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java index 9eb1f486..f4eea57c 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceOrdeDeCompraTest.java @@ -17,16 +17,11 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -65,18 +60,6 @@ public void testFechaVencimiento() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "ordenDeCompra.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "ordenDeCompra.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java b/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java index 313b41c9..3062cfb4 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoicePercepcionTest.java @@ -17,17 +17,12 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; import io.github.project.openubl.xbuilder.content.models.standard.general.Percepcion; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -60,18 +55,6 @@ public void testFechaVencimiento() throws Exception { .percepcion(Percepcion.builder().tipo("51").porcentaje(new BigDecimal("0.02")).build()) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), "percepcion.xml"); - XMLAssertUtils.assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "percepcion.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java index bd6a40b7..925f02b0 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceTest.java @@ -17,9 +17,7 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Contacto; import io.github.project.openubl.xbuilder.content.models.common.Direccion; @@ -27,9 +25,6 @@ import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; @@ -37,9 +32,6 @@ import java.time.LocalTime; import java.time.Month; -import static e2e.renderer.XMLAssertUtils.assertSendSunat; -import static e2e.renderer.XMLAssertUtils.assertSnapshot; - public class InvoiceTest extends AbstractTest { @Test @@ -75,19 +67,7 @@ public void testInvoiceWithCustomUnidadMedida() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "customUnidadMedida.xml"); - assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "customUnidadMedida.xml"); } @Test @@ -126,19 +106,7 @@ public void testInvoiceWithCustomFechaEmision() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "customFechaEmision.xml"); - assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "customFechaEmision.xml"); } @Test @@ -184,19 +152,7 @@ public void testInvoiceWithCustomClienteDireccionAndContacto() throws Exception ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "customClienteDireccionAndContacto.xml"); - assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "customClienteDireccionAndContacto.xml"); } @Test @@ -242,19 +198,7 @@ public void testInvoiceWithCustomProveedorDireccionAndContacto() throws Exceptio ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "customProveedorDireccionAndContacto.xml"); - assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "customProveedorDireccionAndContacto.xml"); } @Test @@ -293,19 +237,7 @@ public void testInvoiceWithCustomFirmante() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "customFirmante.xml"); - assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "customFirmante.xml"); } @Test @@ -341,19 +273,7 @@ public void testInvoiceWithICB_precioUnitario() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "icb.xml"); - assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "icb.xml"); } @Test @@ -391,19 +311,7 @@ public void testInvoiceWithICB_precioConIgv() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "icb.xml"); - assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "icb.xml"); } @Test @@ -438,18 +346,6 @@ public void testInvoiceWithCustomProveedor_direccionNotNullAndCodigoLocalNull() ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "customCodigoLocal.xml"); - assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "customCodigoLocal.xml"); } } diff --git a/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java b/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java index 4bda3e6b..747a9de6 100644 --- a/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java +++ b/core/src/test/java/e2e/renderer/invoice/InvoiceTipoIgvTest.java @@ -17,25 +17,17 @@ package e2e.renderer.invoice; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; import io.github.project.openubl.xbuilder.content.catalogs.Catalog7; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.EnumSource; import java.math.BigDecimal; -import static e2e.renderer.XMLAssertUtils.assertSendSunat; -import static e2e.renderer.XMLAssertUtils.assertSnapshot; - public class InvoiceTipoIgvTest extends AbstractTest { @ParameterizedTest @@ -65,19 +57,7 @@ public void testInvoice(Catalog7 tipoIgv) throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "invoice_pu_" + tipoIgv + ".xml"); - assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "invoice_pu_" + tipoIgv + ".xml"); } @ParameterizedTest @@ -108,19 +88,7 @@ public void testInvoiceWithPrecionConImpuestos(Catalog7 tipoIgv) throws Exceptio ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "invoice_pr_" + tipoIgv + ".xml"); - assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "invoice_pr_" + tipoIgv + ".xml"); } @ParameterizedTest @@ -152,19 +120,7 @@ public void testInvoiceWithPrecionConImpuestosAndIcb(Catalog7 tipoIgv) throws Ex ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "invoice_pr_icb_" + tipoIgv + ".xml"); - assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "invoice_pr_icb_" + tipoIgv + ".xml"); } @ParameterizedTest @@ -202,18 +158,6 @@ public void testInvoiceWithPrecionConImpuestosAndIcbAndIsc(Catalog7 tipoIgv) thr ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getInvoice(); - String xml = template.data(input).render(); - - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "invoice_pr_icb_isc_" + tipoIgv + ".xml"); - assertSendSunat(xml, XMLAssertUtils.INVOICE_XSD); + assertInput(input, "invoice_pr_icb_isc_" + tipoIgv + ".xml"); } } diff --git a/core/src/test/java/e2e/renderer/perception/PerceptionTest.java b/core/src/test/java/e2e/renderer/perception/PerceptionTest.java index 9df822b1..bd0917ca 100644 --- a/core/src/test/java/e2e/renderer/perception/PerceptionTest.java +++ b/core/src/test/java/e2e/renderer/perception/PerceptionTest.java @@ -17,27 +17,19 @@ package e2e.renderer.perception; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog1; import io.github.project.openubl.xbuilder.content.catalogs.Catalog22; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.PercepcionRetencionOperacion; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Perception; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; import java.time.LocalDate; -import static e2e.renderer.XMLAssertUtils.assertSendSunat; -import static e2e.renderer.XMLAssertUtils.assertSnapshot; - public class PerceptionTest extends AbstractTest { @Test @@ -78,19 +70,7 @@ public void testSimplePerception() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getPerception(); - String xml = template.data(input).render(); - - Perception inputFromXml = Unmarshall.unmarshallPerception(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "perception_simple.xml"); - assertSendSunat(xml, XMLAssertUtils.PERCEPTION_XSD); + assertInput(input, "perception_simple.xml"); } } diff --git a/core/src/test/java/e2e/renderer/retention/RetentionTest.java b/core/src/test/java/e2e/renderer/retention/RetentionTest.java index a52286ed..060bc3ba 100644 --- a/core/src/test/java/e2e/renderer/retention/RetentionTest.java +++ b/core/src/test/java/e2e/renderer/retention/RetentionTest.java @@ -17,27 +17,19 @@ package e2e.renderer.retention; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog1; import io.github.project.openubl.xbuilder.content.catalogs.Catalog23; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.PercepcionRetencionOperacion; import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Retention; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; import java.time.LocalDate; -import static e2e.renderer.XMLAssertUtils.assertSendSunat; -import static e2e.renderer.XMLAssertUtils.assertSnapshot; - public class RetentionTest extends AbstractTest { @Test @@ -78,19 +70,7 @@ public void testSimplePerception() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getRetention(); - String xml = template.data(input).render(); - - Retention inputFromXml = Unmarshall.unmarshallRetention(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "retention_simple.xml"); - assertSendSunat(xml, XMLAssertUtils.RETENTION_XSD); + assertInput(input, "retention_simple.xml"); } } diff --git a/core/src/test/java/e2e/renderer/summarydocuments/SummaryDocumentsTest.java b/core/src/test/java/e2e/renderer/summarydocuments/SummaryDocumentsTest.java index cb300951..4d0a35fc 100644 --- a/core/src/test/java/e2e/renderer/summarydocuments/SummaryDocumentsTest.java +++ b/core/src/test/java/e2e/renderer/summarydocuments/SummaryDocumentsTest.java @@ -17,12 +17,10 @@ package e2e.renderer.summarydocuments; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog1; import io.github.project.openubl.xbuilder.content.catalogs.Catalog19; import io.github.project.openubl.xbuilder.content.catalogs.Catalog1_Invoice; import io.github.project.openubl.xbuilder.content.catalogs.Catalog6; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Cliente; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.sunat.resumen.Comprobante; @@ -31,16 +29,10 @@ import io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteValorVenta; import io.github.project.openubl.xbuilder.content.models.sunat.resumen.SummaryDocuments; import io.github.project.openubl.xbuilder.content.models.sunat.resumen.SummaryDocumentsItem; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.math.BigDecimal; -import static e2e.renderer.XMLAssertUtils.assertSendSunat; -import static e2e.renderer.XMLAssertUtils.assertSnapshot; - public class SummaryDocumentsTest extends AbstractTest { @Test @@ -110,19 +102,7 @@ public void testMultipleVoidedDocuments() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getSummaryDocuments(); - String xml = template.data(input).render(); - - SummaryDocuments inputFromXml = Unmarshall.unmarshallSummaryDocuments(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "summaryDocuments.xml"); - assertSendSunat(xml, XMLAssertUtils.SUMMARY_DOCUMENTS_XSD); + assertInput(input, "summaryDocuments.xml"); } } diff --git a/core/src/test/java/e2e/renderer/voideddocument/VoidedDocumentsTest.java b/core/src/test/java/e2e/renderer/voideddocument/VoidedDocumentsTest.java index fc6b31b2..e5425602 100644 --- a/core/src/test/java/e2e/renderer/voideddocument/VoidedDocumentsTest.java +++ b/core/src/test/java/e2e/renderer/voideddocument/VoidedDocumentsTest.java @@ -17,22 +17,14 @@ package e2e.renderer.voideddocument; import e2e.AbstractTest; -import e2e.renderer.XMLAssertUtils; import io.github.project.openubl.xbuilder.content.catalogs.Catalog1_Invoice; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.common.Proveedor; import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocuments; import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocumentsItem; -import io.github.project.openubl.xbuilder.enricher.ContentEnricher; -import io.github.project.openubl.xbuilder.renderer.TemplateProducer; -import io.quarkus.qute.Template; import org.junit.jupiter.api.Test; import java.time.LocalDate; -import static e2e.renderer.XMLAssertUtils.assertSendSunat; -import static e2e.renderer.XMLAssertUtils.assertSnapshot; - public class VoidedDocumentsTest extends AbstractTest { @Test @@ -63,19 +55,7 @@ public void testMultipleVoidedDocuments() throws Exception { ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getVoidedDocument(); - String xml = template.data(input).render(); - - VoidedDocuments inputFromXml = Unmarshall.unmarshallVoidedDocuments(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "voidedDocument.xml"); - assertSendSunat(xml, XMLAssertUtils.VOIDED_DOCUMENTS_XSD); + assertInput(input, "voidedDocument.xml"); } @Test @@ -105,19 +85,7 @@ public void testMultipleVoidedDocuments_autoGeneratedFechaEmision() throws Excep ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getVoidedDocument(); - String xml = template.data(input).render(); - - VoidedDocuments inputFromXml = Unmarshall.unmarshallVoidedDocuments(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "voidedDocument_autoGeneratedFechaEmision.xml"); - assertSendSunat(xml, XMLAssertUtils.VOIDED_DOCUMENTS_XSD); + assertInput(input, "voidedDocument_autoGeneratedFechaEmision.xml"); } @Test @@ -146,18 +114,6 @@ public void testMultipleVoidedDocuments_autoGeneratedTipoComprobante() throws Ex ) .build(); - ContentEnricher enricher = new ContentEnricher(defaults, dateProvider); - enricher.enrich(input); - - // When - Template template = TemplateProducer.getInstance().getVoidedDocument(); - String xml = template.data(input).render(); - - VoidedDocuments inputFromXml = Unmarshall.unmarshallVoidedDocuments(xml); - String reconstructedXml = template.data(inputFromXml).render(); - - // Then - assertSnapshot(xml, reconstructedXml, getClass(), "voidedDocument_autoGeneratedTipoComprobante.xml"); - assertSendSunat(xml, XMLAssertUtils.VOIDED_DOCUMENTS_XSD); + assertInput(input, "voidedDocument_autoGeneratedTipoComprobante.xml"); } } diff --git a/quarkus-extension/integration-tests/pom.xml b/quarkus-extension/integration-tests/pom.xml index 6a656623..2ae121f5 100644 --- a/quarkus-extension/integration-tests/pom.xml +++ b/quarkus-extension/integration-tests/pom.xml @@ -33,6 +33,25 @@ ${project.parent.basedir} + + com.fasterxml.jackson.core + jackson-databind + 2.14.2 + test + + + com.fasterxml.jackson.dataformat + jackson-dataformat-yaml + 2.14.2 + test + + + com.fasterxml.jackson.datatype + jackson-datatype-jsr310 + 2.14.2 + test + + io.quarkus quarkus-resteasy-qute diff --git a/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java b/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java index 3284ee6e..04d1d5c5 100644 --- a/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java +++ b/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java @@ -17,6 +17,7 @@ package io.github.project.openubl.quarkus.xbuilder.it; import io.github.project.openubl.quarkus.xbuilder.XBuilder; +import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; @@ -36,6 +37,8 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import javax.xml.bind.JAXBException; +import java.io.IOException; import java.time.LocalDate; import static io.github.project.openubl.quarkus.xbuilder.XBuilder.Type.CREDIT_NOTE; @@ -47,18 +50,18 @@ import static io.github.project.openubl.quarkus.xbuilder.XBuilder.Type.SUMMARY_DOCUMENTS; import static io.github.project.openubl.quarkus.xbuilder.XBuilder.Type.VOIDED_DOCUMENTS; -@ApplicationScoped -@Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.TEXT_PLAIN) +@ApplicationScoped @Path("/quarkus-xbuilder") public class QuarkusXbuilderResource { @Inject XBuilder xBuilder; + @Consumes(MediaType.APPLICATION_JSON) @POST - @Path("invoice") - public String createInvoice(JsonObject json) { + @Path("Invoice/from-json") + public String createInvoiceXml(JsonObject json) { Invoice invoice = json.mapTo(Invoice.class); ContentEnricher enricher = new ContentEnricher(xBuilder.getDefaults(), () -> LocalDate.of(2022, 1, 25)); @@ -68,8 +71,18 @@ public String createInvoice(JsonObject json) { return template.data(invoice).render(); } + @Consumes(MediaType.TEXT_PLAIN) + @POST + @Path("Invoice/from-xml") + public String createInvoicePojo(String xml) throws JAXBException, IOException { + Invoice invoice = Unmarshall.unmarshallInvoice(xml); + + Template template = xBuilder.getTemplate(INVOICE); + return template.data(invoice).render(); + } + @POST - @Path("credit-note") + @Path("CreditNote/from-json") public String createCreditNote(JsonObject json) { CreditNote creditNote = json.mapTo(CreditNote.class); @@ -81,7 +94,7 @@ public String createCreditNote(JsonObject json) { } @POST - @Path("debit-note") + @Path("DebitNote/from-json") public String createDebitNote(JsonObject json) { DebitNote debitNote = json.mapTo(DebitNote.class); @@ -93,7 +106,7 @@ public String createDebitNote(JsonObject json) { } @POST - @Path("voided-documents") + @Path("VoidedDocuments/from-json") public String createVoidedDocuments(JsonObject json) { VoidedDocuments voidedDocuments = json.mapTo(VoidedDocuments.class); @@ -105,7 +118,7 @@ public String createVoidedDocuments(JsonObject json) { } @POST - @Path("summary-documents") + @Path("SummaryDocuments/from-json") public String createSummaryDocuments(JsonObject json) { SummaryDocuments summaryDocuments = json.mapTo(SummaryDocuments.class); @@ -117,7 +130,7 @@ public String createSummaryDocuments(JsonObject json) { } @POST - @Path("perception") + @Path("Perception/from-json") public String createPerception(JsonObject json) { Perception perception = json.mapTo(Perception.class); @@ -129,7 +142,7 @@ public String createPerception(JsonObject json) { } @POST - @Path("retention") + @Path("Retention/from-json") public String createRetention(JsonObject json) { Retention retention = json.mapTo(Retention.class); @@ -141,7 +154,7 @@ public String createRetention(JsonObject json) { } @POST - @Path("despatch-advice") + @Path("DespatchAdvice/from-json") public String createDespatchAdvice(JsonObject json) { DespatchAdvice despatchAdvice = json.mapTo(DespatchAdvice.class); @@ -149,8 +162,7 @@ public String createDespatchAdvice(JsonObject json) { enricher.enrich(despatchAdvice); Template template = xBuilder.getTemplate(DESPATCH_ADVICE); - String xml = template.data(despatchAdvice).render(); - return xml; + return template.data(despatchAdvice).render(); } } diff --git a/quarkus-extension/integration-tests/src/test/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResourceTest.java b/quarkus-extension/integration-tests/src/test/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResourceTest.java index 123666a1..46da4738 100644 --- a/quarkus-extension/integration-tests/src/test/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResourceTest.java +++ b/quarkus-extension/integration-tests/src/test/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResourceTest.java @@ -16,6 +16,12 @@ */ package io.github.project.openubl.quarkus.xbuilder.it; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.SerializationFeature; +import com.fasterxml.jackson.dataformat.yaml.YAMLFactory; +import com.fasterxml.jackson.dataformat.yaml.YAMLGenerator; +import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import io.github.project.openubl.xbuilder.content.catalogs.Catalog1; import io.github.project.openubl.xbuilder.content.catalogs.Catalog18; import io.github.project.openubl.xbuilder.content.catalogs.Catalog19; @@ -50,10 +56,18 @@ import io.github.project.openubl.xbuilder.content.models.sunat.resumen.SummaryDocumentsItem; import io.quarkus.test.junit.QuarkusTest; import io.restassured.http.ContentType; +import io.vertx.core.json.JsonObject; import org.junit.jupiter.api.Test; +import java.io.IOException; import java.math.BigDecimal; +import java.net.URISyntaxException; +import java.net.URL; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; import java.time.LocalDate; +import java.util.Map; import static io.restassured.RestAssured.given; import static org.hamcrest.Matchers.is; @@ -61,1172 +75,42 @@ @QuarkusTest public class QuarkusXbuilderResourceTest { - @Test - public void testInvoice() { - Invoice invoice = Invoice.builder() - .serie("F001") - .numero(1) - .proveedor(Proveedor.builder() - .ruc("12345678912") - .razonSocial("Softgreen S.A.C.") - .build() - ) - .cliente(Cliente.builder() - .nombre("Carlos Feria") - .numeroDocumentoIdentidad("12121212121") - .tipoDocumentoIdentidad(Catalog6.RUC.toString()) - .build() - ) - .detalle(DocumentoVentaDetalle.builder() - .descripcion("Item1") - .cantidad(new BigDecimal("10")) - .precio(new BigDecimal("100")) - .build() - ) - .build(); - - given() - .when() - .contentType(ContentType.JSON) - .body(invoice) - .post("/quarkus-xbuilder/invoice") - .then() - .statusCode(200) - .body(is( - "\n" + - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 2.1\n" + - " 2.0\n" + - " F001-1\n" + - " 2022-01-25\n" + - " 01\n" + - " PEN\n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " #PROJECT-OPENUBL-SIGN\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 0000\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 12121212121\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " FormaPago\n" + - " Contado\n" + - " \n" + - " \n" + - " 200.00\n" + - " \n" + - " 1000.00\n" + - " 200.00\n" + - " \n" + - " S\n" + - " \n" + - " 1000\n" + - " IGV\n" + - " VAT\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 1000.00\n" + - " 1200.00\n" + - " 0\n" + - " 0\n" + - " 1200.00\n" + - " \n" + - " \n" + - " 1\n" + - " 10\n" + - " 1000.00\n" + - " \n" + - " \n" + - " 120.00\n" + - " 01\n" + - " \n" + - " \n" + - " \n" + - " 200.00\n" + - " \n" + - " 1000.00\n" + - " 200.00\n" + - " \n" + - " S\n" + - " 20.00\n" + - " 10\n" + - " \n" + - " 1000\n" + - " IGV\n" + - " VAT\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 100.00\n" + - " \n" + - " \n" + - "\n" - ) - ); - } - - @Test - public void testCreditNote() { - CreditNote creditNote = CreditNote.builder() - .serie("FC01") - .numero(1) - .comprobanteAfectadoSerieNumero("F001-1") - .sustentoDescripcion("mi sustento") - .proveedor(Proveedor.builder() - .ruc("12345678912") - .razonSocial("Softgreen S.A.C.") - .build() - ) - .cliente(Cliente.builder() - .nombre("Carlos Feria") - .numeroDocumentoIdentidad("12121212121") - .tipoDocumentoIdentidad(Catalog6.RUC.toString()) - .build() - ) - .detalle(DocumentoVentaDetalle.builder() - .descripcion("Item1") - .cantidad(new BigDecimal("10")) - .precio(new BigDecimal("100")) - .build() - ) - .build(); - - given() - .when() - .contentType(ContentType.JSON) - .body(creditNote) - .post("/quarkus-xbuilder/credit-note") - .then() - .statusCode(200) - .body(is( - "\n" + - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 2.1\n" + - " 2.0\n" + - " FC01-1\n" + - " 2022-01-25\n" + - " PEN\n" + - " \n" + - " F001-1\n" + - " 01\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " F001-1\n" + - " 01\n" + - " \n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " #PROJECT-OPENUBL-SIGN\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 0000\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 12121212121\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 200.00\n" + - " \n" + - " 1000.00\n" + - " 200.00\n" + - " \n" + - " S\n" + - " \n" + - " 1000\n" + - " IGV\n" + - " VAT\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 1000.00\n" + - " 1200.00\n" + - " 1200.00\n" + - " \n" + - " \n" + - " 1\n" + - " 10\n" + - " 1000.00\n" + - " \n" + - " \n" + - " 120.00\n" + - " 01\n" + - " \n" + - " \n" + - " \n" + - " 200.00\n" + - " \n" + - " 1000.00\n" + - " 200.00\n" + - " \n" + - " S\n" + - " 20.00\n" + - " 10\n" + - " \n" + - " 1000\n" + - " IGV\n" + - " VAT\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 100.00\n" + - " \n" + - " \n" + - "\n" - ) - ); - } - - @Test - public void testDebitNote() { - DebitNote debitNote = DebitNote.builder() - .serie("FD01") - .numero(1) - .comprobanteAfectadoSerieNumero("F001-1") - .sustentoDescripcion("mi sustento") - .proveedor(Proveedor.builder() - .ruc("12345678912") - .razonSocial("Softgreen S.A.C.") - .build() - ) - .cliente(Cliente.builder() - .nombre("Carlos Feria") - .numeroDocumentoIdentidad("12121212121") - .tipoDocumentoIdentidad(Catalog6.RUC.toString()) - .build() - ) - .detalle(DocumentoVentaDetalle.builder() - .descripcion("Item1") - .cantidad(new BigDecimal("10")) - .precio(new BigDecimal("100")) - .build() - ) - .build(); - - given() - .when() - .contentType(ContentType.JSON) - .body(debitNote) - .post("/quarkus-xbuilder/debit-note") - .then() - .statusCode(200) - .body(is( - "\n" + - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 2.1\n" + - " 2.0\n" + - " FD01-1\n" + - " 2022-01-25\n" + - " PEN\n" + - " \n" + - " F001-1\n" + - " 01\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " F001-1\n" + - " 01\n" + - " \n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " #PROJECT-OPENUBL-SIGN\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 0000\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 12121212121\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 200.00\n" + - " \n" + - " 1000.00\n" + - " 200.00\n" + - " \n" + - " S\n" + - " \n" + - " 1000\n" + - " IGV\n" + - " VAT\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 1000.00\n" + - " 1200.00\n" + - " 1200.00\n" + - " \n" + - " \n" + - " 1\n" + - " 10\n" + - " 1000.00\n" + - " \n" + - " \n" + - " 120.00\n" + - " 01\n" + - " \n" + - " \n" + - " \n" + - " 200.00\n" + - " \n" + - " 1000.00\n" + - " 200.00\n" + - " \n" + - " S\n" + - " 20.00\n" + - " 10\n" + - " \n" + - " 1000\n" + - " IGV\n" + - " VAT\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 100.00\n" + - " \n" + - " \n" + - "\n" - ) - ); - } - - @Test - public void testVoidedDocuments() { - VoidedDocuments voidedDocuments = VoidedDocuments.builder() - .numero(1) - .fechaEmision(LocalDate.of(2022, 01, 31)) - .fechaEmisionComprobantes(LocalDate.of(2022, 01, 29)) - .proveedor(Proveedor.builder() - .ruc("12345678912") - .razonSocial("Softgreen S.A.C.") - .build() - ) - .comprobante(VoidedDocumentsItem.builder() - .serie("F001") - .numero(1) - .tipoComprobante(Catalog1_Invoice.FACTURA.getCode()) - .descripcionSustento("Mi sustento1") - .build() - ) - .comprobante(VoidedDocumentsItem.builder() - .serie("F001") - .numero(2) - .tipoComprobante(Catalog1_Invoice.FACTURA.getCode()) - .descripcionSustento("Mi sustento2") - .build() - ) - .build(); - - given() - .when() - .contentType(ContentType.JSON) - .body(voidedDocuments) - .post("/quarkus-xbuilder/voided-documents") - .then() - .statusCode(200) - .body(is("\n" + - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 2.0\n" + - " 1.0\n" + - " RA-20220131-1\n" + - " 2022-01-29\n" + - " 2022-01-31\n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " #PROJECT-OPENUBL-SIGN\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 12345678912\n" + - " 6\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 1\n" + - " 01\n" + - " F001\n" + - " 1\n" + - " Mi sustento1\n" + - " \n" + - " \n" + - " 2\n" + - " 01\n" + - " F001\n" + - " 2\n" + - " Mi sustento2\n" + - " \n" + - "\n")); + public YAMLMapper getYamlMapper() { + YAMLMapper mapper = new YAMLMapper(new YAMLFactory()); + mapper.registerModule(new JavaTimeModule()); + mapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false); + mapper.configure(YAMLGenerator.Feature.LITERAL_BLOCK_STYLE, true); + mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL); + return mapper; } @Test - public void testSummaryDocuments() { - SummaryDocuments summaryDocuments = SummaryDocuments.builder() - .numero(1) - .fechaEmision(LocalDate.of(2022, 01, 31)) - .fechaEmisionComprobantes(LocalDate.of(2022, 01, 29)) - .proveedor(Proveedor.builder() - .ruc("12345678912") - .razonSocial("Softgreen S.A.C.") - .build() - ) - .comprobante(SummaryDocumentsItem.builder() - .tipoOperacion(Catalog19.ADICIONAR.toString()) - .comprobante(Comprobante.builder() - .tipoComprobante(Catalog1_Invoice.BOLETA.getCode())// - .serieNumero("B001-1") - .cliente(Cliente.builder() - .nombre("Carlos Feria") - .numeroDocumentoIdentidad("12345678") - .tipoDocumentoIdentidad(Catalog6.DNI.getCode()) - .build() - ) - .impuestos(ComprobanteImpuestos.builder() - .igv(new BigDecimal("18")) - .icb(new BigDecimal(2)) - .build() - ) - .valorVenta(ComprobanteValorVenta.builder() - .importeTotal(new BigDecimal("120")) - .gravado(new BigDecimal("120")) - .build() - ) - .build() - ) - .build() - ) - .comprobante(SummaryDocumentsItem.builder() - .tipoOperacion(Catalog19.ADICIONAR.toString()) - .comprobante(Comprobante.builder() - .tipoComprobante(Catalog1.NOTA_CREDITO.getCode()) - .serieNumero("BC02-2") - .comprobanteAfectado(ComprobanteAfectado.builder() - .serieNumero("B002-2") - .tipoComprobante(Catalog1.BOLETA.getCode()) // - .build() - ) - .cliente(Cliente.builder() - .nombre("Carlos Feria") - .numeroDocumentoIdentidad("12345678") - .tipoDocumentoIdentidad(Catalog6.DNI.getCode())// - .build() - ) - .impuestos(ComprobanteImpuestos.builder() - .igv(new BigDecimal("18")) - .build() - ) - .valorVenta(ComprobanteValorVenta.builder() - .importeTotal(new BigDecimal("118")) - .gravado(new BigDecimal("118")) - .build() - ) - .build() - ) - .build() - ) - .build(); - - given() - .when() - .contentType(ContentType.JSON) - .body(summaryDocuments) - .post("/quarkus-xbuilder/summary-documents") - .then() - .statusCode(200) - .body(is("\n" + - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 2.0\n" + - " 1.1\n" + - " RC-20220131-1\n" + - " 2022-01-29\n" + - " 2022-01-31\n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " #PROJECT-OPENUBL-SIGN\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 12345678912\n" + - " 6\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 1\n" + - " 03\n" + - " B001-1\n" + - " \n" + - " 12345678\n" + - " 1\n" + - " \n" + - " \n" + - " 1\n" + - " \n" + - " 120\n" + - " \n" + - " 120\n" + - " 01\n" + - " \n" + - " \n" + - " 18\n" + - " \n" + - " 18\n" + - " \n" + - " \n" + - " 1000\n" + - " IGV\n" + - " VAT\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 2\n" + - " \n" + - " 2\n" + - " \n" + - " \n" + - " 7152\n" + - " ICBPER\n" + - " OTH\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 2\n" + - " 07\n" + - " BC02-2\n" + - " \n" + - " 12345678\n" + - " 1\n" + - " \n" + - " \n" + - " \n" + - " B002-2\n" + - " 03\n" + - " \n" + - " \n" + - " \n" + - " 1\n" + - " \n" + - " 118\n" + - " \n" + - " 118\n" + - " 01\n" + - " \n" + - " \n" + - " 18\n" + - " \n" + - " 18\n" + - " \n" + - " \n" + - " 1000\n" + - " IGV\n" + - " VAT\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - "\n")); + public void testAllYamlFilesFromSnapshot() throws URISyntaxException, IOException { + YAMLMapper yamlMapper = getYamlMapper(); + + URL url = getClass().getClassLoader().getResource("e2e"); + Path path = Paths.get(url.toURI()); + Files.walk(path, 5) + .filter(p -> !p.toFile().isDirectory()) + .forEach(p -> { + try { + Map jsonObject = yamlMapper.readValue(p.toFile(), Map.class); + String kind = (String) jsonObject.get("kind"); + String snapshot = (String) jsonObject.get("snapshot"); + Map input = (Map) jsonObject.get("input"); + + given() + .when() + .contentType(ContentType.JSON) + .body(input) + .post("/quarkus-xbuilder/" + kind + "/from-json") + .then() + .statusCode(200) + .body(is(snapshot)); + } catch (IOException e) { + throw new RuntimeException(e); + } + }); } - @Test - public void testPerception() { - Perception perception = Perception.builder() - .serie("P001") - .numero(1) - .fechaEmision(LocalDate.of(2022, 01, 31)) - .proveedor(Proveedor.builder() - .ruc("12345678912") - .razonSocial("Softgreen S.A.C.") - .build() - ) - .cliente(Cliente.builder() - .nombre("Carlos Feria") - .numeroDocumentoIdentidad("12121212121") - .tipoDocumentoIdentidad(Catalog6.RUC.getCode()) - .build() - ) - .importeTotalPercibido(new BigDecimal("10")) - .importeTotalCobrado(new BigDecimal("210")) - .tipoRegimen(Catalog22.VENTA_INTERNA.getCode()) - .tipoRegimenPorcentaje(Catalog22.VENTA_INTERNA.getPercent()) // - .operacion(PercepcionRetencionOperacion.builder() - .numeroOperacion(1) - .fechaOperacion(LocalDate.of(2022, 01, 31)) - .importeOperacion(new BigDecimal("100")) - .comprobante(io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado.builder() - .tipoComprobante(Catalog1.FACTURA.getCode()) - .serieNumero("F001-1") - .fechaEmision(LocalDate.of(2022, 01, 31)) - .importeTotal(new BigDecimal("200")) - .moneda("PEN") - .build() - ) - .build() - ) - .build(); - - given() - .when() - .contentType(ContentType.JSON) - .body(perception) - .post("/quarkus-xbuilder/perception") - .then() - .statusCode(200) - .body(is("\n" + - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 2.0\n" + - " 1.0\n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " #PROJECT-OPENUBL-SIGN\n" + - " \n" + - " \n" + - " \n" + - " P001-1\n" + - " 2022-01-31\n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 12121212121\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 01\n" + - " 2\n" + - " 10\n" + - " 210\n" + - " \n" + - " F001-1\n" + - " 2022-01-31\n" + - " 200\n" + - " \n" + - " 1\n" + - " 100\n" + - " 2022-01-31\n" + - " \n" + - " \n" + - " 10\n" + - " 2022-01-31\n" + - " 210\n" + - " \n" + - " \n" + - "\n")); - } - - @Test - public void testRetention() { - Retention retention = Retention.builder() - .serie("R001") - .numero(1) - .fechaEmision(LocalDate.of(2022, 01, 31)) - .proveedor(Proveedor.builder() - .ruc("12345678912") - .razonSocial("Softgreen S.A.C.") - .build() - ) - .cliente(Cliente.builder() - .nombre("Carlos Feria") - .numeroDocumentoIdentidad("12121212121") - .tipoDocumentoIdentidad(Catalog6.RUC.getCode()) - .build() - ) - .importeTotalRetenido(new BigDecimal("10")) - .importeTotalPagado(new BigDecimal("200")) - .tipoRegimen(Catalog23.TASA_TRES.getCode()) - .tipoRegimenPorcentaje(Catalog23.TASA_TRES.getPercent()) // - .operacion(PercepcionRetencionOperacion.builder() - .numeroOperacion(1) - .fechaOperacion(LocalDate.of(2022, 01, 31)) - .importeOperacion(new BigDecimal("100")) - .comprobante(io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado.builder() - .tipoComprobante(Catalog1.FACTURA.getCode()) - .serieNumero("F001-1") - .fechaEmision(LocalDate.of(2022, 01, 31)) - .importeTotal(new BigDecimal("210")) - .moneda("PEN") - .build() - ) - .build() - ) - .build(); - - given() - .when() - .contentType(ContentType.JSON) - .body(retention) - .post("/quarkus-xbuilder/retention") - .then() - .statusCode(200) - .body(is("\n" + - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 2.0\n" + - " 1.0\n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " #PROJECT-OPENUBL-SIGN\n" + - " \n" + - " \n" + - " \n" + - " R001-1\n" + - " 2022-01-31\n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 12121212121\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 01\n" + - " 3\n" + - " 10\n" + - " 200\n" + - " \n" + - " F001-1\n" + - " 2022-01-31\n" + - " 210\n" + - " \n" + - " 1\n" + - " 100\n" + - " 2022-01-31\n" + - " \n" + - " \n" + - " 10\n" + - " 2022-01-31\n" + - " 200\n" + - " \n" + - " \n" + - "\n")); - } - - @Test - public void testDespatchAdvice() { - DespatchAdvice despatchAdvice = DespatchAdvice.builder() - .serie("T001") - .numero(1) - .tipoComprobante(Catalog1.GUIA_REMISION_REMITENTE.getCode()) - .remitente(Remitente.builder() - .ruc("12345678912") - .razonSocial("Softgreen S.A.C.") - .build() - ) - .destinatario(Destinatario.builder() - .tipoDocumentoIdentidad(Catalog6.DNI.getCode()) - .numeroDocumentoIdentidad("12345678") - .nombre("mi cliente") - .build() - ) - .envio(Envio.builder() - .tipoTraslado(Catalog20.TRASLADO_EMISOR_ITINERANTE_CP.getCode()) - .pesoTotal(BigDecimal.ONE) - .pesoTotalUnidadMedida("KG") - .transbordoProgramado(false) - .tipoModalidadTraslado(Catalog18.TRANSPORTE_PRIVADO.getCode()) - .fechaTraslado(LocalDate.of(2022, 1, 25)) - .partida(Partida.builder() - .direccion("DireccionOrigen") - .ubigeo("010101") - .build() - ) - .destino(Destino.builder() - .direccion("DireccionDestino") - .ubigeo("020202") - .build() - ) - .build() - ) - .detalle(DespatchAdviceItem.builder() - .cantidad(new BigDecimal("0.5")) - .unidadMedida("KG") - .codigo("123456") - .build() - ) - .build(); - - given() - .when() - .contentType(ContentType.JSON) - .body(despatchAdvice) - .post("/quarkus-xbuilder/despatch-advice") - .then() - .statusCode(200) - .body(is("\n" + - "\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 2.1\n" + - " 2.0\n" + - " T001-1\n" + - " 2022-01-25\n" + - " 09\n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " #PROJECT-OPENUBL-SIGN\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " 12345678912\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 12345678\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 1\n" + - " 18\n" + - " 1.000\n" + - " false\n" + - " \n" + - " 02\n" + - " \n" + - " 2022-01-25\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 020202\n" + - " \n" + - " DireccionDestino\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 010101}\n" + - " DireccionOrigen}\n" + - " \n" + - " \n" + - " \n" + - " 1\n" + - " 0.5\n" + - " \n" + - " 1\n" + - " \n" + - " \n" + - " \n" + - " \n" + - " 123456\n" + - " \n" + - " \n" + - " \n" + - "\n")); - } } diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura1Con3Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura1Con3Items.yaml new file mode 100644 index 00000000..087b1c52 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura1Con3Items.yaml @@ -0,0 +1,324 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF11" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 252.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 252.000000000000 + gravadoBaseImponible: 1400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 1652.00 + importeSinImpuestos: 1400 + importeConImpuestos: 1652.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF11-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 252.00 + + 1400.00 + 252.00 + + S + + 1000 + IGV + VAT + + + + + + 1400.00 + 1652.00 + 0 + 0 + 1652.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura2Con2Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura2Con2Items.yaml new file mode 100644 index 00000000..676a50e6 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura2Con2Items.yaml @@ -0,0 +1,271 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF11" + numero: 2 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 90.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 90.000000000000 + gravadoBaseImponible: 500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 590.00 + importeSinImpuestos: 500 + importeConImpuestos: 590.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF11-2 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 90.00 + + 500.00 + 90.00 + + S + + 1000 + IGV + VAT + + + + + + 500.00 + 590.00 + 0 + 0 + 590.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura3Con1Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura3Con1Items.yaml new file mode 100644 index 00000000..a2034b87 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura3Con1Items.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF11" + numero: 3 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 18.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 18.000000000000 + gravadoBaseImponible: 100 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 118.00 + importeSinImpuestos: 100 + importeConImpuestos: 118.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF11-3 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 18.00 + + 100.00 + 18.00 + + S + + 1000 + IGV + VAT + + + + + + 100.00 + 118.00 + 0 + 0 + 118.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura4Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura4Con5Items.yaml new file mode 100644 index 00000000..c31f4dd2 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura4Con5Items.yaml @@ -0,0 +1,430 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF11" + numero: 4 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 990.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 990.000000000000 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 472.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 288.00 + igvBaseImponible: 1600 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 288.00 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 590.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 450.00 + igvBaseImponible: 2500 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 450.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 6490.00 + importeSinImpuestos: 5500 + importeConImpuestos: 6490.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF11-4 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 990.00 + + 5500.00 + 990.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 6490.00 + 0 + 0 + 6490.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 472.00 + 01 + + + + 288.00 + + 1600.00 + 288.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 590.00 + 01 + + + + 450.00 + + 2500.00 + 450.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura5Con4Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura5Con4Items.yaml new file mode 100644 index 00000000..75aa42f3 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura5Con4Items.yaml @@ -0,0 +1,377 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF11" + numero: 5 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 540.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 540.000000000000 + gravadoBaseImponible: 3000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 472.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 288.00 + igvBaseImponible: 1600 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 288.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 3540.00 + importeSinImpuestos: 3000 + importeConImpuestos: 3540.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF11-5 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 540.00 + + 3000.00 + 540.00 + + S + + 1000 + IGV + VAT + + + + + + 3000.00 + 3540.00 + 0 + 0 + 3540.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 472.00 + 01 + + + + 288.00 + + 1600.00 + 288.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura2.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura2.yaml new file mode 100644 index 00000000..a4bc78c6 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura2.yaml @@ -0,0 +1,268 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF11" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 90.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 90.00 + gravadoBaseImponible: 500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF11-2" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 590.00 + importeSinImpuestos: 500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF11-1 + 2019-12-24 + PEN + + FF11-2 + 01 + + + + + FF11-2 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 90.00 + + 500.00 + 90.00 + + S + + 1000 + IGV + VAT + + + + + + 500.00 + 590.00 + 590.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura3.yaml new file mode 100644 index 00000000..0791af39 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura3.yaml @@ -0,0 +1,215 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF11" + numero: 2 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 18.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 18.00 + gravadoBaseImponible: 100 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF11-3" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 118.00 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF11-2 + 2019-12-24 + PEN + + FF11-3 + 01 + + + + + FF11-3 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 18.00 + + 100.00 + 18.00 + + S + + 1000 + IGV + VAT + + + + + + 100.00 + 118.00 + 118.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura4.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura4.yaml new file mode 100644 index 00000000..8a1d78d3 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura4.yaml @@ -0,0 +1,427 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF11" + numero: 3 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 990.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 990.00 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 472.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 288.00 + igvBaseImponible: 1600 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 288.00 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 590.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 450.00 + igvBaseImponible: 2500 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 450.00 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF11-4" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 6490.00 + importeSinImpuestos: 5500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF11-3 + 2019-12-24 + PEN + + FF11-4 + 01 + + + + + FF11-4 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 990.00 + + 5500.00 + 990.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 6490.00 + 6490.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 472.00 + 01 + + + + 288.00 + + 1600.00 + 288.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 590.00 + 01 + + + + 450.00 + + 2500.00 + 450.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura2.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura2.yaml new file mode 100644 index 00000000..2d883801 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura2.yaml @@ -0,0 +1,268 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF11" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 90.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 90.00 + gravadoBaseImponible: 500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF11-2" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 590.00 + importeSinImpuestos: 500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF11-1 + 2019-12-24 + PEN + + FF11-2 + 01 + + + + + FF11-2 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 90.00 + + 500.00 + 90.00 + + S + + 1000 + IGV + VAT + + + + + + 500.00 + 590.00 + 590.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura3.yaml new file mode 100644 index 00000000..2327a9a0 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura3.yaml @@ -0,0 +1,215 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF11" + numero: 2 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 18.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 18.00 + gravadoBaseImponible: 100 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF11-3" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 118.00 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF11-2 + 2019-12-24 + PEN + + FF11-3 + 01 + + + + + FF11-3 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 18.00 + + 100.00 + 18.00 + + S + + 1000 + IGV + VAT + + + + + + 100.00 + 118.00 + 118.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura4.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura4.yaml new file mode 100644 index 00000000..d0298f0e --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura4.yaml @@ -0,0 +1,427 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF11" + numero: 3 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 990.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 990.00 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 472.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 288.00 + igvBaseImponible: 1600 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 288.00 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 590.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 450.00 + igvBaseImponible: 2500 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 450.00 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF11-4" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 6490.00 + importeSinImpuestos: 5500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF11-3 + 2019-12-24 + PEN + + FF11-4 + 01 + + + + + FF11-4 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 990.00 + + 5500.00 + 990.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 6490.00 + 6490.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 472.00 + 01 + + + + 288.00 + + 1600.00 + 288.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 590.00 + 01 + + + + 450.00 + + 2500.00 + 450.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura1Con1Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura1Con1Items.yaml new file mode 100644 index 00000000..56313464 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura1Con1Items.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 100 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura2Con4Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura2Con4Items.yaml new file mode 100644 index 00000000..6dfedba8 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura2Con4Items.yaml @@ -0,0 +1,389 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 2 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 100 + gratuitoImporte: 0 + gratuitoBaseImponible: 2900 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-2 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + 2900.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura3Con7Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura3Con7Items.yaml new file mode 100644 index 00000000..2bcc35e1 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura3Con7Items.yaml @@ -0,0 +1,548 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 3 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 100 + gratuitoImporte: 0 + gratuitoBaseImponible: 13900 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item6" + unidadMedida: "NIU" + cantidad: 6 + precio: 0 + precioConImpuestos: false + precioReferencia: 600 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 3600 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 3600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item7" + unidadMedida: "NIU" + cantidad: 7 + precio: 0 + precioConImpuestos: false + precioReferencia: 700 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 4900 + igvTipo: "36" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 4900 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-3 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + 13900.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 6 + 6 + 3600.00 + + + 600.00 + 02 + + + + 0.00 + + 3600.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 7 + 7 + 4900.00 + + + 700.00 + 02 + + + + 0.00 + + 4900.00 + 0.00 + + S + 0.00 + 36 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura4Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura4Con5Items.yaml new file mode 100644 index 00000000..4f70d5ce --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura4Con5Items.yaml @@ -0,0 +1,442 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 4 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 100 + gratuitoImporte: 0 + gratuitoBaseImponible: 5400 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-4 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + 5400.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura5Con6Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura5Con6Items.yaml new file mode 100644 index 00000000..b978093e --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura5Con6Items.yaml @@ -0,0 +1,495 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 5 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 100 + gratuitoImporte: 0 + gratuitoBaseImponible: 9000 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item6" + unidadMedida: "NIU" + cantidad: 6 + precio: 0 + precioConImpuestos: false + precioReferencia: 600 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 3600 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 3600 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-5 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + 9000.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 6 + 6 + 3600.00 + + + 600.00 + 02 + + + + 0.00 + + 3600.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura1.yaml new file mode 100644 index 00000000..cebc26e1 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura1.yaml @@ -0,0 +1,215 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 100 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF12-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 100 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-1 + 2019-12-24 + PEN + + FF12-1 + 01 + + + + + FF12-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + + 100.00 + 100.00 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura3.yaml new file mode 100644 index 00000000..221d4b9b --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura3.yaml @@ -0,0 +1,545 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 2 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 100 + gratuitoImporte: 0 + gratuitoBaseImponible: 13900 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item6" + unidadMedida: "NIU" + cantidad: 6 + precio: 0 + precioConImpuestos: false + precioReferencia: 600 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 3600 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 3600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item7" + unidadMedida: "NIU" + cantidad: 7 + precio: 0 + precioConImpuestos: false + precioReferencia: 700 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 4900 + igvTipo: "36" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 4900 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF12-3" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 100 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-2 + 2019-12-24 + PEN + + FF12-3 + 01 + + + + + FF12-3 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + 13900.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 6 + 6 + 3600.00 + + + 600.00 + 02 + + + + 0.00 + + 3600.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 7 + 7 + 4900.00 + + + 700.00 + 02 + + + + 0.00 + + 4900.00 + 0.00 + + S + 0.00 + 36 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura5.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura5.yaml new file mode 100644 index 00000000..fc70829f --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura5.yaml @@ -0,0 +1,439 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 3 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 100 + gratuitoImporte: 0 + gratuitoBaseImponible: 5400 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF12-5" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 100 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-3 + 2019-12-24 + PEN + + FF12-5 + 01 + + + + + FF12-5 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + 5400.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura1.yaml new file mode 100644 index 00000000..9f366856 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura1.yaml @@ -0,0 +1,215 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 100 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF12-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 100 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-1 + 2019-12-24 + PEN + + FF12-1 + 01 + + + + + FF12-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + + 100.00 + 100.00 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura3.yaml new file mode 100644 index 00000000..1c9c3160 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura3.yaml @@ -0,0 +1,545 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 2 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 100 + gratuitoImporte: 0 + gratuitoBaseImponible: 13900 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item6" + unidadMedida: "NIU" + cantidad: 6 + precio: 0 + precioConImpuestos: false + precioReferencia: 600 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 3600 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 3600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item7" + unidadMedida: "NIU" + cantidad: 7 + precio: 0 + precioConImpuestos: false + precioReferencia: 700 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 4900 + igvTipo: "36" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 4900 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF12-3" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 100 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-2 + 2019-12-24 + PEN + + FF12-3 + 01 + + + + + FF12-3 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + 13900.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 6 + 6 + 3600.00 + + + 600.00 + 02 + + + + 0.00 + + 3600.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 7 + 7 + 4900.00 + + + 700.00 + 02 + + + + 0.00 + + 4900.00 + 0.00 + + S + 0.00 + 36 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura5.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura5.yaml new file mode 100644 index 00000000..1f01a3bd --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura5.yaml @@ -0,0 +1,492 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 3 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 100 + gratuitoImporte: 0 + gratuitoBaseImponible: 9000 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item6" + unidadMedida: "NIU" + cantidad: 6 + precio: 0 + precioConImpuestos: false + precioReferencia: 600 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 3600 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 3600 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF12-5" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 100 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-3 + 2019-12-24 + PEN + + FF12-5 + 01 + + + + + FF12-5 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + 9000.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 6 + 6 + 3600.00 + + + 600.00 + 02 + + + + 0.00 + + 3600.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura1Con1Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura1Con1Items.yaml new file mode 100644 index 00000000..cc41a5e4 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura1Con1Items.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 100 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura2Con4Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura2Con4Items.yaml new file mode 100644 index 00000000..259dfa0e --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura2Con4Items.yaml @@ -0,0 +1,389 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 2 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 100 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 2900 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-2 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + 2900.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura3Con7Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura3Con7Items.yaml new file mode 100644 index 00000000..e5465024 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura3Con7Items.yaml @@ -0,0 +1,548 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 3 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 100 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 13900 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item6" + unidadMedida: "NIU" + cantidad: 6 + precio: 0 + precioConImpuestos: false + precioReferencia: 600 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 3600 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 3600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item7" + unidadMedida: "NIU" + cantidad: 7 + precio: 0 + precioConImpuestos: false + precioReferencia: 700 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 4900 + igvTipo: "36" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 4900 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-3 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + 13900.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 6 + 6 + 3600.00 + + + 600.00 + 02 + + + + 0.00 + + 3600.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 7 + 7 + 4900.00 + + + 700.00 + 02 + + + + 0.00 + + 4900.00 + 0.00 + + S + 0.00 + 36 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura4Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura4Con5Items.yaml new file mode 100644 index 00000000..d4b2bbb0 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura4Con5Items.yaml @@ -0,0 +1,442 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 4 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 100 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 5400 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-4 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + 5400.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura5Con6Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura5Con6Items.yaml new file mode 100644 index 00000000..b828ba6f --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura5Con6Items.yaml @@ -0,0 +1,495 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 5 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 100 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 9000 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item6" + unidadMedida: "NIU" + cantidad: 6 + precio: 0 + precioConImpuestos: false + precioReferencia: 600 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 3600 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 3600 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-5 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + 9000.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 6 + 6 + 3600.00 + + + 600.00 + 02 + + + + 0.00 + + 3600.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura1.yaml new file mode 100644 index 00000000..08bb4bfe --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura1.yaml @@ -0,0 +1,215 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 100 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF12-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 100 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-1 + 2019-12-24 + PEN + + FF12-1 + 01 + + + + + FF12-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + + 100.00 + 100.00 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura3.yaml new file mode 100644 index 00000000..9f32a08c --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura3.yaml @@ -0,0 +1,545 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 2 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 100 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 13900 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item6" + unidadMedida: "NIU" + cantidad: 6 + precio: 0 + precioConImpuestos: false + precioReferencia: 600 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 3600 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 3600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item7" + unidadMedida: "NIU" + cantidad: 7 + precio: 0 + precioConImpuestos: false + precioReferencia: 700 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 4900 + igvTipo: "36" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 4900 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF12-3" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 100 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-2 + 2019-12-24 + PEN + + FF12-3 + 01 + + + + + FF12-3 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + 13900.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 6 + 6 + 3600.00 + + + 600.00 + 02 + + + + 0.00 + + 3600.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 7 + 7 + 4900.00 + + + 700.00 + 02 + + + + 0.00 + + 4900.00 + 0.00 + + S + 0.00 + 36 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura5.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura5.yaml new file mode 100644 index 00000000..14eb1266 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura5.yaml @@ -0,0 +1,439 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 3 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 100 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 5400 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF12-5" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 100 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-3 + 2019-12-24 + PEN + + FF12-5 + 01 + + + + + FF12-5 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + 5400.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura1.yaml new file mode 100644 index 00000000..7ba9a8f0 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura1.yaml @@ -0,0 +1,215 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 100 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF12-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 100 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-1 + 2019-12-24 + PEN + + FF12-1 + 01 + + + + + FF12-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + + 100.00 + 100.00 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura3.yaml new file mode 100644 index 00000000..6bb63571 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura3.yaml @@ -0,0 +1,545 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 2 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 100 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 13900 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item6" + unidadMedida: "NIU" + cantidad: 6 + precio: 0 + precioConImpuestos: false + precioReferencia: 600 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 3600 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 3600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item7" + unidadMedida: "NIU" + cantidad: 7 + precio: 0 + precioConImpuestos: false + precioReferencia: 700 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 4900 + igvTipo: "36" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 4900 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF12-3" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 100 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-2 + 2019-12-24 + PEN + + FF12-3 + 01 + + + + + FF12-3 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + 13900.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 6 + 6 + 3600.00 + + + 600.00 + 02 + + + + 0.00 + + 3600.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 7 + 7 + 4900.00 + + + 700.00 + 02 + + + + 0.00 + + 4900.00 + 0.00 + + S + 0.00 + 36 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura5.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura5.yaml new file mode 100644 index 00000000..fe8b0b0f --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura5.yaml @@ -0,0 +1,492 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF12" + numero: 3 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 100 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 9000 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 400 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 900 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item6" + unidadMedida: "NIU" + cantidad: 6 + precio: 0 + precioConImpuestos: false + precioReferencia: 600 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 3600 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 3600 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF12-5" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 100 + importeSinImpuestos: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF12-3 + 2019-12-24 + PEN + + FF12-5 + 01 + + + + + FF12-5 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + 9000.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 100.00 + 100.00 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 6 + 6 + 3600.00 + + + 600.00 + 02 + + + + 0.00 + + 3600.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura1Con7Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura1Con7Items.yaml new file mode 100644 index 00000000..ff1001ea --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura1Con7Items.yaml @@ -0,0 +1,536 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF13" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 252.00 + gratuitoBaseImponible: 14000 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "11" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "12" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "13" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item6" + unidadMedida: "NIU" + cantidad: 6 + precio: 0 + precioConImpuestos: false + precioReferencia: 600 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 3600 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 3600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item7" + unidadMedida: "NIU" + cantidad: 7 + precio: 0 + precioConImpuestos: false + precioReferencia: 700 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 4900 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 4900 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF13-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 14000.00 + 252.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 18.00 + + S + 18.00 + 11 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 72.00 + + S + 18.00 + 12 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 162.00 + + S + 18.00 + 13 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 6 + 6 + 3600.00 + + + 600.00 + 02 + + + + 0.00 + + 3600.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 7 + 7 + 4900.00 + + + 700.00 + 02 + + + + 0.00 + + 4900.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura2Con2Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura2Con2Items.yaml new file mode 100644 index 00000000..4c6f27e9 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura2Con2Items.yaml @@ -0,0 +1,271 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF13" + numero: 2 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 90.00 + gratuitoBaseImponible: 500 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "11" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "12" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF13-2 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 500.00 + 90.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 18.00 + + S + 18.00 + 11 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 72.00 + + S + 18.00 + 12 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura3Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura3Con5Items.yaml new file mode 100644 index 00000000..aa706635 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura3Con5Items.yaml @@ -0,0 +1,430 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF13" + numero: 3 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 252.00 + gratuitoBaseImponible: 5500 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "11" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "12" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "13" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 0 + precioConImpuestos: false + precioReferencia: 500 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 2500 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF13-3 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 5500.00 + 252.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 18.00 + + S + 18.00 + 11 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 72.00 + + S + 18.00 + 12 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 162.00 + + S + 18.00 + 13 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 5 + 2500.00 + + + 500.00 + 02 + + + + 0.00 + + 2500.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura4Con4Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura4Con4Items.yaml new file mode 100644 index 00000000..e7a0fd59 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura4Con4Items.yaml @@ -0,0 +1,377 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF13" + numero: 4 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 252.00 + gratuitoBaseImponible: 3000 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "11" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "12" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "13" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 0 + precioConImpuestos: false + precioReferencia: 400 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 1600 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF13-4 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 3000.00 + 252.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 18.00 + + S + 18.00 + 11 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 72.00 + + S + 18.00 + 12 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 162.00 + + S + 18.00 + 13 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 4 + 4 + 1600.00 + + + 400.00 + 02 + + + + 0.00 + + 1600.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura5Con3Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura5Con3Items.yaml new file mode 100644 index 00000000..e786b849 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura5Con3Items.yaml @@ -0,0 +1,324 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF13" + numero: 5 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 252.00 + gratuitoBaseImponible: 1400 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "11" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 200 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "12" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "13" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF13-5 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 1400.00 + 252.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 18.00 + + S + 18.00 + 11 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 2 + 2 + 400.00 + + + 200.00 + 02 + + + + 0.00 + + 400.00 + 72.00 + + S + 18.00 + 12 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 162.00 + + S + 18.00 + 13 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura1Con2Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura1Con2Items.yaml new file mode 100644 index 00000000..b568b680 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura1Con2Items.yaml @@ -0,0 +1,282 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF14" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 90.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 90.000000000000 + gravadoBaseImponible: 500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 490.00 + importeSinImpuestos: 500 + importeConImpuestos: 590.00 + anticipos: 0 + descuentos: 100 + anticipos: [] + descuentos: + - tipoDescuento: "03" + factor: 1 + monto: 100 + montoBase: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF14-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + false + 03 + 1.00 + 100.00 + 100.00 + + + 90.00 + + 500.00 + 90.00 + + S + + 1000 + IGV + VAT + + + + + + 500.00 + 590.00 + 100 + 0 + 490.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura2Con2Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura2Con2Items.yaml new file mode 100644 index 00000000..4504277d --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura2Con2Items.yaml @@ -0,0 +1,282 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF14" + numero: 2 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 90.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 90.000000000000 + gravadoBaseImponible: 500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 490.00 + importeSinImpuestos: 500 + importeConImpuestos: 590.00 + anticipos: 0 + descuentos: 100 + anticipos: [] + descuentos: + - tipoDescuento: "03" + factor: 1 + monto: 100 + montoBase: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF14-2 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + false + 03 + 1.00 + 100.00 + 100.00 + + + 90.00 + + 500.00 + 90.00 + + S + + 1000 + IGV + VAT + + + + + + 500.00 + 590.00 + 100 + 0 + 490.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura3Con4Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura3Con4Items.yaml new file mode 100644 index 00000000..a6085cb3 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura3Con4Items.yaml @@ -0,0 +1,388 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF14" + numero: 3 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 540.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 540.000000000000 + gravadoBaseImponible: 3000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 472.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 288.00 + igvBaseImponible: 1600 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 288.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 3440.00 + importeSinImpuestos: 3000 + importeConImpuestos: 3540.00 + anticipos: 0 + descuentos: 100 + anticipos: [] + descuentos: + - tipoDescuento: "03" + factor: 1 + monto: 100 + montoBase: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF14-3 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + false + 03 + 1.00 + 100.00 + 100.00 + + + 540.00 + + 3000.00 + 540.00 + + S + + 1000 + IGV + VAT + + + + + + 3000.00 + 3540.00 + 100 + 0 + 3440.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 472.00 + 01 + + + + 288.00 + + 1600.00 + 288.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura4Con3Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura4Con3Items.yaml new file mode 100644 index 00000000..4dd13c9d --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura4Con3Items.yaml @@ -0,0 +1,347 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF14" + numero: 4 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 90.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 90.000000000000 + gravadoBaseImponible: 500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 162.00 + gratuitoBaseImponible: 900 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 0 + precioConImpuestos: false + precioReferencia: 300 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "13" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 490.00 + importeSinImpuestos: 500 + importeConImpuestos: 590.00 + anticipos: 0 + descuentos: 100 + anticipos: [] + descuentos: + - tipoDescuento: "03" + factor: 1 + monto: 100 + montoBase: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF14-4 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + false + 03 + 1.00 + 100.00 + 100.00 + + + 90.00 + + 500.00 + 90.00 + + S + + 1000 + IGV + VAT + + + + + 900.00 + 162.00 + + S + + 9996 + GRA + FRE + + + + + + 500.00 + 590.00 + 100 + 0 + 490.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 300.00 + 02 + + + + 0.00 + + 900.00 + 162.00 + + S + 18.00 + 13 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura5Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura5Con5Items.yaml new file mode 100644 index 00000000..7faf8448 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura5Con5Items.yaml @@ -0,0 +1,441 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF14" + numero: 5 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 990.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 990.000000000000 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 472.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 288.00 + igvBaseImponible: 1600 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 288.00 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 590.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 450.00 + igvBaseImponible: 2500 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 450.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 6390.00 + importeSinImpuestos: 5500 + importeConImpuestos: 6490.00 + anticipos: 0 + descuentos: 100 + anticipos: [] + descuentos: + - tipoDescuento: "03" + factor: 1 + monto: 100 + montoBase: 100 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF14-5 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + false + 03 + 1.00 + 100.00 + 100.00 + + + 990.00 + + 5500.00 + 990.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 6490.00 + 100 + 0 + 6390.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 472.00 + 01 + + + + 288.00 + + 1600.00 + 288.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 590.00 + 01 + + + + 450.00 + + 2500.00 + 450.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura2.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura2.yaml new file mode 100644 index 00000000..b4a579a6 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura2.yaml @@ -0,0 +1,268 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF14" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 90.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 90.00 + gravadoBaseImponible: 500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF14-2" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 590.00 + importeSinImpuestos: 500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF14-1 + 2019-12-24 + PEN + + FF14-2 + 01 + + + + + FF14-2 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 90.00 + + 500.00 + 90.00 + + S + + 1000 + IGV + VAT + + + + + + 500.00 + 590.00 + 590.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura3.yaml new file mode 100644 index 00000000..7fb1400e --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura3.yaml @@ -0,0 +1,321 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF14" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 252.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 252.00 + gravadoBaseImponible: 1400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF14-3" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 1652.00 + importeSinImpuestos: 1400 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF14-1 + 2019-12-24 + PEN + + FF14-3 + 01 + + + + + FF14-3 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 252.00 + + 1400.00 + 252.00 + + S + + 1000 + IGV + VAT + + + + + + 1400.00 + 1652.00 + 1652.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura5.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura5.yaml new file mode 100644 index 00000000..52246821 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura5.yaml @@ -0,0 +1,427 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF14" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 990.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 990.00 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 472.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 288.00 + igvBaseImponible: 1600 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 288.00 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 590.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 450.00 + igvBaseImponible: 2500 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 450.00 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF14-5" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 6490.00 + importeSinImpuestos: 5500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF14-1 + 2019-12-24 + PEN + + FF14-5 + 01 + + + + + FF14-5 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 990.00 + + 5500.00 + 990.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 6490.00 + 6490.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 472.00 + 01 + + + + 288.00 + + 1600.00 + 288.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 590.00 + 01 + + + + 450.00 + + 2500.00 + 450.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura2.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura2.yaml new file mode 100644 index 00000000..85e43e37 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura2.yaml @@ -0,0 +1,268 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF14" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 90.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 90.00 + gravadoBaseImponible: 500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF14-2" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 590.00 + importeSinImpuestos: 500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF14-1 + 2019-12-24 + PEN + + FF14-2 + 01 + + + + + FF14-2 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 90.00 + + 500.00 + 90.00 + + S + + 1000 + IGV + VAT + + + + + + 500.00 + 590.00 + 590.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura3.yaml new file mode 100644 index 00000000..c0b4ff6b --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura3.yaml @@ -0,0 +1,321 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF14" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 252.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 252.00 + gravadoBaseImponible: 1400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF14-3" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 1652.00 + importeSinImpuestos: 1400 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF14-1 + 2019-12-24 + PEN + + FF14-3 + 01 + + + + + FF14-3 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 252.00 + + 1400.00 + 252.00 + + S + + 1000 + IGV + VAT + + + + + + 1400.00 + 1652.00 + 1652.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura5.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura5.yaml new file mode 100644 index 00000000..18619f58 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura5.yaml @@ -0,0 +1,427 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF14" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 990.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 990.00 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 472.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 288.00 + igvBaseImponible: 1600 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 288.00 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 590.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 450.00 + igvBaseImponible: 2500 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 450.00 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF14-5" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 6490.00 + importeSinImpuestos: 5500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF14-1 + 2019-12-24 + PEN + + FF14-5 + 01 + + + + + FF14-5 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 990.00 + + 5500.00 + 990.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 6490.00 + 6490.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 472.00 + 01 + + + + 288.00 + + 1600.00 + 288.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 590.00 + 01 + + + + 450.00 + + 2500.00 + 450.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/factura1Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/factura1Con5Items.yaml new file mode 100644 index 00000000..6bafbaec --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/factura1Con5Items.yaml @@ -0,0 +1,506 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF30" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 1639.0000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 1089.0000000000000 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 550.0 + iscBaseImponible: 5500 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 129.800 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 19.800 + igvBaseImponible: 110.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 10.0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 29.800 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 259.600 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 79.200 + igvBaseImponible: 440.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 40.0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 119.200 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 389.400 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 178.200 + igvBaseImponible: 990.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 90.0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 268.200 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 519.200 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 316.800 + igvBaseImponible: 1760.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 160.0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 476.800 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 649.000 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 495.000 + igvBaseImponible: 2750.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 250.0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 745.000 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 7139.000 + importeSinImpuestos: 5500 + importeConImpuestos: 7139.000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF30-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 1639.00 + + 5500.00 + 550.00 + + + 2000 + ISC + EXC + + + + + 5500.00 + 1089.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 7139.00 + 0 + 0 + 7139.00 + + + 1 + 1 + 100.00 + + + 129.80 + 01 + + + + 29.80 + + 100.00 + 10.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 110.00 + 19.80 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 259.60 + 01 + + + + 119.20 + + 400.00 + 40.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 440.00 + 79.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 389.40 + 01 + + + + 268.20 + + 900.00 + 90.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 990.00 + 178.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 519.20 + 01 + + + + 476.80 + + 1600.00 + 160.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 1760.00 + 316.80 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 649.00 + 01 + + + + 745.00 + + 2500.00 + 250.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 2750.00 + 495.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeCreditoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeCreditoDeFactura1.yaml new file mode 100644 index 00000000..0f862b9c --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeCreditoDeFactura1.yaml @@ -0,0 +1,503 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF30" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 1639.000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 1089.000 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 550.0 + iscBaseImponible: 5500 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 129.800 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 19.800 + igvBaseImponible: 110.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 10.0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 29.800 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 259.600 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 79.200 + igvBaseImponible: 440.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 40.0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 119.200 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 389.400 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 178.200 + igvBaseImponible: 990.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 90.0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 268.200 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 519.200 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 316.800 + igvBaseImponible: 1760.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 160.0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 476.800 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 649.000 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 495.000 + igvBaseImponible: 2750.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 250.0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 745.000 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF30-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 7139.000 + importeSinImpuestos: 5500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF30-1 + 2019-12-24 + PEN + + FF30-1 + 01 + + + + + FF30-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 1639.00 + + 5500.00 + 550.00 + + + 2000 + ISC + EXC + + + + + 5500.00 + 1089.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 7139.00 + 7139.00 + + + 1 + 1 + 100.00 + + + 129.80 + 01 + + + + 29.80 + + 100.00 + 10.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 110.00 + 19.80 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 259.60 + 01 + + + + 119.20 + + 400.00 + 40.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 440.00 + 79.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 389.40 + 01 + + + + 268.20 + + 900.00 + 90.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 990.00 + 178.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 519.20 + 01 + + + + 476.80 + + 1600.00 + 160.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 1760.00 + 316.80 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 649.00 + 01 + + + + 745.00 + + 2500.00 + 250.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 2750.00 + 495.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeDebitoDeFactura2.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeDebitoDeFactura2.yaml new file mode 100644 index 00000000..cf2d06a4 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeDebitoDeFactura2.yaml @@ -0,0 +1,503 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF30" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 1639.000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 1089.000 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 550.0 + iscBaseImponible: 5500 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 129.800 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 19.800 + igvBaseImponible: 110.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 10.0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 29.800 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 259.600 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 79.200 + igvBaseImponible: 440.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 40.0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 119.200 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 389.400 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 178.200 + igvBaseImponible: 990.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 90.0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 268.200 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 519.200 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 316.800 + igvBaseImponible: 1760.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 160.0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 476.800 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 649.000 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 495.000 + igvBaseImponible: 2750.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 250.0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 745.000 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF30-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 7139.000 + importeSinImpuestos: 5500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF30-1 + 2019-12-24 + PEN + + FF30-1 + 01 + + + + + FF30-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 1639.00 + + 5500.00 + 550.00 + + + 2000 + ISC + EXC + + + + + 5500.00 + 1089.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 7139.00 + 7139.00 + + + 1 + 1 + 100.00 + + + 129.80 + 01 + + + + 29.80 + + 100.00 + 10.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 110.00 + 19.80 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 259.60 + 01 + + + + 119.20 + + 400.00 + 40.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 440.00 + 79.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 389.40 + 01 + + + + 268.20 + + 900.00 + 90.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 990.00 + 178.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 519.20 + 01 + + + + 476.80 + + 1600.00 + 160.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 1760.00 + 316.80 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 649.00 + 01 + + + + 745.00 + + 2500.00 + 250.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 2750.00 + 495.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/factura1Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/factura1Con5Items.yaml new file mode 100644 index 00000000..7df99d6d --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/factura1Con5Items.yaml @@ -0,0 +1,449 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: + "2000": "COMPROBANTE DE PERCEPCION" + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF40" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 990.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 990.000000000000 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 472.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 288.00 + igvBaseImponible: 1600 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 288.00 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 590.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 450.00 + igvBaseImponible: 2500 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 450.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "2001" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 6490.00 + importeSinImpuestos: 5500 + importeConImpuestos: 6490.00 + anticipos: 0 + descuentos: 0 + percepcion: + tipo: "51" + montoBase: 5500 + porcentaje: 0.02 + monto: 110.00 + montoTotal: 5610.00 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF40-1 + 2019-12-24 + 01 + + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + Percepcion + 5610.00 + + + FormaPago + Contado + + + true + 51 + 0.02 + 110.00 + 5500.00 + + + 990.00 + + 5500.00 + 990.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 6490.00 + 0 + 0 + 6490.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 472.00 + 01 + + + + 288.00 + + 1600.00 + 288.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 590.00 + 01 + + + + 450.00 + + 2500.00 + 450.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeCreditoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeCreditoDeFactura1.yaml new file mode 100644 index 00000000..d82bed47 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeCreditoDeFactura1.yaml @@ -0,0 +1,427 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF40" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 990.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 990.00 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 472.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 288.00 + igvBaseImponible: 1600 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 288.00 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 590.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 450.00 + igvBaseImponible: 2500 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 450.00 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF40-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 6490.00 + importeSinImpuestos: 5500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF40-1 + 2019-12-24 + PEN + + FF40-1 + 01 + + + + + FF40-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 990.00 + + 5500.00 + 990.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 6490.00 + 6490.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 472.00 + 01 + + + + 288.00 + + 1600.00 + 288.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 590.00 + 01 + + + + 450.00 + + 2500.00 + 450.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeDebitoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeDebitoDeFactura1.yaml new file mode 100644 index 00000000..11c54235 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeDebitoDeFactura1.yaml @@ -0,0 +1,427 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF40" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 990.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 990.00 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 72.00 + igvBaseImponible: 400 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 72.00 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 354.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 162.00 + igvBaseImponible: 900 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 162.00 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 472.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 288.00 + igvBaseImponible: 1600 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 288.00 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 590.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 450.00 + igvBaseImponible: 2500 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 450.00 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF40-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 6490.00 + importeSinImpuestos: 5500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF40-1 + 2019-12-24 + PEN + + FF40-1 + 01 + + + + + FF40-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 990.00 + + 5500.00 + 990.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 6490.00 + 6490.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 236.00 + 01 + + + + 72.00 + + 400.00 + 72.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 354.00 + 01 + + + + 162.00 + + 900.00 + 162.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 472.00 + 01 + + + + 288.00 + + 1600.00 + 288.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 590.00 + 01 + + + + 450.00 + + 2500.00 + 450.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/factura1Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/factura1Con5Items.yaml new file mode 100644 index 00000000..684f9e81 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/factura1Con5Items.yaml @@ -0,0 +1,506 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "USD" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF50" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 1639.0000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 1089.0000000000000 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 550.0 + iscBaseImponible: 5500 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 129.800 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 19.800 + igvBaseImponible: 110.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 10.0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 29.800 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 259.600 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 79.200 + igvBaseImponible: 440.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 40.0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 119.200 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 389.400 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 178.200 + igvBaseImponible: 990.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 90.0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 268.200 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 519.200 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 316.800 + igvBaseImponible: 1760.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 160.0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 476.800 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 649.000 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 495.000 + igvBaseImponible: 2750.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 250.0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 745.000 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 7139.000 + importeSinImpuestos: 5500 + importeConImpuestos: 7139.000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + FF50-1 + 2019-12-24 + 01 + USD + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 1639.00 + + 5500.00 + 550.00 + + + 2000 + ISC + EXC + + + + + 5500.00 + 1089.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 7139.00 + 0 + 0 + 7139.00 + + + 1 + 1 + 100.00 + + + 129.80 + 01 + + + + 29.80 + + 100.00 + 10.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 110.00 + 19.80 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 259.60 + 01 + + + + 119.20 + + 400.00 + 40.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 440.00 + 79.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 389.40 + 01 + + + + 268.20 + + 900.00 + 90.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 990.00 + 178.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 519.20 + 01 + + + + 476.80 + + 1600.00 + 160.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 1760.00 + 316.80 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 649.00 + 01 + + + + 745.00 + + 2500.00 + 250.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 2750.00 + 495.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeCreditoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeCreditoDeFactura1.yaml new file mode 100644 index 00000000..6acd09b5 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeCreditoDeFactura1.yaml @@ -0,0 +1,503 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "USD" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF50" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 1639.000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 1089.000 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 550.0 + iscBaseImponible: 5500 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 129.800 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 19.800 + igvBaseImponible: 110.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 10.0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 29.800 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 259.600 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 79.200 + igvBaseImponible: 440.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 40.0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 119.200 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 389.400 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 178.200 + igvBaseImponible: 990.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 90.0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 268.200 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 519.200 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 316.800 + igvBaseImponible: 1760.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 160.0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 476.800 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 649.000 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 495.000 + igvBaseImponible: 2750.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 250.0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 745.000 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "FF50-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 7139.000 + importeSinImpuestos: 5500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF50-1 + 2019-12-24 + USD + + FF50-1 + 01 + + + + + FF50-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 1639.00 + + 5500.00 + 550.00 + + + 2000 + ISC + EXC + + + + + 5500.00 + 1089.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 7139.00 + 7139.00 + + + 1 + 1 + 100.00 + + + 129.80 + 01 + + + + 29.80 + + 100.00 + 10.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 110.00 + 19.80 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 259.60 + 01 + + + + 119.20 + + 400.00 + 40.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 440.00 + 79.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 389.40 + 01 + + + + 268.20 + + 900.00 + 90.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 990.00 + 178.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 519.20 + 01 + + + + 476.80 + + 1600.00 + 160.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 1760.00 + 316.80 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 649.00 + 01 + + + + 745.00 + + 2500.00 + 250.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 2750.00 + 495.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeDebitoDeFactura2.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeDebitoDeFactura2.yaml new file mode 100644 index 00000000..ea06822e --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeDebitoDeFactura2.yaml @@ -0,0 +1,503 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "USD" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FF50" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 1639.000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 1089.000 + gravadoBaseImponible: 5500 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 550.0 + iscBaseImponible: 5500 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 129.800 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 19.800 + igvBaseImponible: 110.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 10.0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 29.800 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 200 + precioConImpuestos: false + precioReferencia: 259.600 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 79.200 + igvBaseImponible: 440.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 40.0 + iscBaseImponible: 400 + iscTipo: "01" + totalImpuestos: 119.200 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 3 + precio: 300 + precioConImpuestos: false + precioReferencia: 389.400 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 178.200 + igvBaseImponible: 990.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 90.0 + iscBaseImponible: 900 + iscTipo: "01" + totalImpuestos: 268.200 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 4 + precio: 400 + precioConImpuestos: false + precioReferencia: 519.200 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 316.800 + igvBaseImponible: 1760.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 160.0 + iscBaseImponible: 1600 + iscTipo: "01" + totalImpuestos: 476.800 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 5 + precio: 500 + precioConImpuestos: false + precioReferencia: 649.000 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 495.000 + igvBaseImponible: 2750.0 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.1 + isc: 250.0 + iscBaseImponible: 2500 + iscTipo: "01" + totalImpuestos: 745.000 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "FF50-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "Homologacion" + totalImporte: + importe: 7139.000 + importeSinImpuestos: 5500 +snapshot: | + + + + + + + + 2.1 + 2.0 + FF50-1 + 2019-12-24 + USD + + FF50-1 + 01 + + + + + FF50-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 1639.00 + + 5500.00 + 550.00 + + + 2000 + ISC + EXC + + + + + 5500.00 + 1089.00 + + S + + 1000 + IGV + VAT + + + + + + 5500.00 + 7139.00 + 7139.00 + + + 1 + 1 + 100.00 + + + 129.80 + 01 + + + + 29.80 + + 100.00 + 10.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 110.00 + 19.80 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 400.00 + + + 259.60 + 01 + + + + 119.20 + + 400.00 + 40.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 440.00 + 79.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + + 3 + 3 + 900.00 + + + 389.40 + 01 + + + + 268.20 + + 900.00 + 90.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 990.00 + 178.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 300.00 + + + + 4 + 4 + 1600.00 + + + 519.20 + 01 + + + + 476.80 + + 1600.00 + 160.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 1760.00 + 316.80 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 400.00 + + + + 5 + 5 + 2500.00 + + + 649.00 + 01 + + + + 745.00 + + 2500.00 + 250.00 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 2750.00 + 495.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 500.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_aplicacionAlMontoFijo.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_aplicacionAlMontoFijo.yaml new file mode 100644 index 00000000..b525a9c6 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_aplicacionAlMontoFijo.yaml @@ -0,0 +1,292 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FC01" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 119.2000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 79.2000 + gravadoBaseImponible: 400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 40.00 + iscBaseImponible: 200 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 141.6000 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 43.2000 + igvBaseImponible: 240.00 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.20 + isc: 40.00 + iscBaseImponible: 200 + iscTipo: "02" + totalImpuestos: 83.2000 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "F001-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "mi sustento" + totalImporte: + importe: 519.2000 + importeSinImpuestos: 400 +snapshot: | + + + + + + + + 2.1 + 2.0 + FC01-1 + 2019-12-24 + PEN + + F001-1 + 01 + + + + + F001-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 119.20 + + 200.00 + 40.00 + + + 2000 + ISC + EXC + + + + + 400.00 + 79.20 + + S + + 1000 + IGV + VAT + + + + + + 400.00 + 519.20 + 519.20 + + + 1 + 2 + 200.00 + + + 141.60 + 01 + + + + 83.20 + + 200.00 + 40.00 + + 20.00 + 02 + + 2000 + ISC + EXC + + + + + 240.00 + 43.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaAlValor.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaAlValor.yaml new file mode 100644 index 00000000..eaae393e --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaAlValor.yaml @@ -0,0 +1,292 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FC01" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 112.1200 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 78.1200 + gravadoBaseImponible: 400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 34.00 + iscBaseImponible: 200 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 138.0600 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 42.1200 + igvBaseImponible: 234.00 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.17 + isc: 34.00 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 76.1200 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "F001-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "mi sustento" + totalImporte: + importe: 512.1200 + importeSinImpuestos: 400 +snapshot: | + + + + + + + + 2.1 + 2.0 + FC01-1 + 2019-12-24 + PEN + + F001-1 + 01 + + + + + F001-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 112.12 + + 200.00 + 34.00 + + + 2000 + ISC + EXC + + + + + 400.00 + 78.12 + + S + + 1000 + IGV + VAT + + + + + + 400.00 + 512.12 + 512.12 + + + 1 + 2 + 200.00 + + + 138.06 + 01 + + + + 76.12 + + 200.00 + 34.00 + + 17.00 + 01 + + 2000 + ISC + EXC + + + + + 234.00 + 42.12 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml new file mode 100644 index 00000000..5fe6b4f4 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml @@ -0,0 +1,292 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FC01" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 95.6000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 75.6000 + gravadoBaseImponible: 400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 20.00 + iscBaseImponible: 200 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 129.8000 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 39.6000 + igvBaseImponible: 220.00 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.10 + isc: 20.00 + iscBaseImponible: 200 + iscTipo: "02" + totalImpuestos: 59.6000 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "F001-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "mi sustento" + totalImporte: + importe: 495.6000 + importeSinImpuestos: 400 +snapshot: | + + + + + + + + 2.1 + 2.0 + FC01-1 + 2019-12-24 + PEN + + F001-1 + 01 + + + + + F001-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 95.60 + + 200.00 + 20.00 + + + 2000 + ISC + EXC + + + + + 400.00 + 75.60 + + S + + 1000 + IGV + VAT + + + + + + 400.00 + 495.60 + 495.60 + + + 1 + 2 + 200.00 + + + 129.80 + 01 + + + + 59.60 + + 200.00 + 20.00 + + 10.00 + 02 + + 2000 + ISC + EXC + + + + + 220.00 + 39.60 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest/ordenDeCompra.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest/ordenDeCompra.yaml new file mode 100644 index 00000000..b9a628c8 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest/ordenDeCompra.yaml @@ -0,0 +1,272 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FC01" + numero: 1 + ordenDeCompra: "123456" + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 360.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 360.00 + gravadoBaseImponible: 2000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "F001-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "mi sustento" + totalImporte: + importe: 2360.00 + importeSinImpuestos: 2000 +snapshot: | + + + + + + + + 2.1 + 2.0 + FC01-1 + 2019-12-24 + PEN + + F001-1 + 01 + + + + 123456 + + + + F001-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 360.00 + + 2000.00 + 360.00 + + S + + 1000 + IGV + VAT + + + + + + 2000.00 + 2360.00 + 2360.00 + + + 1 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteTest/MinData_RUC.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteTest/MinData_RUC.yaml new file mode 100644 index 00000000..57a3572e --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteTest/MinData_RUC.yaml @@ -0,0 +1,268 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "CreditNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FC01" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 360.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 360.00 + gravadoBaseImponible: 2000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + guias: [] + documentosRelacionados: [] + tipoNota: "01" + comprobanteAfectadoSerieNumero: "F001-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "mi sustento" + totalImporte: + importe: 2360.00 + importeSinImpuestos: 2000 +snapshot: | + + + + + + + + 2.1 + 2.0 + FC01-1 + 2019-12-24 + PEN + + F001-1 + 01 + + + + + F001-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 360.00 + + 2000.00 + 360.00 + + S + + 1000 + IGV + VAT + + + + + + 2000.00 + 2360.00 + 2360.00 + + + 1 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/debitnote/DebitNoteTest/MinData_RUC.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/debitnote/DebitNoteTest/MinData_RUC.yaml new file mode 100644 index 00000000..c75e52a8 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/debitnote/DebitNoteTest/MinData_RUC.yaml @@ -0,0 +1,268 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DebitNote" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "FD01" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 360.00 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 360.00 + gravadoBaseImponible: 2000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + guias: [] + documentosRelacionados: [] + tipoNota: "02" + comprobanteAfectadoSerieNumero: "F001-1" + comprobanteAfectadoTipo: "01" + sustentoDescripcion: "mi sustento" + totalImporte: + importe: 2360.00 + importeSinImpuestos: 2000 +snapshot: | + + + + + + + + 2.1 + 2.0 + FD01-1 + 2019-12-24 + PEN + + F001-1 + 01 + + + + + F001-1 + 01 + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + 360.00 + + 2000.00 + 360.00 + + S + + 1000 + IGV + VAT + + + + + + 2000.00 + 2360.00 + 2360.00 + + + 1 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/despatchadvice/DespatchAdviceTest/minData.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/despatchadvice/DespatchAdviceTest/minData.yaml new file mode 100644 index 00000000..3e01f956 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/despatchadvice/DespatchAdviceTest/minData.yaml @@ -0,0 +1,144 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "DespatchAdvice" +input: + serie: "T001" + numero: 1 + fechaEmision: "2019-12-24" + tipoComprobante: "09" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + remitente: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + destinatario: + tipoDocumentoIdentidad: "1" + numeroDocumentoIdentidad: "12345678" + nombre: "mi cliente" + envio: + tipoTraslado: "18" + pesoTotal: 1 + pesoTotalUnidadMedida: "KG" + transbordoProgramado: false + tipoModalidadTraslado: "02" + fechaTraslado: "2019-12-24" + partida: + ubigeo: "010101" + direccion: "DireccionOrigen" + destino: + ubigeo: "020202" + direccion: "DireccionDestino" + detalles: + - unidadMedida: "KG" + cantidad: 0.5 + codigo: "123456" +snapshot: | + + + + + + + + 2.1 + 2.0 + T001-1 + 2019-12-24 + 09 + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + 12345678912 + + + 12345678912 + + + + + + + + + + 12345678 + + + + + + + + 1 + 18 + 1.000 + false + + 02 + + 2019-12-24 + + + + + 020202 + + DireccionDestino + + + + + 010101 + DireccionOrigen + + + + 1 + 0.5 + + 1 + + + + + 123456 + + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceAnticiposTest/minAnticipos.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceAnticiposTest/minAnticipos.yaml new file mode 100644 index 00000000..4f4c7d99 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceAnticiposTest/minAnticipos.yaml @@ -0,0 +1,296 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 54.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 54.000000000000 + gravadoBaseImponible: 300 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 372.00 + importeSinImpuestos: 400 + importeConImpuestos: 472.00 + anticipos: 100 + descuentos: 0 + anticipos: + - tipo: "04" + comprobanteSerieNumero: "F001-2" + comprobanteTipo: "02" + monto: 100 + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + F001-2 + 02 + 1 + + + 12345678912 + + + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 1 + 100 + + + false + 04 + 1 + 100 + 100 + + + 54.00 + + 300.00 + 54.00 + + S + + 1000 + IGV + VAT + + + + + + 400.00 + 472.00 + 0 + 100 + 372.00 + + + 1 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal.yaml new file mode 100644 index 00000000..6d0b34fa --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal.yaml @@ -0,0 +1,229 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 18.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 18.000000000000 + gravadoBaseImponible: 100 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 68.00 + importeSinImpuestos: 100 + importeConImpuestos: 118.00 + anticipos: 0 + descuentos: 50 + anticipos: [] + descuentos: + - tipoDescuento: "03" + factor: 1 + monto: 50 + montoBase: 50 +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + false + 03 + 1.00 + 50.00 + 50.00 + + + 18.00 + + 100.00 + 18.00 + + S + + 1000 + IGV + VAT + + + + + + 100.00 + 118.00 + 50 + 0 + 68.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo02.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo02.yaml new file mode 100644 index 00000000..f725f9cd --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo02.yaml @@ -0,0 +1,229 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 9.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 9.000000000000 + gravadoBaseImponible: 50 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 59.00 + importeSinImpuestos: 50 + importeConImpuestos: 59.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: + - tipoDescuento: "02" + factor: 1 + monto: 50 + montoBase: 50 +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + false + 02 + 1.00 + 50.00 + 50.00 + + + 9.00 + + 50.00 + 9.00 + + S + + 1000 + IGV + VAT + + + + + + 50.00 + 59.00 + 0 + 0 + 59.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo03.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo03.yaml new file mode 100644 index 00000000..6d0b34fa --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo03.yaml @@ -0,0 +1,229 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 18.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 18.000000000000 + gravadoBaseImponible: 100 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 68.00 + importeSinImpuestos: 100 + importeConImpuestos: 118.00 + anticipos: 0 + descuentos: 50 + anticipos: [] + descuentos: + - tipoDescuento: "03" + factor: 1 + monto: 50 + montoBase: 50 +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + false + 03 + 1.00 + 50.00 + 50.00 + + + 18.00 + + 100.00 + 18.00 + + S + + 1000 + IGV + VAT + + + + + + 100.00 + 118.00 + 50 + 0 + 68.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDetraccionTest/detraccion.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDetraccionTest/detraccion.yaml new file mode 100644 index 00000000..7a58b185 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDetraccionTest/detraccion.yaml @@ -0,0 +1,239 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: + "2006": "OPERACION SUJETA A DETRACCION" + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 144.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 144.000000000000 + gravadoBaseImponible: 800 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 4 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 144.00 + igvBaseImponible: 800 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 800 + iscTipo: "01" + totalImpuestos: 144.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "1001" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 944.00 + importeSinImpuestos: 800 + importeConImpuestos: 944.00 + anticipos: 0 + descuentos: 0 + detraccion: + medioDePago: "001" + cuentaBancaria: "0004-3342343243" + tipoBienDetraido: "014" + porcentaje: 0.04 + monto: 37.76 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + Detraccion + 001 + + 0004-3342343243 + + + + Detraccion + 014 + 4.00 + 37.76 + + + FormaPago + Contado + + + 144.00 + + 800.00 + 144.00 + + S + + 1000 + IGV + VAT + + + + + + 800.00 + 944.00 + 0 + 0 + 944.00 + + + 1 + 4 + 800.00 + + + 236.00 + 01 + + + + 144.00 + + 800.00 + 144.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaFull.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaFull.yaml new file mode 100644 index 00000000..cda778fb --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaFull.yaml @@ -0,0 +1,300 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: + "2005": "VENTA REALIZADA POR EMISOR ITINERANTE" + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 72.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 72.000000000000 + gravadoBaseImponible: 400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 472.00 + importeSinImpuestos: 400 + importeConImpuestos: 472.00 + anticipos: 0 + descuentos: 0 + direccionEntrega: + ubigeo: "050101" + codigoLocal: "0101" + urbanizacion: "000000" + departamento: "Ayacucho" + provincia: "Huamanga" + distrito: "Jesus Nazareno" + direccion: "Jr. Las piedras 123" + codigoPais: "PE" + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + + + 050101 + 0101 + 000000 + Huamanga + Ayacucho + Jesus Nazareno + + + + + PE + + + + + + FormaPago + Contado + + + 72.00 + + 400.00 + 72.00 + + S + + 1000 + IGV + VAT + + + + + + 400.00 + 472.00 + 0 + 0 + 472.00 + + + 1 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaMin.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaMin.yaml new file mode 100644 index 00000000..997b7e3c --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaMin.yaml @@ -0,0 +1,284 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: + "2005": "VENTA REALIZADA POR EMISOR ITINERANTE" + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 72.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 72.000000000000 + gravadoBaseImponible: 400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 472.00 + importeSinImpuestos: 400 + importeConImpuestos: 472.00 + anticipos: 0 + descuentos: 0 + direccionEntrega: + direccion: "Jr. las flores 123" + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + + + + + + + + + + FormaPago + Contado + + + 72.00 + + 400.00 + 72.00 + + S + + 1000 + IGV + VAT + + + + + + 400.00 + 472.00 + 0 + 0 + 472.00 + + + 1 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest/documentoRelacionado.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest/documentoRelacionado.yaml new file mode 100644 index 00000000..a5c82fff --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest/documentoRelacionado.yaml @@ -0,0 +1,281 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + ordenDeCompra: "123456" + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 72.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 72.000000000000 + gravadoBaseImponible: 400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + guias: [] + documentosRelacionados: + - tipoDocumento: "09" + serieNumero: "B111-1" + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 472.00 + importeSinImpuestos: 400 + importeConImpuestos: 472.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 123456 + + + B111-1 + 09 + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 72.00 + + 400.00 + 72.00 + + S + + 1000 + IGV + VAT + + + + + + 400.00 + 472.00 + 0 + 0 + 472.00 + + + 1 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFechaVencimientoTest/conFechaVencimiento.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFechaVencimientoTest/conFechaVencimiento.yaml new file mode 100644 index 00000000..b6a411f2 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFechaVencimientoTest/conFechaVencimiento.yaml @@ -0,0 +1,273 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 360.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 360.000000000000 + gravadoBaseImponible: 2000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + guias: [] + documentosRelacionados: [] + fechaVencimiento: "2022-01-01" + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 2360.00 + importeSinImpuestos: 2000 + importeConImpuestos: 2360.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 2022-01-01 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 360.00 + + 2000.00 + 360.00 + + S + + 1000 + IGV + VAT + + + + + + 2000.00 + 2360.00 + 0 + 0 + 2360.00 + + + 1 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/conFormaPago.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/conFormaPago.yaml new file mode 100644 index 00000000..c02cbdf5 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/conFormaPago.yaml @@ -0,0 +1,288 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 360.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 360.000000000000 + gravadoBaseImponible: 2000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Credito" + total: 30 + cuotas: + - importe: 10 + fechaPago: "2022-01-20" + - importe: 20 + fechaPago: "2022-02-20" + totalImporte: + importe: 2360.00 + importeSinImpuestos: 2000 + importeConImpuestos: 2360.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Credito + 30.00 + + + FormaPago + Cuota001 + 10.00 + 2022-01-20 + + + FormaPago + Cuota002 + 20.00 + 2022-02-20 + + + 360.00 + + 2000.00 + 360.00 + + S + + 1000 + IGV + VAT + + + + + + 2000.00 + 2360.00 + 0 + 0 + 2360.00 + + + 1 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/sinFormaPago.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/sinFormaPago.yaml new file mode 100644 index 00000000..78bd8f05 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/sinFormaPago.yaml @@ -0,0 +1,271 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 360.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 360.000000000000 + gravadoBaseImponible: 2000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 2360.00 + importeSinImpuestos: 2000 + importeConImpuestos: 2360.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 360.00 + + 2000.00 + 360.00 + + S + + 1000 + IGV + VAT + + + + + + 2000.00 + 2360.00 + 0 + 0 + 2360.00 + + + 1 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceGuiasTest/guiaSerieT.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceGuiasTest/guiaSerieT.yaml new file mode 100644 index 00000000..a3a522aa --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceGuiasTest/guiaSerieT.yaml @@ -0,0 +1,277 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 72.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 72.000000000000 + gravadoBaseImponible: 400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + guias: + - serieNumero: "T001-1" + tipoDocumento: "09" + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 472.00 + importeSinImpuestos: 400 + importeConImpuestos: 472.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + T001-1 + 09 + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 72.00 + + 400.00 + 72.00 + + S + + 1000 + IGV + VAT + + + + + + 400.00 + 472.00 + 0 + 0 + 472.00 + + + 1 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_aplicacionAlMontoFijo.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_aplicacionAlMontoFijo.yaml new file mode 100644 index 00000000..52e3a4f7 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_aplicacionAlMontoFijo.yaml @@ -0,0 +1,295 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 119.20000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 79.20000000000000 + gravadoBaseImponible: 400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 40.00 + iscBaseImponible: 200 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 141.6000 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 43.2000 + igvBaseImponible: 240.00 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.20 + isc: 40.00 + iscBaseImponible: 200 + iscTipo: "02" + totalImpuestos: 83.2000 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 519.2000 + importeSinImpuestos: 400 + importeConImpuestos: 519.2000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 119.20 + + 200.00 + 40.00 + + + 2000 + ISC + EXC + + + + + 400.00 + 79.20 + + S + + 1000 + IGV + VAT + + + + + + 400.00 + 519.20 + 0 + 0 + 519.20 + + + 1 + 2 + 200.00 + + + 141.60 + 01 + + + + 83.20 + + 200.00 + 40.00 + + 20.00 + 02 + + 2000 + ISC + EXC + + + + + 240.00 + 43.20 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_mixedTipoIgv.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_mixedTipoIgv.yaml new file mode 100644 index 00000000..0ee5a02e --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_mixedTipoIgv.yaml @@ -0,0 +1,519 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 36.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 36.000000000000 + gravadoBaseImponible: 200 + inafectoImporte: 0 + inafectoBaseImponible: 200 + exoneradoImporte: 0 + exoneradoBaseImponible: 200 + gratuitoImporte: 36.00 + gratuitoBaseImponible: 600 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "11" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item3" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 200 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item4" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 200 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item5" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 200 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 0 + - descripcion: "Item6" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 200 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 636.00 + importeSinImpuestos: 600 + importeConImpuestos: 636.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 36.00 + + 200.00 + 36.00 + + S + + 1000 + IGV + VAT + + + + + 200.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + 200.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + 600.00 + 36.00 + + S + + 9996 + GRA + FRE + + + + + + 600.00 + 636.00 + 0 + 0 + 636.00 + + + 1 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 100.00 + 02 + + + + 0.00 + + 200.00 + 36.00 + + S + 18.00 + 11 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 3 + 2 + 200.00 + + + 100.00 + 01 + + + + 0.00 + + 200.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + + 4 + 2 + 200.00 + + + 100.00 + 02 + + + + 0.00 + + 200.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + + 5 + 2 + 200.00 + + + 100.00 + 01 + + + + 0.00 + + 200.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + + 6 + 2 + 200.00 + + + 100.00 + 02 + + + + 0.00 + + 200.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_precioConImpuestos.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_precioConImpuestos.yaml new file mode 100644 index 00000000..f41d5a24 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_precioConImpuestos.yaml @@ -0,0 +1,342 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 76.520000000000000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 42.120000000000000000000000 + gravadoBaseImponible: 200.0000000000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 36.00 + gratuitoBaseImponible: 200 + icbImporte: 0.8 + iscImporte: 34.000000000000 + iscBaseImponible: 200.0000000000 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100.0000000000 + precioConImpuestos: true + precioReferencia: 138.06 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 42.12000000000000 + igvBaseImponible: 234.000000000000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0.4 + icbAplica: true + tasaIsc: 0.17 + isc: 34.000000000000 + iscBaseImponible: 200.0000000000 + iscTipo: "01" + totalImpuestos: 76.52000000000000 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "11" + tasaIcb: 0.2 + icb: 0.4 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 0.4 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 276.92000000000000 + importeSinImpuestos: 200.0000000000 + importeConImpuestos: 276.92000000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 76.52 + + 200.00 + 34.00 + + + 2000 + ISC + EXC + + + + + 200.00 + 42.12 + + S + + 1000 + IGV + VAT + + + + + 200.00 + 36.00 + + S + + 9996 + GRA + FRE + + + + + 0.80 + + S + + 7152 + ICBPER + OTH + + + + + + 200.00 + 276.92 + 0 + 0 + 276.92 + + + 1 + 2 + 200.00 + + + 138.06 + 01 + + + + 76.52 + + 200.00 + 34.00 + + 17.00 + 01 + + 2000 + ISC + EXC + + + + + 234.00 + 42.12 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + 0.40 + 2 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 100.00 + 02 + + + + 0.40 + + 200.00 + 36.00 + + S + 18.00 + 11 + + 9996 + GRA + FRE + + + + + 0.40 + 2 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaAlValor.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaAlValor.yaml new file mode 100644 index 00000000..3f404aae --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaAlValor.yaml @@ -0,0 +1,295 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 112.12000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 78.12000000000000 + gravadoBaseImponible: 400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 34.00 + iscBaseImponible: 200 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 138.0600 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 42.1200 + igvBaseImponible: 234.00 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.17 + isc: 34.00 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 76.1200 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 512.1200 + importeSinImpuestos: 400 + importeConImpuestos: 512.1200 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 112.12 + + 200.00 + 34.00 + + + 2000 + ISC + EXC + + + + + 400.00 + 78.12 + + S + + 1000 + IGV + VAT + + + + + + 400.00 + 512.12 + 0 + 0 + 512.12 + + + 1 + 2 + 200.00 + + + 138.06 + 01 + + + + 76.12 + + 200.00 + 34.00 + + 17.00 + 01 + + 2000 + ISC + EXC + + + + + 234.00 + 42.12 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml new file mode 100644 index 00000000..971d8aaa --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml @@ -0,0 +1,295 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 95.60000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 75.60000000000000 + gravadoBaseImponible: 400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 20.00 + iscBaseImponible: 200 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 129.8000 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 39.6000 + igvBaseImponible: 220.00 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0.10 + isc: 20.00 + iscBaseImponible: 200 + iscTipo: "02" + totalImpuestos: 59.6000 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 495.6000 + importeSinImpuestos: 400 + importeConImpuestos: 495.6000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 95.60 + + 200.00 + 20.00 + + + 2000 + ISC + EXC + + + + + 400.00 + 75.60 + + S + + 1000 + IGV + VAT + + + + + + 400.00 + 495.60 + 0 + 0 + 495.60 + + + 1 + 2 + 200.00 + + + 129.80 + 01 + + + + 59.60 + + 200.00 + 20.00 + + 10.00 + 02 + + 2000 + ISC + EXC + + + + + 220.00 + 39.60 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-ICB.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-ICB.yaml new file mode 100644 index 00000000..d914ad0a --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-ICB.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Project OpenUBL S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Project OpenUBL S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 14.02400000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 12.02400000000000 + gravadoBaseImponible: 66.80 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 2.0 + iscImporte: 0.00 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 6.68 + precioConImpuestos: false + precioReferencia: 7.8824 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 12.0240 + igvBaseImponible: 66.80 + igvTipo: "10" + tasaIcb: 0.2 + icb: 2.0 + icbAplica: true + tasaIsc: 0 + isc: 0.00 + iscBaseImponible: 66.80 + iscTipo: "01" + totalImpuestos: 14.0240 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 80.8240 + importeSinImpuestos: 66.80 + importeConImpuestos: 80.8240 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 14.02 + + 66.80 + 12.02 + + S + + 1000 + IGV + VAT + + + + + 2.00 + + S + + 7152 + ICBPER + OTH + + + + + + 66.80 + 80.82 + 0 + 0 + 80.82 + + + 1 + 10 + 66.80 + + + 7.88 + 01 + + + + 14.02 + + 66.80 + 12.02 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + 2.00 + 10 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 6.68 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-conImpuestos-ICB.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-conImpuestos-ICB.yaml new file mode 100644 index 00000000..04372d4d --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-conImpuestos-ICB.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Project OpenUBL S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Project OpenUBL S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 14.0203389830600000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 12.0203389830600000000000 + gravadoBaseImponible: 66.7796610170 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 2.0 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 6.6779661017 + precioConImpuestos: true + precioReferencia: 7.88 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 12.020338983060 + igvBaseImponible: 66.7796610170 + igvTipo: "10" + tasaIcb: 0.2 + icb: 2.0 + icbAplica: true + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 66.7796610170 + iscTipo: "01" + totalImpuestos: 14.020338983060 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 80.800000000060 + importeSinImpuestos: 66.7796610170 + importeConImpuestos: 80.800000000060 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 14.02 + + 66.78 + 12.02 + + S + + 1000 + IGV + VAT + + + + + 2.00 + + S + + 7152 + ICBPER + OTH + + + + + + 66.78 + 80.80 + 0 + 0 + 80.80 + + + 1 + 10 + 66.78 + + + 7.88 + 01 + + + + 14.02 + + 66.78 + 12.02 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + 2.00 + 10 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 6.68 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario.yaml new file mode 100644 index 00000000..9a917bad --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Project OpenUBL S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Project OpenUBL S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 12.02400000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 12.02400000000000 + gravadoBaseImponible: 66.80 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0.00 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 6.68 + precioConImpuestos: false + precioReferencia: 7.8824 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 12.0240 + igvBaseImponible: 66.80 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0.00 + iscBaseImponible: 66.80 + iscTipo: "01" + totalImpuestos: 12.0240 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 78.8240 + importeSinImpuestos: 66.80 + importeConImpuestos: 78.8240 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 12.02 + + 66.80 + 12.02 + + S + + 1000 + IGV + VAT + + + + + + 66.80 + 78.82 + 0 + 0 + 78.82 + + + 1 + 10 + 66.80 + + + 7.88 + 01 + + + + 12.02 + + 66.80 + 12.02 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 6.68 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitarioConImpuestos.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitarioConImpuestos.yaml new file mode 100644 index 00000000..0269df5f --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitarioConImpuestos.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Project OpenUBL S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Project OpenUBL S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 12.0203389830600000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 12.0203389830600000000000 + gravadoBaseImponible: 66.7796610170 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 6.6779661017 + precioConImpuestos: true + precioReferencia: 7.88 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 12.020338983060 + igvBaseImponible: 66.7796610170 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 66.7796610170 + iscTipo: "01" + totalImpuestos: 12.020338983060 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 78.800000000060 + importeSinImpuestos: 66.7796610170 + importeConImpuestos: 78.800000000060 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 12.02 + + 66.78 + 12.02 + + S + + 1000 + IGV + VAT + + + + + + 66.78 + 78.80 + 0 + 0 + 78.80 + + + 1 + 10 + 66.78 + + + 7.88 + 01 + + + + 12.02 + + 66.78 + 12.02 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 6.68 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceMoneda/customMoneda.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceMoneda/customMoneda.yaml new file mode 100644 index 00000000..bcf12215 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceMoneda/customMoneda.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "USD" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 18.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 18.000000000000 + gravadoBaseImponible: 100 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 118.00 + importeSinImpuestos: 100 + importeConImpuestos: 118.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + USD + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 18.00 + + 100.00 + 18.00 + + S + + 1000 + IGV + VAT + + + + + + 100.00 + 118.00 + 0 + 0 + 118.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceOrdeDeCompraTest/ordenDeCompra.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceOrdeDeCompraTest/ordenDeCompra.yaml new file mode 100644 index 00000000..5df73b9a --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceOrdeDeCompraTest/ordenDeCompra.yaml @@ -0,0 +1,275 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + ordenDeCompra: "123456" + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 72.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 72.000000000000 + gravadoBaseImponible: 400 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 2 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 36.00 + igvBaseImponible: 200 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 200 + iscTipo: "01" + totalImpuestos: 36.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 472.00 + importeSinImpuestos: 400 + importeConImpuestos: 472.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 123456 + + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 72.00 + + 400.00 + 72.00 + + S + + 1000 + IGV + VAT + + + + + + 400.00 + 472.00 + 0 + 0 + 472.00 + + + 1 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 2 + 200.00 + + + 118.00 + 01 + + + + 36.00 + + 200.00 + 36.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoicePercepcionTest/percepcion.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoicePercepcionTest/percepcion.yaml new file mode 100644 index 00000000..7d372f8b --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoicePercepcionTest/percepcion.yaml @@ -0,0 +1,237 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: + "2000": "COMPROBANTE DE PERCEPCION" + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 144.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 144.000000000000 + gravadoBaseImponible: 800 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 4 + precio: 200 + precioConImpuestos: false + precioReferencia: 236.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 144.00 + igvBaseImponible: 800 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 800 + iscTipo: "01" + totalImpuestos: 144.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "2001" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 944.00 + importeSinImpuestos: 800 + importeConImpuestos: 944.00 + anticipos: 0 + descuentos: 0 + percepcion: + tipo: "51" + montoBase: 800 + porcentaje: 0.02 + monto: 16.00 + montoTotal: 816.00 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + Percepcion + 816.00 + + + FormaPago + Contado + + + true + 51 + 0.02 + 16.00 + 800.00 + + + 144.00 + + 800.00 + 144.00 + + S + + 1000 + IGV + VAT + + + + + + 800.00 + 944.00 + 0 + 0 + 944.00 + + + 1 + 4 + 800.00 + + + 236.00 + 01 + + + + 144.00 + + 800.00 + 144.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 200.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customClienteDireccionAndContacto.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customClienteDireccionAndContacto.yaml new file mode 100644 index 00000000..c576e168 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customClienteDireccionAndContacto.yaml @@ -0,0 +1,301 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + direccion: + ubigeo: "050101" + codigoLocal: "0101" + urbanizacion: "000000" + departamento: "Ayacucho" + provincia: "Huamanga" + distrito: "Jesus Nazareno" + direccion: "Jr. Las piedras 123" + codigoPais: "PE" + contacto: + telefono: "+123456789" + email: "carlos@gmail.com" + totalImpuestos: + total: 360.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 360.000000000000 + gravadoBaseImponible: 2000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 2360.00 + importeSinImpuestos: 2000 + importeConImpuestos: 2360.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + 050101 + 0101 + 000000 + Huamanga + Ayacucho + Jesus Nazareno + + + + + PE + + + + + +123456789 + carlos@gmail.com + + + + + FormaPago + Contado + + + 360.00 + + 2000.00 + 360.00 + + S + + 1000 + IGV + VAT + + + + + + 2000.00 + 2360.00 + 0 + 0 + 2360.00 + + + 1 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customCodigoLocal.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customCodigoLocal.yaml new file mode 100644 index 00000000..2bc755b9 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customCodigoLocal.yaml @@ -0,0 +1,275 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + direccion: "Jr. las flores 123" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 424.800000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 424.800000000000 + gravadoBaseImponible: 2360 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 118 + precioConImpuestos: false + precioReferencia: 139.24 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 212.40 + igvBaseImponible: 1180 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1180 + iscTipo: "01" + totalImpuestos: 212.40 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 10 + precio: 118 + precioConImpuestos: false + precioReferencia: 139.24 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 212.40 + igvBaseImponible: 1180 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1180 + iscTipo: "01" + totalImpuestos: 212.40 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 2784.80 + importeSinImpuestos: 2360 + importeConImpuestos: 2784.80 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 424.80 + + 2360.00 + 424.80 + + S + + 1000 + IGV + VAT + + + + + + 2360.00 + 2784.80 + 0 + 0 + 2784.80 + + + 1 + 10 + 1180.00 + + + 139.24 + 01 + + + + 212.40 + + 1180.00 + 212.40 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 118.00 + + + + 2 + 10 + 1180.00 + + + 139.24 + 01 + + + + 212.40 + + 1180.00 + 212.40 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 118.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFechaEmision.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFechaEmision.yaml new file mode 100644 index 00000000..c1daf91e --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFechaEmision.yaml @@ -0,0 +1,273 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-01-06" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + horaEmision: "00:00:00" + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 360.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 360.000000000000 + gravadoBaseImponible: 2000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 2360.00 + importeSinImpuestos: 2000 + importeConImpuestos: 2360.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-01-06 + 00:00:00 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 360.00 + + 2000.00 + 360.00 + + S + + 1000 + IGV + VAT + + + + + + 2000.00 + 2360.00 + 0 + 0 + 2360.00 + + + 1 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFirmante.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFirmante.yaml new file mode 100644 index 00000000..9a37a1bb --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFirmante.yaml @@ -0,0 +1,271 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "000000000000" + razonSocial: "Wolsnut4 S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 360.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 360.000000000000 + gravadoBaseImponible: 2000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 2360.00 + importeSinImpuestos: 2000 + importeConImpuestos: 2360.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 000000000000 + + + 000000000000 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 360.00 + + 2000.00 + 360.00 + + S + + 1000 + IGV + VAT + + + + + + 2000.00 + 2360.00 + 0 + 0 + 2360.00 + + + 1 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customProveedorDireccionAndContacto.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customProveedorDireccionAndContacto.yaml new file mode 100644 index 00000000..18738714 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customProveedorDireccionAndContacto.yaml @@ -0,0 +1,296 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + ubigeo: "050101" + codigoLocal: "0101" + urbanizacion: "000000" + departamento: "Ayacucho" + provincia: "Huamanga" + distrito: "Jesus Nazareno" + direccion: "Jr. Las piedras 123" + codigoPais: "PE" + contacto: + telefono: "+123456789" + email: "carlos@gmail.com" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 360.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 360.000000000000 + gravadoBaseImponible: 2000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 2360.00 + importeSinImpuestos: 2000 + importeConImpuestos: 2360.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 050101 + 0101 + 000000 + Huamanga + Ayacucho + Jesus Nazareno + + + + + PE + + + + + +123456789 + carlos@gmail.com + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 360.00 + + 2000.00 + 360.00 + + S + + 1000 + IGV + VAT + + + + + + 2000.00 + 2360.00 + 0 + 0 + 2360.00 + + + 1 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customUnidadMedida.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customUnidadMedida.yaml new file mode 100644 index 00000000..bb55a425 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customUnidadMedida.yaml @@ -0,0 +1,271 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 360.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 360.000000000000 + gravadoBaseImponible: 2000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "KGM" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + - descripcion: "Item2" + unidadMedida: "KGM" + cantidad: 10 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.00 + igvBaseImponible: 1000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 1000 + iscTipo: "01" + totalImpuestos: 180.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 2360.00 + importeSinImpuestos: 2000 + importeConImpuestos: 2360.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 360.00 + + 2000.00 + 360.00 + + S + + 1000 + IGV + VAT + + + + + + 2000.00 + 2360.00 + 0 + 0 + 2360.00 + + + 1 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + + 2 + 10 + 1000.00 + + + 118.00 + 01 + + + + 180.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/icb.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/icb.yaml new file mode 100644 index 00000000..8f3ebb9d --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/icb.yaml @@ -0,0 +1,306 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 364.0000000000000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 360.0000000000000000000000 + gravadoBaseImponible: 2000.0000000000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 4.0 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 10 + precio: 100.0000000000 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.000000000000 + igvBaseImponible: 1000.0000000000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 2.0 + icbAplica: true + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 1000.0000000000 + iscTipo: "01" + totalImpuestos: 182.000000000000 + - descripcion: "Item2" + unidadMedida: "NIU" + cantidad: 10 + precio: 100.0000000000 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 180.000000000000 + igvBaseImponible: 1000.0000000000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 2.0 + icbAplica: true + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 1000.0000000000 + iscTipo: "01" + totalImpuestos: 182.000000000000 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 2364.000000000000 + importeSinImpuestos: 2000.0000000000 + importeConImpuestos: 2364.000000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 364.00 + + 2000.00 + 360.00 + + S + + 1000 + IGV + VAT + + + + + 4.00 + + S + + 7152 + ICBPER + OTH + + + + + + 2000.00 + 2364.00 + 0 + 0 + 2364.00 + + + 1 + 10 + 1000.00 + + + 118.00 + 01 + + + + 182.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + 2.00 + 10 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 100.00 + + + + 2 + 10 + 1000.00 + + + 118.00 + 01 + + + + 182.00 + + 1000.00 + 180.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + 2.00 + 10 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_OPERACION_ONEROSA.yaml new file mode 100644 index 00000000..73d03684 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_OPERACION_ONEROSA.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0E-10 + exoneradoBaseImponible: 118.0000000000 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 118.0000000000 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0E-10 + igvBaseImponible: 118.0000000000 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 118.0000000000 + iscTipo: "01" + totalImpuestos: 0E-10 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 118.0000000000 + importeSinImpuestos: 118.0000000000 + importeConImpuestos: 118.0000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + + 118.00 + 118.00 + 0 + 0 + 118.00 + + + 1 + 1 + 118.00 + + + 118.00 + 01 + + + + 0.00 + + 118.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 118.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_TRANSFERENCIA_GRATUITA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_TRANSFERENCIA_GRATUITA.yaml new file mode 100644 index 00000000..c6fa8a98 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_TRANSFERENCIA_GRATUITA.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXPORTACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXPORTACION.yaml new file mode 100644 index 00000000..828861a9 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXPORTACION.yaml @@ -0,0 +1,217 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0E-10 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0E-10 + exportacionBaseImponible: 118.0000000000 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 118.0000000000 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0E-10 + igvBaseImponible: 118.0000000000 + igvTipo: "40" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 118.0000000000 + iscTipo: "01" + totalImpuestos: 0E-10 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 118.0000000000 + importeSinImpuestos: 118.0000000000 + importeConImpuestos: 118.0000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0 + + + 9995 + EXP + FRE + + + + + + 118.00 + 118.00 + 0 + 0 + 118.00 + + + 1 + 1 + 118.00 + + + 118.00 + 01 + + + + 0.00 + + 118.00 + 0.00 + + S + 0.00 + 40 + + 9995 + EXP + FRE + + + + + + + + + 118.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_BONIFICACIONES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_BONIFICACIONES.yaml new file mode 100644 index 00000000..c1f7d115 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_BONIFICACIONES.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 21.24 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 21.24 + igvBaseImponible: 118 + igvTipo: "15" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 21.24 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 21.24 + + S + 18.00 + 15 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_IVAP.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_IVAP.yaml new file mode 100644 index 00000000..441277e2 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_IVAP.yaml @@ -0,0 +1,220 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: + "2007": "Leyenda: Operacion sujeta a IVAP" + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 4.538461538460 + ivapImporte: 4.538461538460 + ivapBaseImponible: 113.4615384615 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 113.4615384615 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "01" + tasaIgv: 0.04 + igv: 4.538461538460 + igvBaseImponible: 113.4615384615 + igvTipo: "17" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 113.4615384615 + iscTipo: "01" + totalImpuestos: 4.538461538460 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 117.999999999960 + importeSinImpuestos: 113.4615384615 + importeConImpuestos: 117.999999999960 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 4.54 + + 113.46 + 4.54 + + S + + 1016 + IVAP + VAT + + + + + + 113.46 + 118.00 + 0 + 0 + 118.00 + + + 1 + 1 + 113.46 + + + 118.00 + 01 + + + + 4.54 + + 113.46 + 4.54 + + S + 4.00 + 17 + + 1016 + IVAP + VAT + + + + + + + + + 113.46 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_OPERACION_ONEROSA.yaml new file mode 100644 index 00000000..849b8099 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_OPERACION_ONEROSA.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 18.0000000000000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 18.0000000000000000000000 + gravadoBaseImponible: 100.0000000000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100.0000000000 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.000000000000 + igvBaseImponible: 100.0000000000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 100.0000000000 + iscTipo: "01" + totalImpuestos: 18.000000000000 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 118.000000000000 + importeSinImpuestos: 100.0000000000 + importeConImpuestos: 118.000000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 18.00 + + 100.00 + 18.00 + + S + + 1000 + IGV + VAT + + + + + + 100.00 + 118.00 + 0 + 0 + 118.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO.yaml new file mode 100644 index 00000000..0496d0b2 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 21.24 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 21.24 + igvBaseImponible: 118 + igvTipo: "13" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 21.24 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 21.24 + + S + 18.00 + 13 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_DONACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_DONACION.yaml new file mode 100644 index 00000000..851120bc --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_DONACION.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 21.24 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 21.24 + igvBaseImponible: 118 + igvTipo: "12" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 21.24 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 21.24 + + S + 18.00 + 12 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml new file mode 100644 index 00000000..e0e89613 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 21.24 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 21.24 + igvBaseImponible: 118 + igvTipo: "16" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 21.24 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 21.24 + + S + 18.00 + 16 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PREMIO.yaml new file mode 100644 index 00000000..80aaa816 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PREMIO.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 21.24 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 21.24 + igvBaseImponible: 118 + igvTipo: "11" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 21.24 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 21.24 + + S + 18.00 + 11 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml new file mode 100644 index 00000000..dfd6ac95 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 21.24 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 21.24 + igvBaseImponible: 118 + igvTipo: "14" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 21.24 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 21.24 + + S + 18.00 + 14 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_OPERACION_ONEROSA.yaml new file mode 100644 index 00000000..e3c88809 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_OPERACION_ONEROSA.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0E-10 + inafectoBaseImponible: 118.0000000000 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 118.0000000000 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0E-10 + igvBaseImponible: 118.0000000000 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 118.0000000000 + iscTipo: "01" + totalImpuestos: 0E-10 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 118.0000000000 + importeSinImpuestos: 118.0000000000 + importeConImpuestos: 118.0000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + + 118.00 + 118.00 + 0 + 0 + 118.00 + + + 1 + 1 + 118.00 + + + 118.00 + 01 + + + + 0.00 + + 118.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 118.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO.yaml new file mode 100644 index 00000000..157158b6 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_BONIFICACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_BONIFICACION.yaml new file mode 100644 index 00000000..b38c038c --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_BONIFICACION.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml new file mode 100644 index 00000000..8744794a --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml new file mode 100644 index 00000000..648aa3b8 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PREMIO.yaml new file mode 100644 index 00000000..f9b9a5c5 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PREMIO.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml new file mode 100644 index 00000000..7440b082 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "36" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.00 + + 118.00 + 0.00 + + S + 0.00 + 36 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_OPERACION_ONEROSA.yaml new file mode 100644 index 00000000..f09ec0cd --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_OPERACION_ONEROSA.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0E-10 + exoneradoBaseImponible: 118.0000000000 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0.2 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 118.0000000000 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0E-10 + igvBaseImponible: 118.0000000000 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 118.0000000000 + iscTipo: "01" + totalImpuestos: 0.2000000000 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 118.2000000000 + importeSinImpuestos: 118.0000000000 + importeConImpuestos: 118.2000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 118.00 + 118.20 + 0 + 0 + 118.20 + + + 1 + 1 + 118.00 + + + 118.00 + 01 + + + + 0.20 + + 118.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 118.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_TRANSFERENCIA_GRATUITA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_TRANSFERENCIA_GRATUITA.yaml new file mode 100644 index 00000000..09f92f82 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_TRANSFERENCIA_GRATUITA.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXPORTACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXPORTACION.yaml new file mode 100644 index 00000000..432c64e3 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXPORTACION.yaml @@ -0,0 +1,240 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0.2000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0E-10 + exportacionBaseImponible: 118.0000000000 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0.2 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 118.0000000000 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0E-10 + igvBaseImponible: 118.0000000000 + igvTipo: "40" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 118.0000000000 + iscTipo: "01" + totalImpuestos: 0.2000000000 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 118.2000000000 + importeSinImpuestos: 118.0000000000 + importeConImpuestos: 118.2000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.20 + + 118.00 + 0 + + + 9995 + EXP + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 118.00 + 118.20 + 0 + 0 + 118.20 + + + 1 + 1 + 118.00 + + + 118.00 + 01 + + + + 0.20 + + 118.00 + 0.00 + + S + 0.00 + 40 + + 9995 + EXP + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 118.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_BONIFICACIONES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_BONIFICACIONES.yaml new file mode 100644 index 00000000..23c40990 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_BONIFICACIONES.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 21.24 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 21.24 + igvBaseImponible: 118 + igvTipo: "15" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 21.24 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 21.24 + + S + 18.00 + 15 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_IVAP.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_IVAP.yaml new file mode 100644 index 00000000..73e09f54 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_IVAP.yaml @@ -0,0 +1,243 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: + "2007": "Leyenda: Operacion sujeta a IVAP" + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 4.738461538460 + ivapImporte: 4.538461538460 + ivapBaseImponible: 113.4615384615 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0.2 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 113.4615384615 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "01" + tasaIgv: 0.04 + igv: 4.538461538460 + igvBaseImponible: 113.4615384615 + igvTipo: "17" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 113.4615384615 + iscTipo: "01" + totalImpuestos: 4.738461538460 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 118.199999999960 + importeSinImpuestos: 113.4615384615 + importeConImpuestos: 118.199999999960 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 4.74 + + 113.46 + 4.54 + + S + + 1016 + IVAP + VAT + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 113.46 + 118.20 + 0 + 0 + 118.20 + + + 1 + 1 + 113.46 + + + 118.00 + 01 + + + + 4.74 + + 113.46 + 4.54 + + S + 4.00 + 17 + + 1016 + IVAP + VAT + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 113.46 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_OPERACION_ONEROSA.yaml new file mode 100644 index 00000000..b94de02e --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_OPERACION_ONEROSA.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 18.2000000000000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 18.0000000000000000000000 + gravadoBaseImponible: 100.0000000000 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0.2 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100.0000000000 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.000000000000 + igvBaseImponible: 100.0000000000 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 100.0000000000 + iscTipo: "01" + totalImpuestos: 18.200000000000 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 118.200000000000 + importeSinImpuestos: 100.0000000000 + importeConImpuestos: 118.200000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 18.20 + + 100.00 + 18.00 + + S + + 1000 + IGV + VAT + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 100.00 + 118.20 + 0 + 0 + 118.20 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.20 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO.yaml new file mode 100644 index 00000000..66257d62 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 21.24 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 21.24 + igvBaseImponible: 118 + igvTipo: "13" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 21.24 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 21.24 + + S + 18.00 + 13 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_DONACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_DONACION.yaml new file mode 100644 index 00000000..c479ff05 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_DONACION.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 21.24 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 21.24 + igvBaseImponible: 118 + igvTipo: "12" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 21.24 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 21.24 + + S + 18.00 + 12 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml new file mode 100644 index 00000000..5c3810bb --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 21.24 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 21.24 + igvBaseImponible: 118 + igvTipo: "16" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 21.24 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 21.24 + + S + 18.00 + 16 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PREMIO.yaml new file mode 100644 index 00000000..f765afd8 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PREMIO.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 21.24 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 21.24 + igvBaseImponible: 118 + igvTipo: "11" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 21.24 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 21.24 + + S + 18.00 + 11 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml new file mode 100644 index 00000000..3979d2d3 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 21.24 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 21.24 + igvBaseImponible: 118 + igvTipo: "14" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 21.24 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 21.24 + + S + 18.00 + 14 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_OPERACION_ONEROSA.yaml new file mode 100644 index 00000000..8cb091c2 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_OPERACION_ONEROSA.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0E-10 + inafectoBaseImponible: 118.0000000000 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0.2 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 118.0000000000 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0E-10 + igvBaseImponible: 118.0000000000 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 118.0000000000 + iscTipo: "01" + totalImpuestos: 0.2000000000 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 118.2000000000 + importeSinImpuestos: 118.0000000000 + importeConImpuestos: 118.2000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 118.00 + 118.20 + 0 + 0 + 118.20 + + + 1 + 1 + 118.00 + + + 118.00 + 01 + + + + 0.20 + + 118.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 118.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO.yaml new file mode 100644 index 00000000..21c648c9 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_BONIFICACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_BONIFICACION.yaml new file mode 100644 index 00000000..c87927d9 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_BONIFICACION.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml new file mode 100644 index 00000000..5bbdb3cd --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml new file mode 100644 index 00000000..eb4e6adc --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PREMIO.yaml new file mode 100644 index 00000000..02c7b8b1 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PREMIO.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml new file mode 100644 index 00000000..448327fe --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 118 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 118 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 118 + igvTipo: "36" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 118 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 118.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 118.00 + + + 118.00 + 02 + + + + 0.20 + + 118.00 + 0.00 + + S + 0.00 + 36 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_OPERACION_ONEROSA.yaml new file mode 100644 index 00000000..13e81576 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_OPERACION_ONEROSA.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0E-10 + exoneradoBaseImponible: 100.0000000000 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0.2 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100.0000000000 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0E-10 + igvBaseImponible: 100.0000000000 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 100.0000000000 + iscTipo: "01" + totalImpuestos: 0.2000000000 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.2000000000 + importeSinImpuestos: 100.0000000000 + importeConImpuestos: 100.2000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 100.00 + 100.20 + 0 + 0 + 100.20 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.20 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_TRANSFERENCIA_GRATUITA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_TRANSFERENCIA_GRATUITA.yaml new file mode 100644 index 00000000..d349abb4 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_TRANSFERENCIA_GRATUITA.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXPORTACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXPORTACION.yaml new file mode 100644 index 00000000..4f18fdda --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXPORTACION.yaml @@ -0,0 +1,240 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0.2000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0E-10 + exportacionBaseImponible: 100.0000000000 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0.2 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100.0000000000 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0E-10 + igvBaseImponible: 100.0000000000 + igvTipo: "40" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 100.0000000000 + iscTipo: "01" + totalImpuestos: 0.2000000000 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.2000000000 + importeSinImpuestos: 100.0000000000 + importeConImpuestos: 100.2000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.20 + + 100.00 + 0 + + + 9995 + EXP + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 100.00 + 100.20 + 0 + 0 + 100.20 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.20 + + 100.00 + 0.00 + + S + 0.00 + 40 + + 9995 + EXP + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_BONIFICACIONES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_BONIFICACIONES.yaml new file mode 100644 index 00000000..2a76f6fe --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_BONIFICACIONES.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 18.00 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "15" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 18.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 18.00 + + S + 18.00 + 15 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_OPERACION_ONEROSA.yaml new file mode 100644 index 00000000..e0290672 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_OPERACION_ONEROSA.yaml @@ -0,0 +1,265 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 23.158397534689200000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 15.254237288149200000000000 + gravadoBaseImponible: 77.0416024654 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0.2 + iscImporte: 7.704160246540 + iscBaseImponible: 77.0416024654 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 77.0416024654 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 15.25423728814920 + igvBaseImponible: 84.745762711940 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0.10 + isc: 7.704160246540 + iscBaseImponible: 77.0416024654 + iscTipo: "01" + totalImpuestos: 23.15839753468920 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.20000000008920 + importeSinImpuestos: 77.0416024654 + importeConImpuestos: 100.20000000008920 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 23.16 + + 77.04 + 7.70 + + + 2000 + ISC + EXC + + + + + 77.04 + 15.25 + + S + + 1000 + IGV + VAT + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 77.04 + 100.20 + 0 + 0 + 100.20 + + + 1 + 1 + 77.04 + + + 100.00 + 01 + + + + 23.16 + + 77.04 + 7.70 + + 10.00 + 01 + + 2000 + ISC + EXC + + + + + 84.75 + 15.25 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 77.04 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO.yaml new file mode 100644 index 00000000..af12a15f --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 18.00 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "13" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 18.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 18.00 + + S + 18.00 + 13 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_DONACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_DONACION.yaml new file mode 100644 index 00000000..92a66e96 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_DONACION.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 18.00 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "12" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 18.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 18.00 + + S + 18.00 + 12 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml new file mode 100644 index 00000000..44d20517 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 18.00 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "16" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 18.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 18.00 + + S + 18.00 + 16 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PREMIO.yaml new file mode 100644 index 00000000..532c3686 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PREMIO.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 18.00 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "11" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 18.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 18.00 + + S + 18.00 + 11 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml new file mode 100644 index 00000000..1e13190f --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 18.00 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "14" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 18.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 18.00 + + S + 18.00 + 14 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_OPERACION_ONEROSA.yaml new file mode 100644 index 00000000..c1536a6c --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_OPERACION_ONEROSA.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0E-10 + inafectoBaseImponible: 100.0000000000 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0.2 + iscImporte: 0E-10 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100.0000000000 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0E-10 + igvBaseImponible: 100.0000000000 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0E-10 + iscBaseImponible: 100.0000000000 + iscTipo: "01" + totalImpuestos: 0.2000000000 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.2000000000 + importeSinImpuestos: 100.0000000000 + importeConImpuestos: 100.2000000000 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 100.00 + 100.20 + 0 + 0 + 100.20 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.20 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO.yaml new file mode 100644 index 00000000..0c5e639a --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_BONIFICACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_BONIFICACION.yaml new file mode 100644 index 00000000..112cfa63 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_BONIFICACION.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml new file mode 100644 index 00000000..54d83352 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml new file mode 100644 index 00000000..756bd00d --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PREMIO.yaml new file mode 100644 index 00000000..c457802f --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PREMIO.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml new file mode 100644 index 00000000..1e17d810 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml @@ -0,0 +1,241 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0.2 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: true + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "36" + tasaIcb: 0.2 + icb: 0.2 + icbAplica: true + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0.2 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.20 + importeSinImpuestos: 0 + importeConImpuestos: 0.20 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + 0.20 + + S + + 7152 + ICBPER + OTH + + + + + + 0.00 + 0.20 + 0 + 0 + 0.20 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.20 + + 100.00 + 0.00 + + S + 0.00 + 36 + + 9996 + GRA + FRE + + + + + 0.20 + 1 + + 0.20 + + 7152 + ICBPER + OTH + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_OPERACION_ONEROSA.yaml new file mode 100644 index 00000000..513c0d29 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_OPERACION_ONEROSA.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 100 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "20" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9997 + EXO + VAT + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 20 + + 9997 + EXO + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_TRANSFERENCIA_GRATUITA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_TRANSFERENCIA_GRATUITA.yaml new file mode 100644 index 00000000..b9d5a63f --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_TRANSFERENCIA_GRATUITA.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "21" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 21 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXPORTACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXPORTACION.yaml new file mode 100644 index 00000000..67310887 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXPORTACION.yaml @@ -0,0 +1,217 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 100 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "40" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0 + + + 9995 + EXP + FRE + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 40 + + 9995 + EXP + FRE + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_BONIFICACIONES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_BONIFICACIONES.yaml new file mode 100644 index 00000000..f7a28771 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_BONIFICACIONES.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 18.00 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "15" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 18.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 18.00 + + S + 18.00 + 15 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_IVAP.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_IVAP.yaml new file mode 100644 index 00000000..269d51a5 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_IVAP.yaml @@ -0,0 +1,220 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: + "2007": "Leyenda: Operacion sujeta a IVAP" + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 4.00 + ivapImporte: 4.00 + ivapBaseImponible: 100 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 104.00 + precioReferenciaTipo: "01" + tasaIgv: 0.04 + igv: 4.00 + igvBaseImponible: 100 + igvTipo: "17" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 4.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 104.00 + importeSinImpuestos: 100 + importeConImpuestos: 104.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 4.00 + + 100.00 + 4.00 + + S + + 1016 + IVAP + VAT + + + + + + 100.00 + 104.00 + 0 + 0 + 104.00 + + + 1 + 1 + 100.00 + + + 104.00 + 01 + + + + 4.00 + + 100.00 + 4.00 + + S + 4.00 + 17 + + 1016 + IVAP + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_OPERACION_ONEROSA.yaml new file mode 100644 index 00000000..b12f4be9 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_OPERACION_ONEROSA.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 18.000000000000 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 18.000000000000 + gravadoBaseImponible: 100 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 118.00 + precioReferenciaTipo: "01" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "10" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 18.00 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 118.00 + importeSinImpuestos: 100 + importeConImpuestos: 118.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 18.00 + + 100.00 + 18.00 + + S + + 1000 + IGV + VAT + + + + + + 100.00 + 118.00 + 0 + 0 + 118.00 + + + 1 + 1 + 100.00 + + + 118.00 + 01 + + + + 18.00 + + 100.00 + 18.00 + + S + 18.00 + 10 + + 1000 + IGV + VAT + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO.yaml new file mode 100644 index 00000000..cea21533 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 18.00 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "13" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 18.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 18.00 + + S + 18.00 + 13 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_DONACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_DONACION.yaml new file mode 100644 index 00000000..cb3e7203 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_DONACION.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 18.00 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "12" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 18.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 18.00 + + S + 18.00 + 12 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml new file mode 100644 index 00000000..68ca9b74 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 18.00 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "16" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 18.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 18.00 + + S + 18.00 + 16 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PREMIO.yaml new file mode 100644 index 00000000..33547794 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PREMIO.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 18.00 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "11" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 18.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 18.00 + + S + 18.00 + 11 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml new file mode 100644 index 00000000..027b4ac9 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 18.00 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0.18 + igv: 18.00 + igvBaseImponible: 100 + igvTipo: "14" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 18.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 18.00 + + S + 18.00 + 14 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_OPERACION_ONEROSA.yaml new file mode 100644 index 00000000..2a1a502b --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_OPERACION_ONEROSA.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 100 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 0 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 100 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "01" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "30" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 100.00 + importeSinImpuestos: 100 + importeConImpuestos: 100.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9998 + INA + FRE + + + + + + 100.00 + 100.00 + 0 + 0 + 100.00 + + + 1 + 1 + 100.00 + + + 100.00 + 01 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 30 + + 9998 + INA + FRE + + + + + + + + + 100.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO.yaml new file mode 100644 index 00000000..6e38b027 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "32" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 32 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_BONIFICACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_BONIFICACION.yaml new file mode 100644 index 00000000..ae6453db --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_BONIFICACION.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "31" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 31 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml new file mode 100644 index 00000000..3b114c2a --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "34" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 34 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml new file mode 100644 index 00000000..5ea510c2 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "33" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 33 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PREMIO.yaml new file mode 100644 index 00000000..70663ddc --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PREMIO.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "35" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 35 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml new file mode 100644 index 00000000..fabae503 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml @@ -0,0 +1,218 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Invoice" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + direccion: + codigoLocal: "0000" + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + leyendas: {} + tasaIvap: 0.04 + tasaIgv: 0.18 + tasaIcb: 0.2 + serie: "F001" + numero: 1 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + totalImpuestos: + total: 0 + ivapImporte: 0 + ivapBaseImponible: 0 + exportacionImporte: 0 + exportacionBaseImponible: 0 + gravadoImporte: 0 + gravadoBaseImponible: 0 + inafectoImporte: 0 + inafectoBaseImponible: 0 + exoneradoImporte: 0 + exoneradoBaseImponible: 0 + gratuitoImporte: 0 + gratuitoBaseImponible: 100 + icbImporte: 0 + iscImporte: 0 + iscBaseImponible: 0 + detalles: + - descripcion: "Item1" + unidadMedida: "NIU" + cantidad: 1 + precio: 0 + precioConImpuestos: false + precioReferencia: 100 + precioReferenciaTipo: "02" + tasaIgv: 0 + igv: 0 + igvBaseImponible: 100 + igvTipo: "36" + tasaIcb: 0.2 + icb: 0 + icbAplica: false + tasaIsc: 0 + isc: 0 + iscBaseImponible: 100 + iscTipo: "01" + totalImpuestos: 0 + guias: [] + documentosRelacionados: [] + tipoComprobante: "01" + tipoOperacion: "0101" + formaDePago: + tipo: "Contado" + total: 0 + cuotas: [] + totalImporte: + importe: 0.00 + importeSinImpuestos: 0 + importeConImpuestos: 0.00 + anticipos: 0 + descuentos: 0 + anticipos: [] + descuentos: [] +snapshot: | + + + + + + + + 2.1 + 2.0 + F001-1 + 2019-12-24 + 01 + PEN + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + + + 12345678912 + + + + + 0000 + + + + + + + + 12121212121 + + + + + + + + FormaPago + Contado + + + 0.00 + + 100.00 + 0.00 + + S + + 9996 + GRA + FRE + + + + + + 0.00 + 0.00 + 0 + 0 + 0.00 + + + 1 + 1 + 100.00 + + + 100.00 + 02 + + + + 0.00 + + 100.00 + 0.00 + + S + 0.00 + 36 + + 9996 + GRA + FRE + + + + + + + + + 0.00 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/perception/PerceptionTest/perception_simple.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/perception/PerceptionTest/perception_simple.yaml new file mode 100644 index 00000000..185f86ec --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/perception/PerceptionTest/perception_simple.yaml @@ -0,0 +1,121 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Perception" +input: + moneda: "PEN" + fechaEmision: "2022-01-31" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + numero: 1 + tipoRegimenPorcentaje: 2 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + operacion: + numeroOperacion: 1 + fechaOperacion: "2022-01-31" + importeOperacion: 100 + comprobante: + moneda: "PEN" + tipoComprobante: "01" + serieNumero: "F001-1" + fechaEmision: "2022-01-31" + importeTotal: 200 + serie: "P001" + tipoRegimen: "01" + importeTotalPercibido: 10 + importeTotalCobrado: 210 +snapshot: | + + + + + + + + 2.0 + 1.0 + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + P001-1 + 2022-01-31 + + + 12345678912 + + + + + + + + 12121212121 + + + + + + 01 + 2 + 10 + 210 + + F001-1 + 2022-01-31 + 200 + + 1 + 100 + 2022-01-31 + + + 10 + 2022-01-31 + 210 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/retention/RetentionTest/retention_simple.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/retention/RetentionTest/retention_simple.yaml new file mode 100644 index 00000000..ae3b6d52 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/retention/RetentionTest/retention_simple.yaml @@ -0,0 +1,121 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "Retention" +input: + moneda: "PEN" + fechaEmision: "2022-01-31" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + numero: 1 + tipoRegimenPorcentaje: 3 + cliente: + tipoDocumentoIdentidad: "6" + numeroDocumentoIdentidad: "12121212121" + nombre: "Carlos Feria" + operacion: + numeroOperacion: 1 + fechaOperacion: "2022-01-31" + importeOperacion: 100 + comprobante: + moneda: "PEN" + tipoComprobante: "01" + serieNumero: "F001-1" + fechaEmision: "2022-01-31" + importeTotal: 210 + serie: "R001" + tipoRegimen: "01" + importeTotalRetenido: 10 + importeTotalPagado: 200 +snapshot: | + + + + + + + + 2.0 + 1.0 + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + R001-1 + 2022-01-31 + + + 12345678912 + + + + + + + + 12121212121 + + + + + + 01 + 3 + 10 + 200 + + F001-1 + 2022-01-31 + 210 + + 1 + 100 + 2022-01-31 + + + 10 + 2022-01-31 + 200 + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/summarydocuments/SummaryDocumentsTest/summaryDocuments.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/summarydocuments/SummaryDocumentsTest/summaryDocuments.yaml new file mode 100644 index 00000000..b7f3f477 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/summarydocuments/SummaryDocumentsTest/summaryDocuments.yaml @@ -0,0 +1,190 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "SummaryDocuments" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + numero: 1 + fechaEmisionComprobantes: "2019-12-22" + comprobantes: + - tipoOperacion: "1" + comprobante: + moneda: "PEN" + tipoComprobante: "03" + serieNumero: "B001-1" + cliente: + tipoDocumentoIdentidad: "1" + numeroDocumentoIdentidad: "12345678" + nombre: "Carlos Feria" + valorVenta: + importeTotal: 120 + gravado: 120 + impuestos: + igv: 18 + icb: 2 + - tipoOperacion: "1" + comprobante: + moneda: "PEN" + tipoComprobante: "07" + serieNumero: "BC02-2" + cliente: + tipoDocumentoIdentidad: "1" + numeroDocumentoIdentidad: "12345678" + nombre: "Carlos Feria" + valorVenta: + importeTotal: 118 + gravado: 118 + impuestos: + igv: 18 + comprobanteAfectado: + tipoComprobante: "03" + serieNumero: "B002-2" +snapshot: | + + + + + + + + 2.0 + 1.1 + RC-20191224-1 + 2019-12-22 + 2019-12-24 + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + 12345678912 + 6 + + + + + + + + 1 + 03 + B001-1 + + 12345678 + 1 + + + 1 + + 120 + + 120 + 01 + + + 18 + + 18 + + + 1000 + IGV + VAT + + + + + + 2 + + 2 + + + 7152 + ICBPER + OTH + + + + + + + 2 + 07 + BC02-2 + + 12345678 + 1 + + + + B002-2 + 03 + + + + 1 + + 118 + + 118 + 01 + + + 18 + + 18 + + + 1000 + IGV + VAT + + + + + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument.yaml new file mode 100644 index 00000000..0afdc1cd --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument.yaml @@ -0,0 +1,98 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "VoidedDocuments" +input: + moneda: "PEN" + fechaEmision: "2022-01-31" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + numero: 1 + fechaEmisionComprobantes: "2022-01-29" + comprobantes: + - serie: "F001" + numero: 1 + tipoComprobante: "01" + descripcionSustento: "Mi sustento1" + - serie: "F001" + numero: 2 + tipoComprobante: "01" + descripcionSustento: "Mi sustento2" +snapshot: | + + + + + + + + 2.0 + 1.0 + RA-20220131-1 + 2022-01-29 + 2022-01-31 + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + 12345678912 + 6 + + + + + + + + 1 + 01 + F001 + 1 + Mi sustento1 + + + 2 + 01 + F001 + 2 + Mi sustento2 + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedFechaEmision.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedFechaEmision.yaml new file mode 100644 index 00000000..9f66d6a3 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedFechaEmision.yaml @@ -0,0 +1,98 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "VoidedDocuments" +input: + moneda: "PEN" + fechaEmision: "2019-12-24" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + numero: 1 + fechaEmisionComprobantes: "2019-12-22" + comprobantes: + - serie: "F001" + numero: 1 + tipoComprobante: "01" + descripcionSustento: "Mi sustento1" + - serie: "F001" + numero: 2 + tipoComprobante: "01" + descripcionSustento: "Mi sustento2" +snapshot: | + + + + + + + + 2.0 + 1.0 + RA-20191224-1 + 2019-12-22 + 2019-12-24 + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + 12345678912 + 6 + + + + + + + + 1 + 01 + F001 + 1 + Mi sustento1 + + + 2 + 01 + F001 + 2 + Mi sustento2 + + diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedTipoComprobante.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedTipoComprobante.yaml new file mode 100644 index 00000000..0afdc1cd --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedTipoComprobante.yaml @@ -0,0 +1,98 @@ +# +# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates +# and other contributors as indicated by the @author tags. +# +# Licensed under the Apache License - 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +--- +kind: "VoidedDocuments" +input: + moneda: "PEN" + fechaEmision: "2022-01-31" + proveedor: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + firmante: + ruc: "12345678912" + razonSocial: "Softgreen S.A.C." + numero: 1 + fechaEmisionComprobantes: "2022-01-29" + comprobantes: + - serie: "F001" + numero: 1 + tipoComprobante: "01" + descripcionSustento: "Mi sustento1" + - serie: "F001" + numero: 2 + tipoComprobante: "01" + descripcionSustento: "Mi sustento2" +snapshot: | + + + + + + + + 2.0 + 1.0 + RA-20220131-1 + 2022-01-29 + 2022-01-31 + + 12345678912 + + + 12345678912 + + + + + + + + #PROJECT-OPENUBL-SIGN + + + + + 12345678912 + 6 + + + + + + + + 1 + 01 + F001 + 1 + Mi sustento1 + + + 2 + 01 + F001 + 2 + Mi sustento2 + + From b1c41f44d668bfad410b3bdfcc029371c5ba1640 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sun, 26 Feb 2023 10:30:54 +0100 Subject: [PATCH 10/19] Remove annotations from guia --- .../openubl/xbuilder/content/models/standard/general/Guia.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/Guia.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/Guia.java index eac4a02b..c2b8c754 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/Guia.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/standard/general/Guia.java @@ -21,7 +21,6 @@ import lombok.Builder; import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; @Data @Builder @@ -29,7 +28,6 @@ @AllArgsConstructor public class Guia { - @XmlPath("cbc:ID/text()") @Schema(requiredMode = Schema.RequiredMode.REQUIRED) private String serieNumero; @@ -40,7 +38,6 @@ public class Guia { *

* Valores válidos: "09", "31" */ - @XmlPath("cbc:DocumentTypeCode/text()") @Schema(description = "Catalogo 01", requiredMode = Schema.RequiredMode.REQUIRED) private String tipoDocumento; } From 5da2e395813b4ab56c2d7aba4f0598afe2264698 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sun, 26 Feb 2023 20:53:29 +0100 Subject: [PATCH 11/19] Save working tests --- .../xbuilder/it/QuarkusXbuilderResource.java | 2 +- .../it/QuarkusXbuilderResourceTest.java | 1168 +++++++++++++++++ 2 files changed, 1169 insertions(+), 1 deletion(-) diff --git a/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java b/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java index 04d1d5c5..631c5e37 100644 --- a/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java +++ b/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java @@ -50,6 +50,7 @@ import static io.github.project.openubl.quarkus.xbuilder.XBuilder.Type.SUMMARY_DOCUMENTS; import static io.github.project.openubl.quarkus.xbuilder.XBuilder.Type.VOIDED_DOCUMENTS; +@Consumes(MediaType.APPLICATION_JSON) @Produces(MediaType.TEXT_PLAIN) @ApplicationScoped @Path("/quarkus-xbuilder") @@ -58,7 +59,6 @@ public class QuarkusXbuilderResource { @Inject XBuilder xBuilder; - @Consumes(MediaType.APPLICATION_JSON) @POST @Path("Invoice/from-json") public String createInvoiceXml(JsonObject json) { diff --git a/quarkus-extension/integration-tests/src/test/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResourceTest.java b/quarkus-extension/integration-tests/src/test/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResourceTest.java index 46da4738..b0a2befb 100644 --- a/quarkus-extension/integration-tests/src/test/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResourceTest.java +++ b/quarkus-extension/integration-tests/src/test/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResourceTest.java @@ -113,4 +113,1172 @@ public void testAllYamlFilesFromSnapshot() throws URISyntaxException, IOExceptio }); } + @Test + public void testInvoice() { + Invoice invoice = Invoice.builder() + .serie("F001") + .numero(1) + .proveedor(Proveedor.builder() + .ruc("12345678912") + .razonSocial("Softgreen S.A.C.") + .build() + ) + .cliente(Cliente.builder() + .nombre("Carlos Feria") + .numeroDocumentoIdentidad("12121212121") + .tipoDocumentoIdentidad(Catalog6.RUC.toString()) + .build() + ) + .detalle(DocumentoVentaDetalle.builder() + .descripcion("Item1") + .cantidad(new BigDecimal("10")) + .precio(new BigDecimal("100")) + .build() + ) + .build(); + + given() + .when() + .contentType(ContentType.JSON) + .body(invoice) + .post("/quarkus-xbuilder/Invoice/from-json") + .then() + .statusCode(200) + .body(is( + "\n" + + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 2.1\n" + + " 2.0\n" + + " F001-1\n" + + " 2022-01-25\n" + + " 01\n" + + " PEN\n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " #PROJECT-OPENUBL-SIGN\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 0000\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 12121212121\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " FormaPago\n" + + " Contado\n" + + " \n" + + " \n" + + " 200.00\n" + + " \n" + + " 1000.00\n" + + " 200.00\n" + + " \n" + + " S\n" + + " \n" + + " 1000\n" + + " IGV\n" + + " VAT\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 1000.00\n" + + " 1200.00\n" + + " 0\n" + + " 0\n" + + " 1200.00\n" + + " \n" + + " \n" + + " 1\n" + + " 10\n" + + " 1000.00\n" + + " \n" + + " \n" + + " 120.00\n" + + " 01\n" + + " \n" + + " \n" + + " \n" + + " 200.00\n" + + " \n" + + " 1000.00\n" + + " 200.00\n" + + " \n" + + " S\n" + + " 20.00\n" + + " 10\n" + + " \n" + + " 1000\n" + + " IGV\n" + + " VAT\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 100.00\n" + + " \n" + + " \n" + + "\n" + ) + ); + } + + @Test + public void testCreditNote() { + CreditNote creditNote = CreditNote.builder() + .serie("FC01") + .numero(1) + .comprobanteAfectadoSerieNumero("F001-1") + .sustentoDescripcion("mi sustento") + .proveedor(Proveedor.builder() + .ruc("12345678912") + .razonSocial("Softgreen S.A.C.") + .build() + ) + .cliente(Cliente.builder() + .nombre("Carlos Feria") + .numeroDocumentoIdentidad("12121212121") + .tipoDocumentoIdentidad(Catalog6.RUC.toString()) + .build() + ) + .detalle(DocumentoVentaDetalle.builder() + .descripcion("Item1") + .cantidad(new BigDecimal("10")) + .precio(new BigDecimal("100")) + .build() + ) + .build(); + + given() + .when() + .contentType(ContentType.JSON) + .body(creditNote) + .post("/quarkus-xbuilder/CreditNote/from-json") + .then() + .statusCode(200) + .body(is( + "\n" + + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 2.1\n" + + " 2.0\n" + + " FC01-1\n" + + " 2022-01-25\n" + + " PEN\n" + + " \n" + + " F001-1\n" + + " 01\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " F001-1\n" + + " 01\n" + + " \n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " #PROJECT-OPENUBL-SIGN\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 0000\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 12121212121\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 200.00\n" + + " \n" + + " 1000.00\n" + + " 200.00\n" + + " \n" + + " S\n" + + " \n" + + " 1000\n" + + " IGV\n" + + " VAT\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 1000.00\n" + + " 1200.00\n" + + " 1200.00\n" + + " \n" + + " \n" + + " 1\n" + + " 10\n" + + " 1000.00\n" + + " \n" + + " \n" + + " 120.00\n" + + " 01\n" + + " \n" + + " \n" + + " \n" + + " 200.00\n" + + " \n" + + " 1000.00\n" + + " 200.00\n" + + " \n" + + " S\n" + + " 20.00\n" + + " 10\n" + + " \n" + + " 1000\n" + + " IGV\n" + + " VAT\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 100.00\n" + + " \n" + + " \n" + + "\n" + ) + ); + } + + @Test + public void testDebitNote() { + DebitNote debitNote = DebitNote.builder() + .serie("FD01") + .numero(1) + .comprobanteAfectadoSerieNumero("F001-1") + .sustentoDescripcion("mi sustento") + .proveedor(Proveedor.builder() + .ruc("12345678912") + .razonSocial("Softgreen S.A.C.") + .build() + ) + .cliente(Cliente.builder() + .nombre("Carlos Feria") + .numeroDocumentoIdentidad("12121212121") + .tipoDocumentoIdentidad(Catalog6.RUC.toString()) + .build() + ) + .detalle(DocumentoVentaDetalle.builder() + .descripcion("Item1") + .cantidad(new BigDecimal("10")) + .precio(new BigDecimal("100")) + .build() + ) + .build(); + + given() + .when() + .contentType(ContentType.JSON) + .body(debitNote) + .post("/quarkus-xbuilder/DebitNote/from-json") + .then() + .statusCode(200) + .body(is( + "\n" + + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 2.1\n" + + " 2.0\n" + + " FD01-1\n" + + " 2022-01-25\n" + + " PEN\n" + + " \n" + + " F001-1\n" + + " 01\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " F001-1\n" + + " 01\n" + + " \n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " #PROJECT-OPENUBL-SIGN\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 0000\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 12121212121\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 200.00\n" + + " \n" + + " 1000.00\n" + + " 200.00\n" + + " \n" + + " S\n" + + " \n" + + " 1000\n" + + " IGV\n" + + " VAT\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 1000.00\n" + + " 1200.00\n" + + " 1200.00\n" + + " \n" + + " \n" + + " 1\n" + + " 10\n" + + " 1000.00\n" + + " \n" + + " \n" + + " 120.00\n" + + " 01\n" + + " \n" + + " \n" + + " \n" + + " 200.00\n" + + " \n" + + " 1000.00\n" + + " 200.00\n" + + " \n" + + " S\n" + + " 20.00\n" + + " 10\n" + + " \n" + + " 1000\n" + + " IGV\n" + + " VAT\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 100.00\n" + + " \n" + + " \n" + + "\n" + ) + ); + } + + @Test + public void testVoidedDocuments() { + VoidedDocuments voidedDocuments = VoidedDocuments.builder() + .numero(1) + .fechaEmision(LocalDate.of(2022, 01, 31)) + .fechaEmisionComprobantes(LocalDate.of(2022, 01, 29)) + .proveedor(Proveedor.builder() + .ruc("12345678912") + .razonSocial("Softgreen S.A.C.") + .build() + ) + .comprobante(VoidedDocumentsItem.builder() + .serie("F001") + .numero(1) + .tipoComprobante(Catalog1_Invoice.FACTURA.getCode()) + .descripcionSustento("Mi sustento1") + .build() + ) + .comprobante(VoidedDocumentsItem.builder() + .serie("F001") + .numero(2) + .tipoComprobante(Catalog1_Invoice.FACTURA.getCode()) + .descripcionSustento("Mi sustento2") + .build() + ) + .build(); + + given() + .when() + .contentType(ContentType.JSON) + .body(voidedDocuments) + .post("/quarkus-xbuilder/VoidedDocuments/from-json") + .then() + .statusCode(200) + .body(is("\n" + + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 2.0\n" + + " 1.0\n" + + " RA-20220131-1\n" + + " 2022-01-29\n" + + " 2022-01-31\n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " #PROJECT-OPENUBL-SIGN\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 12345678912\n" + + " 6\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 1\n" + + " 01\n" + + " F001\n" + + " 1\n" + + " Mi sustento1\n" + + " \n" + + " \n" + + " 2\n" + + " 01\n" + + " F001\n" + + " 2\n" + + " Mi sustento2\n" + + " \n" + + "\n")); + } + + @Test + public void testSummaryDocuments() { + SummaryDocuments summaryDocuments = SummaryDocuments.builder() + .numero(1) + .fechaEmision(LocalDate.of(2022, 01, 31)) + .fechaEmisionComprobantes(LocalDate.of(2022, 01, 29)) + .proveedor(Proveedor.builder() + .ruc("12345678912") + .razonSocial("Softgreen S.A.C.") + .build() + ) + .comprobante(SummaryDocumentsItem.builder() + .tipoOperacion(Catalog19.ADICIONAR.toString()) + .comprobante(Comprobante.builder() + .tipoComprobante(Catalog1_Invoice.BOLETA.getCode())// + .serieNumero("B001-1") + .cliente(Cliente.builder() + .nombre("Carlos Feria") + .numeroDocumentoIdentidad("12345678") + .tipoDocumentoIdentidad(Catalog6.DNI.getCode()) + .build() + ) + .impuestos(ComprobanteImpuestos.builder() + .igv(new BigDecimal("18")) + .icb(new BigDecimal(2)) + .build() + ) + .valorVenta(ComprobanteValorVenta.builder() + .importeTotal(new BigDecimal("120")) + .gravado(new BigDecimal("120")) + .build() + ) + .build() + ) + .build() + ) + .comprobante(SummaryDocumentsItem.builder() + .tipoOperacion(Catalog19.ADICIONAR.toString()) + .comprobante(Comprobante.builder() + .tipoComprobante(Catalog1.NOTA_CREDITO.getCode()) + .serieNumero("BC02-2") + .comprobanteAfectado(ComprobanteAfectado.builder() + .serieNumero("B002-2") + .tipoComprobante(Catalog1.BOLETA.getCode()) // + .build() + ) + .cliente(Cliente.builder() + .nombre("Carlos Feria") + .numeroDocumentoIdentidad("12345678") + .tipoDocumentoIdentidad(Catalog6.DNI.getCode())// + .build() + ) + .impuestos(ComprobanteImpuestos.builder() + .igv(new BigDecimal("18")) + .build() + ) + .valorVenta(ComprobanteValorVenta.builder() + .importeTotal(new BigDecimal("118")) + .gravado(new BigDecimal("118")) + .build() + ) + .build() + ) + .build() + ) + .build(); + + given() + .when() + .contentType(ContentType.JSON) + .body(summaryDocuments) + .post("/quarkus-xbuilder/SummaryDocuments/from-json") + .then() + .statusCode(200) + .body(is("\n" + + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 2.0\n" + + " 1.1\n" + + " RC-20220131-1\n" + + " 2022-01-29\n" + + " 2022-01-31\n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " #PROJECT-OPENUBL-SIGN\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 12345678912\n" + + " 6\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 1\n" + + " 03\n" + + " B001-1\n" + + " \n" + + " 12345678\n" + + " 1\n" + + " \n" + + " \n" + + " 1\n" + + " \n" + + " 120\n" + + " \n" + + " 120\n" + + " 01\n" + + " \n" + + " \n" + + " 18\n" + + " \n" + + " 18\n" + + " \n" + + " \n" + + " 1000\n" + + " IGV\n" + + " VAT\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 2\n" + + " \n" + + " 2\n" + + " \n" + + " \n" + + " 7152\n" + + " ICBPER\n" + + " OTH\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 2\n" + + " 07\n" + + " BC02-2\n" + + " \n" + + " 12345678\n" + + " 1\n" + + " \n" + + " \n" + + " \n" + + " B002-2\n" + + " 03\n" + + " \n" + + " \n" + + " \n" + + " 1\n" + + " \n" + + " 118\n" + + " \n" + + " 118\n" + + " 01\n" + + " \n" + + " \n" + + " 18\n" + + " \n" + + " 18\n" + + " \n" + + " \n" + + " 1000\n" + + " IGV\n" + + " VAT\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + "\n")); + } + + @Test + public void testPerception() { + Perception perception = Perception.builder() + .serie("P001") + .numero(1) + .fechaEmision(LocalDate.of(2022, 01, 31)) + .proveedor(Proveedor.builder() + .ruc("12345678912") + .razonSocial("Softgreen S.A.C.") + .build() + ) + .cliente(Cliente.builder() + .nombre("Carlos Feria") + .numeroDocumentoIdentidad("12121212121") + .tipoDocumentoIdentidad(Catalog6.RUC.getCode()) + .build() + ) + .importeTotalPercibido(new BigDecimal("10")) + .importeTotalCobrado(new BigDecimal("210")) + .tipoRegimen(Catalog22.VENTA_INTERNA.getCode()) + .tipoRegimenPorcentaje(Catalog22.VENTA_INTERNA.getPercent()) // + .operacion(PercepcionRetencionOperacion.builder() + .numeroOperacion(1) + .fechaOperacion(LocalDate.of(2022, 01, 31)) + .importeOperacion(new BigDecimal("100")) + .comprobante(io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado.builder() + .tipoComprobante(Catalog1.FACTURA.getCode()) + .serieNumero("F001-1") + .fechaEmision(LocalDate.of(2022, 01, 31)) + .importeTotal(new BigDecimal("200")) + .moneda("PEN") + .build() + ) + .build() + ) + .build(); + + given() + .when() + .contentType(ContentType.JSON) + .body(perception) + .post("/quarkus-xbuilder/Perception/from-json") + .then() + .statusCode(200) + .body(is("\n" + + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 2.0\n" + + " 1.0\n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " #PROJECT-OPENUBL-SIGN\n" + + " \n" + + " \n" + + " \n" + + " P001-1\n" + + " 2022-01-31\n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 12121212121\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 01\n" + + " 2\n" + + " 10\n" + + " 210\n" + + " \n" + + " F001-1\n" + + " 2022-01-31\n" + + " 200\n" + + " \n" + + " 1\n" + + " 100\n" + + " 2022-01-31\n" + + " \n" + + " \n" + + " 10\n" + + " 2022-01-31\n" + + " 210\n" + + " \n" + + " \n" + + "\n")); + } + + @Test + public void testRetention() { + Retention retention = Retention.builder() + .serie("R001") + .numero(1) + .fechaEmision(LocalDate.of(2022, 01, 31)) + .proveedor(Proveedor.builder() + .ruc("12345678912") + .razonSocial("Softgreen S.A.C.") + .build() + ) + .cliente(Cliente.builder() + .nombre("Carlos Feria") + .numeroDocumentoIdentidad("12121212121") + .tipoDocumentoIdentidad(Catalog6.RUC.getCode()) + .build() + ) + .importeTotalRetenido(new BigDecimal("10")) + .importeTotalPagado(new BigDecimal("200")) + .tipoRegimen(Catalog23.TASA_TRES.getCode()) + .tipoRegimenPorcentaje(Catalog23.TASA_TRES.getPercent()) // + .operacion(PercepcionRetencionOperacion.builder() + .numeroOperacion(1) + .fechaOperacion(LocalDate.of(2022, 01, 31)) + .importeOperacion(new BigDecimal("100")) + .comprobante(io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado.builder() + .tipoComprobante(Catalog1.FACTURA.getCode()) + .serieNumero("F001-1") + .fechaEmision(LocalDate.of(2022, 01, 31)) + .importeTotal(new BigDecimal("210")) + .moneda("PEN") + .build() + ) + .build() + ) + .build(); + + given() + .when() + .contentType(ContentType.JSON) + .body(retention) + .post("/quarkus-xbuilder/Retention/from-json") + .then() + .statusCode(200) + .body(is("\n" + + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 2.0\n" + + " 1.0\n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " #PROJECT-OPENUBL-SIGN\n" + + " \n" + + " \n" + + " \n" + + " R001-1\n" + + " 2022-01-31\n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 12121212121\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 01\n" + + " 3\n" + + " 10\n" + + " 200\n" + + " \n" + + " F001-1\n" + + " 2022-01-31\n" + + " 210\n" + + " \n" + + " 1\n" + + " 100\n" + + " 2022-01-31\n" + + " \n" + + " \n" + + " 10\n" + + " 2022-01-31\n" + + " 200\n" + + " \n" + + " \n" + + "\n")); + } + + @Test + public void testDespatchAdvice() { + DespatchAdvice despatchAdvice = DespatchAdvice.builder() + .serie("T001") + .numero(1) + .tipoComprobante(Catalog1.GUIA_REMISION_REMITENTE.getCode()) + .remitente(Remitente.builder() + .ruc("12345678912") + .razonSocial("Softgreen S.A.C.") + .build() + ) + .destinatario(Destinatario.builder() + .tipoDocumentoIdentidad(Catalog6.DNI.getCode()) + .numeroDocumentoIdentidad("12345678") + .nombre("mi cliente") + .build() + ) + .envio(Envio.builder() + .tipoTraslado(Catalog20.TRASLADO_EMISOR_ITINERANTE_CP.getCode()) + .pesoTotal(BigDecimal.ONE) + .pesoTotalUnidadMedida("KG") + .transbordoProgramado(false) + .tipoModalidadTraslado(Catalog18.TRANSPORTE_PRIVADO.getCode()) + .fechaTraslado(LocalDate.of(2022, 1, 25)) + .partida(Partida.builder() + .direccion("DireccionOrigen") + .ubigeo("010101") + .build() + ) + .destino(Destino.builder() + .direccion("DireccionDestino") + .ubigeo("020202") + .build() + ) + .build() + ) + .detalle(DespatchAdviceItem.builder() + .cantidad(new BigDecimal("0.5")) + .unidadMedida("KG") + .codigo("123456") + .build() + ) + .build(); + + given() + .when() + .contentType(ContentType.JSON) + .body(despatchAdvice) + .post("/quarkus-xbuilder/DespatchAdvice/from-json") + .then() + .statusCode(200) + .body(is("\n" + + "\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 2.1\n" + + " 2.0\n" + + " T001-1\n" + + " 2022-01-25\n" + + " 09\n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " #PROJECT-OPENUBL-SIGN\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " 12345678912\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 12345678\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 1\n" + + " 18\n" + + " 1.000\n" + + " false\n" + + " \n" + + " 02\n" + + " \n" + + " 2022-01-25\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 020202\n" + + " \n" + + " DireccionDestino\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 010101\n" + + " DireccionOrigen\n" + + " \n" + + " \n" + + " \n" + + " 1\n" + + " 0.5\n" + + " \n" + + " 1\n" + + " \n" + + " \n" + + " \n" + + " \n" + + " 123456\n" + + " \n" + + " \n" + + " \n" + + "\n")); + } } From 08df7cc59bd1bede4b870a0610e855b70ed024f9 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sun, 26 Feb 2023 21:05:24 +0100 Subject: [PATCH 12/19] Make tests work --- .../xbuilder/it/QuarkusXbuilderResource.java | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java b/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java index 631c5e37..c7f86aca 100644 --- a/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java +++ b/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java @@ -17,7 +17,6 @@ package io.github.project.openubl.quarkus.xbuilder.it; import io.github.project.openubl.quarkus.xbuilder.XBuilder; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; @@ -37,8 +36,6 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; -import javax.xml.bind.JAXBException; -import java.io.IOException; import java.time.LocalDate; import static io.github.project.openubl.quarkus.xbuilder.XBuilder.Type.CREDIT_NOTE; @@ -71,16 +68,6 @@ public String createInvoiceXml(JsonObject json) { return template.data(invoice).render(); } - @Consumes(MediaType.TEXT_PLAIN) - @POST - @Path("Invoice/from-xml") - public String createInvoicePojo(String xml) throws JAXBException, IOException { - Invoice invoice = Unmarshall.unmarshallInvoice(xml); - - Template template = xBuilder.getTemplate(INVOICE); - return template.data(invoice).render(); - } - @POST @Path("CreditNote/from-json") public String createCreditNote(JsonObject json) { From 07760627229815bccb54e6129203b74c9e1140a4 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Tue, 14 Mar 2023 16:50:32 +0100 Subject: [PATCH 13/19] Save first draft to migrate from eclipse moby to jakarta --- core/pom.xml | 18 ++++++++++++------ .../content/jaxb/models/XMLAddress.java | 2 +- .../content/jaxb/models/XMLContact.java | 2 +- .../content/jaxb/models/XMLCustomer.java | 2 +- .../content/jaxb/models/XMLDespatchAdvice.java | 2 +- .../jaxb/models/XMLDespatchAdviceLine.java | 2 +- .../jaxb/models/XMLPercepcionRetencion.java | 2 +- .../XMLPercepcionRetencionInformation.java | 2 +- ...cepcionRetencionSunatDocumentReference.java | 2 +- .../content/jaxb/models/XMLSalesDocument.java | 2 +- .../jaxb/models/XMLSalesDocumentLine.java | 2 +- .../content/jaxb/models/XMLSignature.java | 2 +- .../content/jaxb/models/XMLSunatDocument.java | 2 +- .../XMLSunatDocumentSummaryDocuments.java | 2 +- .../XMLSunatDocumentSummaryDocumentsLine.java | 2 +- .../XMLSunatDocumentVoidedDocuments.java | 2 +- .../XMLSunatDocumentVoidedDocumentsLine.java | 2 +- .../content/jaxb/models/XMLSupplier.java | 2 +- 18 files changed, 29 insertions(+), 23 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index d3d4617f..a73103f3 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -72,14 +72,20 @@ - jakarta.xml.bind - jakarta.xml.bind-api - 2.3.3 + org.glassfish.jaxb + jaxb-runtime + 4.0.2 + + + jakarta.xml.bind + jakarta.xml.bind-api + + - org.eclipse.persistence - org.eclipse.persistence.moxy - 2.7.12 + org.jboss.spec.javax.xml.bind + jboss-jaxb-api_2.3_spec + 2.0.1.Final diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLAddress.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLAddress.java index bc786b49..fef3160b 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLAddress.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLAddress.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + @Data @NoArgsConstructor diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLContact.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLContact.java index f1e3f403..05488030 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLContact.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLContact.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + @Data @NoArgsConstructor diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCustomer.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCustomer.java index a4e797f7..5d99396e 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCustomer.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCustomer.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + @Data @NoArgsConstructor diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdvice.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdvice.java index 22a75bcd..c03316e3 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdvice.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdvice.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + import java.math.BigDecimal; import java.time.LocalDate; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdviceLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdviceLine.java index 477e7f39..493219ad 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdviceLine.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdviceLine.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + import java.math.BigDecimal; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java index 4e5f6d9f..f3d445eb 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + import java.math.BigDecimal; import java.time.LocalDate; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionInformation.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionInformation.java index 814ea6ae..9d738c24 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionInformation.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionInformation.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + import java.math.BigDecimal; import java.time.LocalDate; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReference.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReference.java index f4cc3dd3..0a055bcc 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReference.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReference.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + import java.math.BigDecimal; import java.time.LocalDate; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java index 7ef69745..9b1a5db9 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + import java.math.BigDecimal; import java.time.LocalDate; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java index 8dabaf90..1ce72d07 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + import java.math.BigDecimal; import java.util.List; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSignature.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSignature.java index 742eaa0e..38254c31 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSignature.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSignature.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + @Data @NoArgsConstructor diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocument.java index 4676f91b..ed55491b 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocument.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocument.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + import java.time.LocalDate; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocuments.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocuments.java index 92b0d63a..30ceb688 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocuments.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocuments.java @@ -19,7 +19,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + import java.util.List; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocumentsLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocumentsLine.java index acfea5ce..bf91750c 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocumentsLine.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocumentsLine.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + import java.math.BigDecimal; import java.util.List; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocuments.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocuments.java index 78c02414..4b7a6006 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocuments.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocuments.java @@ -19,7 +19,7 @@ import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + import java.util.List; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentsLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentsLine.java index bf3c35af..87bb9e4b 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentsLine.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentsLine.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + @Data @NoArgsConstructor diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplier.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplier.java index f768f484..437e14dc 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplier.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplier.java @@ -18,7 +18,7 @@ import lombok.Data; import lombok.NoArgsConstructor; -import org.eclipse.persistence.oxm.annotations.XmlPath; + @Data @NoArgsConstructor From a631de2a6320533ac446279b3ef1762912c35c66 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sat, 1 Apr 2023 11:39:45 +0200 Subject: [PATCH 14/19] Use pure JAxb and not eclipse moby --- core/pom.xml | 63 +- .../openubl/xbuilder/content/jaxb/Mapper.java | 461 ------------- .../xbuilder/content/jaxb/Unmarshall.java | 628 ------------------ .../jaxb/mappers/CreditNoteMapper.java | 40 ++ .../content/jaxb/mappers/DebitNoteMapper.java | 40 ++ .../jaxb/mappers/DespatchAdviceMapper.java | 112 ++++ .../content/jaxb/mappers/InvoiceMapper.java | 257 +++++++ .../jaxb/mappers/PerceptionMapper.java | 61 ++ .../content/jaxb/mappers/RetentionMapper.java | 61 ++ .../jaxb/mappers/SummaryDocumentsMapper.java | 115 ++++ .../jaxb/mappers/VoidedDocumentsMapper.java | 36 + .../jaxb/mappers/common/ClienteMapper.java | 21 + .../jaxb/mappers/common/ContactoMapper.java | 15 + .../jaxb/mappers/common/DireccionMapper.java | 21 + .../jaxb/mappers/common/FirmanteMapper.java | 18 + .../jaxb/mappers/common/GuiaMapper.java | 15 + .../mappers/common/Numero2Translator.java | 14 + .../mappers/common/Numero3Translator.java | 14 + .../jaxb/mappers/common/ProveedorMapper.java | 28 + .../common/SalesDocumentHelperMapper.java | 178 +++++ .../mappers/common/SalesDocumentMapper.java | 40 ++ .../mappers/common/SerieNumeroMapper.java | 35 + .../mappers/common/SerieNumeroTranslator.java | 14 + .../jaxb/mappers/common/SerieTranslator.java | 14 + .../jaxb/mappers/utils/MapperUtils.java | 31 + .../content/jaxb/models/XMLAddress.java | 45 +- .../content/jaxb/models/XMLConstants.java | 8 + .../content/jaxb/models/XMLContact.java | 11 +- .../content/jaxb/models/XMLCreditNote.java | 40 ++ .../jaxb/models/XMLCreditNoteLine.java | 52 ++ .../content/jaxb/models/XMLCustomer.java | 55 +- .../content/jaxb/models/XMLDebitNote.java | 40 ++ .../content/jaxb/models/XMLDebitNoteLine.java | 52 ++ .../jaxb/models/XMLDespatchAdvice.java | 312 +++++++-- .../jaxb/models/XMLDespatchAdviceLine.java | 65 +- ...encionInformation.java => XMLInvoice.java} | 34 +- .../content/jaxb/models/XMLInvoiceLine.java | 52 ++ .../content/jaxb/models/XMLPercepcion.java | 47 ++ .../models/XMLPercepcionRetencionBase.java | 72 ++ ...epcionRetencionSunatDocumentReference.java | 55 -- ...onRetencionSunatDocumentReferenceBase.java | 91 +++ .../XMLPercepcionSunatDocumentReference.java | 57 ++ ...epcionRetencion.java => XMLRetention.java} | 45 +- .../XMLRetentionSunatDocumentReference.java | 57 ++ .../content/jaxb/models/XMLSalesDocument.java | 270 +++++--- .../jaxb/models/XMLSalesDocumentLine.java | 109 ++- .../content/jaxb/models/XMLSignature.java | 30 +- ...ocuments.java => XMLSummaryDocuments.java} | 15 +- .../jaxb/models/XMLSummaryDocumentsLine.java | 180 +++++ .../content/jaxb/models/XMLSunatDocument.java | 21 +- .../XMLSunatDocumentSummaryDocumentsLine.java | 102 --- .../content/jaxb/models/XMLSupplier.java | 52 +- .../content/jaxb/models/XMLSupplierSunat.java | 74 +++ ...Documents.java => XMLVoidedDocuments.java} | 15 +- ...sLine.java => XMLVoidedDocumentsLine.java} | 16 +- .../content/jaxb/models/package-info.java | 14 + .../jaxb/xml-bindings/credit-note.xml | 29 - .../jaxb/xml-bindings/debit-note.xml | 29 - .../jaxb/xml-bindings/despatch-advice.xml | 19 - .../resources/jaxb/xml-bindings/invoice.xml | 29 - .../jaxb/xml-bindings/perception.xml | 37 -- .../resources/jaxb/xml-bindings/retention.xml | 37 -- .../jaxb/xml-bindings/summary-documents.xml | 27 - .../jaxb/xml-bindings/voided-documents.xml | 27 - core/src/test/java/e2e/AbstractTest.java | 110 ++- pom.xml | 1 + 66 files changed, 2965 insertions(+), 1800 deletions(-) delete mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java delete mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/CreditNoteMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DebitNoteMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DespatchAdviceMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/InvoiceMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/PerceptionMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/RetentionMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/SummaryDocumentsMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/VoidedDocumentsMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ClienteMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ContactoMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/DireccionMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/FirmanteMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/GuiaMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero2Translator.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero3Translator.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ProveedorMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentHelperMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroMapper.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroTranslator.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieTranslator.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/utils/MapperUtils.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLConstants.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCreditNote.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCreditNoteLine.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDebitNote.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDebitNoteLine.java rename core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/{XMLPercepcionRetencionInformation.java => XMLInvoice.java} (54%) create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLInvoiceLine.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcion.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionBase.java delete mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReference.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReferenceBase.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionSunatDocumentReference.java rename core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/{XMLPercepcionRetencion.java => XMLRetention.java} (52%) create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetentionSunatDocumentReference.java rename core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/{XMLSunatDocumentVoidedDocuments.java => XMLSummaryDocuments.java} (62%) create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSummaryDocumentsLine.java delete mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocumentsLine.java create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplierSunat.java rename core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/{XMLSunatDocumentSummaryDocuments.java => XMLVoidedDocuments.java} (63%) rename core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/{XMLSunatDocumentVoidedDocumentsLine.java => XMLVoidedDocumentsLine.java} (62%) create mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/package-info.java delete mode 100644 core/src/main/resources/jaxb/xml-bindings/credit-note.xml delete mode 100644 core/src/main/resources/jaxb/xml-bindings/debit-note.xml delete mode 100644 core/src/main/resources/jaxb/xml-bindings/despatch-advice.xml delete mode 100644 core/src/main/resources/jaxb/xml-bindings/invoice.xml delete mode 100644 core/src/main/resources/jaxb/xml-bindings/perception.xml delete mode 100644 core/src/main/resources/jaxb/xml-bindings/retention.xml delete mode 100644 core/src/main/resources/jaxb/xml-bindings/summary-documents.xml delete mode 100644 core/src/main/resources/jaxb/xml-bindings/voided-documents.xml diff --git a/core/pom.xml b/core/pom.xml index a73103f3..9567fc75 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -41,6 +41,12 @@ ${lombok.version} provided + + org.mapstruct + mapstruct + ${mapstruct.version} + + io.quarkus.qute qute-core @@ -72,20 +78,35 @@ - org.glassfish.jaxb - jaxb-runtime - 4.0.2 - - - jakarta.xml.bind - jakarta.xml.bind-api - - + jakarta.xml.bind + jakarta.xml.bind-api + 2.3.3 + + + + + + + + + + + + + + + + + + + + + - org.jboss.spec.javax.xml.bind - jboss-jaxb-api_2.3_spec - 2.0.1.Final + com.sun.xml.bind + jaxb-impl + 2.3.8 @@ -129,6 +150,24 @@ ${maven.compiler.source} ${maven.compiler.target} + ${maven.compiler.parameters} + + + org.mapstruct + mapstruct-processor + ${mapstruct.version} + + + org.projectlombok + lombok + ${lombok.version} + + + org.projectlombok + lombok-mapstruct-binding + 0.2.0 + + diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java deleted file mode 100644 index 0b4d2fa9..00000000 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Mapper.java +++ /dev/null @@ -1,461 +0,0 @@ -/* - * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License - 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.github.project.openubl.xbuilder.content.jaxb; - -import io.github.project.openubl.xbuilder.content.catalogs.Catalog; -import io.github.project.openubl.xbuilder.content.catalogs.Catalog12; -import io.github.project.openubl.xbuilder.content.catalogs.Catalog12_Anticipo; -import io.github.project.openubl.xbuilder.content.catalogs.Catalog5; -import io.github.project.openubl.xbuilder.content.catalogs.Catalog53_Anticipo; -import io.github.project.openubl.xbuilder.content.catalogs.Catalog53_DescuentoGlobal; -import io.github.project.openubl.xbuilder.content.catalogs.CatalogContadoCredito; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLAddress; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLContact; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLCustomer; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSignature; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplier; -import io.github.project.openubl.xbuilder.content.models.common.Cliente; -import io.github.project.openubl.xbuilder.content.models.common.Contacto; -import io.github.project.openubl.xbuilder.content.models.common.Direccion; -import io.github.project.openubl.xbuilder.content.models.common.Firmante; -import io.github.project.openubl.xbuilder.content.models.common.Proveedor; -import io.github.project.openubl.xbuilder.content.models.standard.general.Anticipo; -import io.github.project.openubl.xbuilder.content.models.standard.general.CuotaDePago; -import io.github.project.openubl.xbuilder.content.models.standard.general.Descuento; -import io.github.project.openubl.xbuilder.content.models.standard.general.Detraccion; -import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoRelacionado; -import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; -import io.github.project.openubl.xbuilder.content.models.standard.general.FormaDePago; -import io.github.project.openubl.xbuilder.content.models.standard.general.Guia; -import io.github.project.openubl.xbuilder.content.models.standard.general.Percepcion; -import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImporteInvoice; -import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImporteNote; -import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImpuestos; - -import java.math.BigDecimal; -import java.math.RoundingMode; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.stream.Collectors; - -public class Mapper { - - public static BigDecimal mapPorcentaje(BigDecimal number) { - return Optional.ofNullable(number) - .map(bigDecimal -> bigDecimal.divide(new BigDecimal("100"), 10, RoundingMode.HALF_EVEN)) - .orElse(null); - } - - public static Proveedor mapProveedor(XMLSupplier supplier) { - if (supplier == null) { - return null; - } - - return Proveedor.builder() - .ruc(supplier.getPartyIdentification_id()) - .nombreComercial(supplier.getPartyName()) - .razonSocial(supplier.getRegistrationName()) - .direccion(mapDireccion(supplier.getAddress())) - .contacto(mapContacto(supplier.getContact())) - .build(); - } - - public static Cliente mapCliente(XMLCustomer customer) { - if (customer == null) { - return null; - } - - return Cliente.builder() - .tipoDocumentoIdentidad(customer.getPartyIdentification_id_schemeId()) - .numeroDocumentoIdentidad(customer.getPartyIdentification_id()) - .nombre(customer.getRegistrationName()) - .direccion(mapDireccion(customer.getAddress())) - .contacto(mapContacto(customer.getContact())) - .build(); - } - - public static Direccion mapDireccion(XMLAddress address) { - if (address == null) { - return null; - } - - return Direccion.builder() - .ubigeo(address.getId()) - .codigoLocal(address.getAddressTypeCode()) - .urbanizacion(address.getCitySubdivisionName()) - .provincia(address.getCityName()) - .departamento(address.getCountrySubEntity()) - .distrito(address.getDistrict()) - .direccion(address.getAddressLine()) - .codigoPais(address.getIdentificationCode()) - .build(); - } - - public static Contacto mapContacto(XMLContact contact) { - if (contact == null) { - return null; - } - - return Contacto.builder() - .telefono(contact.getTelephone()) - .email(contact.getElectronicMail()) - .build(); - } - - public static Firmante mapFirmante(XMLSignature signature) { - if (signature == null) { - return null; - } - - return Firmante.builder() - .ruc(signature.getId()) - .razonSocial(signature.getPartyName()) - .build(); - } - - public static TotalImpuestos mapTotalImpuestos(XMLSalesDocument.TaxTotal taxTotal) { - if (taxTotal == null) { - return null; - } - - TotalImpuestos.TotalImpuestosBuilder builder = TotalImpuestos.builder() - .total(taxTotal.getTaxAmount()); - - for (XMLSalesDocument.TaxSubtotal taxSubtotal : taxTotal.getTaxSubtotals()) { - Catalog5 catalog5 = Catalog - .valueOfCode(Catalog5.class, taxSubtotal.getCode()) - .orElseThrow(Catalog.invalidCatalogValue); - switch (catalog5) { - case IGV: - builder = builder - .gravadoBaseImponible(taxSubtotal.getTaxableAmount()) - .gravadoImporte(taxSubtotal.getTaxAmount()); - break; - case IMPUESTO_ARROZ_PILADO: - builder = builder - .ivapBaseImponible(taxSubtotal.getTaxableAmount()) - .ivapImporte(taxSubtotal.getTaxAmount()); - break; - case ISC: - builder = builder - .iscBaseImponible(taxSubtotal.getTaxableAmount()) - .iscImporte(taxSubtotal.getTaxAmount()); - break; - case EXPORTACION: - builder = builder - .exportacionBaseImponible(taxSubtotal.getTaxableAmount()) - .exportacionImporte(taxSubtotal.getTaxAmount()); - break; - case GRATUITO: - builder = builder - .gratuitoBaseImponible(taxSubtotal.getTaxableAmount()) - .gratuitoImporte(taxSubtotal.getTaxAmount()); - break; - case EXONERADO: - builder = builder - .exoneradoBaseImponible(taxSubtotal.getTaxableAmount()) - .exoneradoImporte(taxSubtotal.getTaxAmount()); - break; - case INAFECTO: - builder = builder - .inafectoBaseImponible(taxSubtotal.getTaxableAmount()) - .inafectoImporte(taxSubtotal.getTaxAmount()); - break; - case ICBPER: - builder = builder - .icbImporte(taxSubtotal.getTaxAmount()); - break; - case OTROS: - break; - } - } - - return builder.build(); - } - - public static List mapGuias(List despatchDocumentReferences) { - if (despatchDocumentReferences == null) { - return Collections.emptyList(); - } - - return despatchDocumentReferences.stream() - .map(despatchDocumentReference -> Guia.builder() - .serieNumero(despatchDocumentReference.getId()) - .tipoDocumento(despatchDocumentReference.getDocumentTypeCode()) - .build()) - .collect(Collectors.toList()); - } - - public static List mapDocumentosRelacionados(List additionalDocumentReferences) { - if (additionalDocumentReferences == null) { - return Collections.emptyList(); - } - - return additionalDocumentReferences.stream() - .filter(additionalDocumentReference -> Objects.nonNull(additionalDocumentReference.getDocumentTypeCode())) - .filter(additionalDocumentReference -> { - Optional catalog12 = Catalog - .valueOfCode(Catalog12.class, additionalDocumentReference.getDocumentTypeCode()); - Optional catalog12_anticipo = Catalog - .valueOfCode(Catalog12_Anticipo.class, additionalDocumentReference.getDocumentTypeCode()); - return catalog12.isPresent() && catalog12_anticipo.isEmpty(); - }) - .map(despatchDocumentReference -> DocumentoRelacionado.builder() - .serieNumero(despatchDocumentReference.getId()) - .tipoDocumento(despatchDocumentReference.getDocumentTypeCode()) - .build()) - .collect(Collectors.toList()); - } - - public static List mapDetalles(List lines) { - if (lines == null) { - return Collections.emptyList(); - } - - return lines.stream() - .map(documentLine -> { - DocumentoVentaDetalle.DocumentoVentaDetalleBuilder builder = DocumentoVentaDetalle.builder(); - - // Extract taxes - XMLSalesDocumentLine.TaxTotalLine taxTotal = documentLine.getTaxTotal(); - Map> subTotals = taxTotal.getTaxSubtotals().stream() - .collect(Collectors.groupingBy( - XMLSalesDocumentLine.TaxSubtotalLine::getCode, - Collectors.reducing((o, o2) -> o) // Only one element per type is expected - )); - - // ISC - Optional iscTaxSubtotal = subTotals.getOrDefault(Catalog5.ISC.getCode(), Optional.empty()); - iscTaxSubtotal.ifPresent(taxSubtotalLine -> { - builder.iscBaseImponible(taxSubtotalLine.getTaxableAmount()); - builder.isc(taxSubtotalLine.getTaxAmount()); - builder.tasaIsc(mapPorcentaje(taxSubtotalLine.getPercent())); - builder.iscTipo(taxSubtotalLine.getTierRange()); - }); - - // IGV - Optional igvTaxSubtotal = taxTotal.getTaxSubtotals().stream() - .filter(line -> !Objects.equals(line.getCode(), Catalog5.ISC.getCode()) && !Objects.equals(line.getCode(), Catalog5.ICBPER.getCode())) - .findFirst(); - igvTaxSubtotal.ifPresent(taxSubtotalLine -> { - builder.igvBaseImponible(taxSubtotalLine.getTaxableAmount()); - builder.igv(taxSubtotalLine.getTaxAmount()); - builder.tasaIgv(mapPorcentaje(taxSubtotalLine.getPercent())); - builder.igvTipo(taxSubtotalLine.getTaxExemptionReasonCode()); - }); - - // ICB - Optional icbTaxSubtotal = subTotals.getOrDefault(Catalog5.ICBPER.getCode(), Optional.empty()); - icbTaxSubtotal.ifPresent(taxSubtotalLine -> { - builder.icb(taxSubtotalLine.getTaxAmount()); - builder.tasaIcb(taxSubtotalLine.getPerUnitAmount()); - builder.icbAplica(taxSubtotalLine.getTaxAmount() != null && taxSubtotalLine.getTaxAmount().compareTo(BigDecimal.ZERO) > 0); - }); - - return builder - .descripcion(documentLine.getDescription()) - .unidadMedida(documentLine.getQuantity_unitCode()) - .cantidad(documentLine.getQuantity()) - .precio(documentLine.getPriceAmount()) - .precioReferencia(documentLine.getAlternativeConditionPrice_priceAmount()) - .precioReferenciaTipo(documentLine.getAlternativeConditionPrice_priceTypeCode()) - .totalImpuestos(taxTotal.getTaxAmount()) - .build(); - }) - .collect(Collectors.toList()); - } - - public static FormaDePago mapFormaDePago(List paymentTerms) { - if (paymentTerms == null) { - return null; - } - - List formasDePago = paymentTerms.stream() - .filter(elem -> Objects.equals(elem.getId(), "FormaPago")) - .collect(Collectors.toList()); - if (formasDePago.isEmpty()) { - return null; - } - - XMLSalesDocument.PaymentTerms formaDePago = formasDePago.stream() - .filter(elem -> Objects.equals(elem.getPaymentMeansID(), CatalogContadoCredito.CREDITO.getCode()) || - Objects.equals(elem.getPaymentMeansID(), CatalogContadoCredito.CONTADO.getCode()) - ) - .findFirst() - .orElse(new XMLSalesDocument.PaymentTerms()); - - List cuotas = formasDePago.stream() - .filter(elem -> elem.getPaymentMeansID().startsWith("Cuota")) - .collect(Collectors.toList()); - - return FormaDePago.builder() - .tipo(formaDePago.getPaymentMeansID()) - .total(formaDePago.getAmount()) - .cuotas(cuotas.stream() - .map(elem -> CuotaDePago.builder() - .importe(elem.getAmount()) - .fechaPago(elem.getPaymentDueDate()) - .build()) - .collect(Collectors.toList()) - ) - .build(); - } - - public static TotalImporteInvoice mapTotalImporteInvoice(XMLSalesDocument.MonetaryTotal monetaryTotal) { - if (monetaryTotal == null) { - return null; - } - - return TotalImporteInvoice.builder() - .importe(monetaryTotal.getPayableAmount()) - .importeSinImpuestos(monetaryTotal.getLineExtensionAmount()) - .importeConImpuestos(monetaryTotal.getTaxInclusiveAmount()) - .anticipos(monetaryTotal.getPrepaidAmount()) - .descuentos(monetaryTotal.getAllowanceTotalAmount()) - .build(); - } - - public static TotalImporteNote mapTotalImporteNote(XMLSalesDocument.MonetaryTotal monetaryTotal) { - if (monetaryTotal == null) { - return null; - } - - return TotalImporteNote.builder() - .importe(monetaryTotal.getPayableAmount()) - .importeSinImpuestos(monetaryTotal.getLineExtensionAmount()) - .importeConImpuestos(monetaryTotal.getTaxInclusiveAmount()) - .build(); - } - - public static Detraccion mapDetraccion(XMLSalesDocument.PaymentMeans paymentMeans, List paymentTerms) { - if (paymentMeans == null || paymentTerms == null) { - return null; - } - - Detraccion.DetraccionBuilder builder = Detraccion.builder() - .medioDePago(paymentMeans.getPaymentMeansCode()) - .cuentaBancaria(paymentMeans.getPayeeFinancialAccount_id()); - - paymentTerms.stream() - .filter(elem -> Objects.equals(elem.getId(), "Detraccion")) - .findFirst() - .ifPresent(el -> builder - .tipoBienDetraido(el.getPaymentMeansID()) - .porcentaje(mapPorcentaje(el.getPaymentPercent())) - .monto(el.getAmount()) - ); - - return builder.build(); - } - - public static Percepcion mapPercepcion(List paymentTerms, List allowanceCharges) { - if (paymentTerms == null || allowanceCharges == null) { - return null; - } - - Optional paymentTerm = paymentTerms.stream() - .filter(elem -> Objects.equals(elem.getId(), "Percepcion")) - .findFirst(); - Optional allowanceCharge = allowanceCharges.stream() - .filter(XMLSalesDocument.AllowanceCharge::getChargeIndicator) - .findFirst(); - - if (paymentTerm.isEmpty() || allowanceCharge.isEmpty()) { - return null; - } - - Percepcion.PercepcionBuilder builder = Percepcion.builder(); - paymentTerm.ifPresent(elem -> builder - .montoTotal(elem.getAmount()) - ); - allowanceCharge.ifPresent(elem -> builder - .tipo(elem.getAllowanceChargeReasonCode()) - .porcentaje(elem.getMultiplierFactorNumeric()) - .monto(elem.getAmount()) - .montoBase(elem.getBaseAmount()) - ); - - return builder.build(); - } - - public static List mapAnticipos(List additionalDocumentReferences, List prepaidPayments, List allowanceCharges) { - if (additionalDocumentReferences == null || prepaidPayments == null || allowanceCharges == null) { - return Collections.emptyList(); - } - - additionalDocumentReferences = additionalDocumentReferences.stream() - .filter(additionalDocumentReference -> additionalDocumentReference.getDocumentStatusCode() != null) - .collect(Collectors.toList()); - - allowanceCharges = allowanceCharges.stream() - .filter(allowanceCharge -> !allowanceCharge.getChargeIndicator()) - .filter(allowanceCharge -> Catalog - .valueOfCode(Catalog53_Anticipo.class, allowanceCharge.getAllowanceChargeReasonCode()) - .isPresent() - ) - .collect(Collectors.toList()); - - if (additionalDocumentReferences.size() != prepaidPayments.size() || additionalDocumentReferences.size() != allowanceCharges.size()) { - return Collections.emptyList(); - } - - List result = new ArrayList<>(); - for (int i = 0; i < additionalDocumentReferences.size(); i++) { - XMLSalesDocument.AdditionalDocumentReference additionalDocumentReference = additionalDocumentReferences.get(i); - XMLSalesDocument.PrepaidPayment prepaidPayment = prepaidPayments.get(i); - XMLSalesDocument.AllowanceCharge allowanceCharge = allowanceCharges.get(i); - - result.add(Anticipo.builder() - .comprobanteSerieNumero(additionalDocumentReference.getId()) - .comprobanteTipo(additionalDocumentReference.getDocumentTypeCode()) - .monto(prepaidPayment.getPaidAmount()) - .tipo(allowanceCharge.getAllowanceChargeReasonCode()) - .build() - ); - } - - return result; - } - - public static List mapDescuentos(List allowanceCharges) { - if (allowanceCharges == null) { - return Collections.emptyList(); - } - - return allowanceCharges.stream() - .filter(allowanceCharge -> !allowanceCharge.getChargeIndicator()) - .filter(allowanceCharge -> Catalog - .valueOfCode(Catalog53_DescuentoGlobal.class, allowanceCharge.getAllowanceChargeReasonCode()) - .isPresent() - ) - .map(allowanceCharge -> Descuento.builder() - .tipoDescuento(allowanceCharge.getAllowanceChargeReasonCode()) - .factor(allowanceCharge.getMultiplierFactorNumeric()) - .monto(allowanceCharge.getAmount()) - .montoBase(allowanceCharge.getBaseAmount()) - .build() - ) - .collect(Collectors.toList()); - } - -} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java deleted file mode 100644 index b5e118a7..00000000 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/Unmarshall.java +++ /dev/null @@ -1,628 +0,0 @@ -/* - * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License - 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.github.project.openubl.xbuilder.content.jaxb; - -import io.github.project.openubl.xbuilder.content.catalogs.Catalog; -import io.github.project.openubl.xbuilder.content.catalogs.Catalog5; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencion; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionInformation; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionSunatDocumentReference; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSunatDocument; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSunatDocumentSummaryDocuments; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSunatDocumentSummaryDocumentsLine; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSunatDocumentVoidedDocuments; -import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSunatDocumentVoidedDocumentsLine; -import io.github.project.openubl.xbuilder.content.models.common.Cliente; -import io.github.project.openubl.xbuilder.content.models.common.Document; -import io.github.project.openubl.xbuilder.content.models.common.Proveedor; -import io.github.project.openubl.xbuilder.content.models.common.TipoCambio; -import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; -import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; -import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; -import io.github.project.openubl.xbuilder.content.models.standard.general.Note; -import io.github.project.openubl.xbuilder.content.models.standard.general.SalesDocument; -import io.github.project.openubl.xbuilder.content.models.standard.guia.DespatchAdvice; -import io.github.project.openubl.xbuilder.content.models.standard.guia.DespatchAdviceItem; -import io.github.project.openubl.xbuilder.content.models.standard.guia.Destinatario; -import io.github.project.openubl.xbuilder.content.models.standard.guia.Destino; -import io.github.project.openubl.xbuilder.content.models.standard.guia.DocumentoBaja; -import io.github.project.openubl.xbuilder.content.models.standard.guia.DocumentoRelacionado; -import io.github.project.openubl.xbuilder.content.models.standard.guia.Envio; -import io.github.project.openubl.xbuilder.content.models.standard.guia.Partida; -import io.github.project.openubl.xbuilder.content.models.standard.guia.Remitente; -import io.github.project.openubl.xbuilder.content.models.standard.guia.Transportista; -import io.github.project.openubl.xbuilder.content.models.sunat.SunatDocument; -import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocuments; -import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocumentsItem; -import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.BasePercepcionRetencion; -import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado; -import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.PercepcionRetencionOperacion; -import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Perception; -import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Retention; -import io.github.project.openubl.xbuilder.content.models.sunat.resumen.Comprobante; -import io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteImpuestos; -import io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteValorVenta; -import io.github.project.openubl.xbuilder.content.models.sunat.resumen.SummaryDocuments; -import io.github.project.openubl.xbuilder.content.models.sunat.resumen.SummaryDocumentsItem; -import org.eclipse.persistence.jaxb.JAXBContextFactory; -import org.eclipse.persistence.jaxb.JAXBContextProperties; -import org.xml.sax.InputSource; - -import javax.xml.bind.JAXBContext; -import javax.xml.bind.JAXBException; -import javax.xml.bind.Unmarshaller; -import java.io.IOException; -import java.io.InputStream; -import java.io.StringReader; -import java.math.BigDecimal; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; -import java.util.stream.Collectors; - -public class Unmarshall { - - public static Invoice unmarshallInvoice(String xml) throws JAXBException, IOException { - try ( - InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/invoice.xml"); - StringReader reader = new StringReader(xml); - ) { - XMLSalesDocument xmlDocument = unmarshall(documentOXM, new InputSource(reader)); - Invoice.InvoiceBuilder builder = Invoice.builder(); - - enrichSalesDocument(xmlDocument, builder); - - // Fecha de vencimiento - builder.fechaVencimiento(xmlDocument.getDueDate()); - - // Tipo de comprobante - builder.tipoComprobante(xmlDocument.getInvoiceTypeCode()); - - // Observaciones - if (xmlDocument.getNotes() != null) { - xmlDocument.getNotes().stream() - .filter(e -> e.getLanguageLocaleId() == null) - .findFirst().ifPresent(n -> { - builder.observaciones(n.getValue()); - }); - } - - // Tipo de operacion - builder.tipoOperacion(xmlDocument.getInvoiceTypeCode_listID()); - - // Forma de pago - builder.formaDePago(Mapper.mapFormaDePago(xmlDocument.getPaymentTerms())); - - // Total importe - builder.totalImporte(Mapper.mapTotalImporteInvoice(xmlDocument.getMonetaryTotal())); - - // Direccion entrega - builder.direccionEntrega(Mapper.mapDireccion(xmlDocument.getDeliveryLocation())); - - // Detraccion - builder.detraccion(Mapper.mapDetraccion(xmlDocument.getPaymentMeans(), xmlDocument.getPaymentTerms())); - - // Percepcion - builder.percepcion(Mapper.mapPercepcion(xmlDocument.getPaymentTerms(), xmlDocument.getAllowanceCharges())); - - // Anticipos - builder.anticipos(Mapper.mapAnticipos(xmlDocument.getAdditionalDocumentReferences(), xmlDocument.getPrepaidPayments(), xmlDocument.getAllowanceCharges())); - - // Descuentos - builder.descuentos(Mapper.mapDescuentos(xmlDocument.getAllowanceCharges())); - - return builder.build(); - } - } - - public static CreditNote unmarshallCreditNote(String xml) throws JAXBException, IOException { - try ( - InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/credit-note.xml"); - StringReader reader = new StringReader(xml); - ) { - XMLSalesDocument xmlDocument = unmarshall(documentOXM, new InputSource(reader)); - CreditNote.CreditNoteBuilder builder = CreditNote.builder(); - - enrichSalesDocument(xmlDocument, builder); - enrichNote(xmlDocument, builder); - - return builder.build(); - } - } - - public static DebitNote unmarshallDebitNote(String xml) throws JAXBException, IOException { - try ( - InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/debit-note.xml"); - StringReader reader = new StringReader(xml); - ) { - XMLSalesDocument xmlDocument = unmarshall(documentOXM, new InputSource(reader)); - DebitNote.DebitNoteBuilder builder = DebitNote.builder(); - - enrichSalesDocument(xmlDocument, builder); - enrichNote(xmlDocument, builder); - - return builder.build(); - } - } - - public static Perception unmarshallPerception(String xml) throws JAXBException, IOException { - try ( - InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/perception.xml"); - StringReader reader = new StringReader(xml); - ) { - XMLPercepcionRetencion xmlDocument = unmarshall(documentOXM, new InputSource(reader)); - Perception.PerceptionBuilder builder = Perception.builder(); - - enrichBasePercepcionRetencion(xmlDocument, builder); - - // Serie - String[] split = xmlDocument.getDocumentId().split("-"); - if (split.length == 2) { - builder.serie(split[0]); - } - - // Tipo de regimen - builder.tipoRegimen(xmlDocument.getSunatSystemCode()); - - // ImporteTotalPercibido, ImporteTotalCobrado - XMLPercepcionRetencionSunatDocumentReference sunatDocumentReference = xmlDocument.getSunatDocumentReference(); - if (sunatDocumentReference != null) { - XMLPercepcionRetencionInformation sunatInformation = sunatDocumentReference.getSunatInformation(); - if (sunatInformation != null) { - builder.importeTotalPercibido(sunatInformation.getSunatAmount()); - builder.importeTotalCobrado(sunatInformation.getSunatNetTotal()); - } - } - - return builder.build(); - } - } - - public static Retention unmarshallRetention(String xml) throws JAXBException, IOException { - try ( - InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/retention.xml"); - StringReader reader = new StringReader(xml); - ) { - XMLPercepcionRetencion xmlDocument = unmarshall(documentOXM, new InputSource(reader)); - Retention.RetentionBuilder builder = Retention.builder(); - - enrichBasePercepcionRetencion(xmlDocument, builder); - - // Serie - String[] split = xmlDocument.getDocumentId().split("-"); - if (split.length == 2) { - builder.serie(split[0]); - } - - // Tipo de regimen - builder.tipoRegimen(xmlDocument.getSunatSystemCode()); - - // ImporteTotalPercibido, ImporteTotalCobrado - XMLPercepcionRetencionSunatDocumentReference sunatDocumentReference = xmlDocument.getSunatDocumentReference(); - if (sunatDocumentReference != null) { - XMLPercepcionRetencionInformation sunatInformation = sunatDocumentReference.getSunatInformation(); - if (sunatInformation != null) { - builder.importeTotalRetenido(sunatInformation.getSunatAmount()); - builder.importeTotalPagado(sunatInformation.getSunatNetTotal()); - } - } - - return builder.build(); - } - } - - public static VoidedDocuments unmarshallVoidedDocuments(String xml) throws JAXBException, IOException { - try ( - InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/voided-documents.xml"); - StringReader reader = new StringReader(xml); - ) { - XMLSunatDocumentVoidedDocuments xmlDocument = unmarshall(documentOXM, new InputSource(reader)); - VoidedDocuments.VoidedDocumentsBuilder builder = VoidedDocuments.builder(); - - enrichSunatDocument(xmlDocument, builder); - - // Detalles - List lines = xmlDocument.getLines(); - if (lines != null) { - builder.comprobantes(lines.stream() - .map(line -> VoidedDocumentsItem.builder() - .tipoComprobante(line.getDocumentTypeCode()) - .serie(line.getDocumentSerialID()) - .numero(line.getDocumentNumberID()) - .descripcionSustento(line.getVoidReasonDescription()) - .build() - ) - .collect(Collectors.toList()) - ); - } - - return builder.build(); - } - } - - public static SummaryDocuments unmarshallSummaryDocuments(String xml) throws JAXBException, IOException { - try ( - InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/summary-documents.xml"); - StringReader reader = new StringReader(xml); - ) { - XMLSunatDocumentSummaryDocuments xmlDocument = unmarshall(documentOXM, new InputSource(reader)); - SummaryDocuments.SummaryDocumentsBuilder builder = SummaryDocuments.builder(); - - enrichSunatDocument(xmlDocument, builder); - - // Detalles - List lines = xmlDocument.getLines(); - if (lines != null) { - builder.comprobantes(lines.stream() - .map(line -> { - Map billingPayments = Optional.ofNullable(line.getBillingPayments()) - .orElse(Collections.emptyList()) - .stream() - .collect(Collectors.toMap( - XMLSunatDocumentSummaryDocumentsLine.BillingPayment::getInstructionId, - XMLSunatDocumentSummaryDocumentsLine.BillingPayment::getPaidAmount - )); - - Map taxTotals = Optional.ofNullable(line.getTaxTotals()) - .orElse(Collections.emptyList()) - .stream() - .collect(Collectors.toMap( - taxTotal -> { - String code = taxTotal.getTaxSubtotals() != null ? taxTotal.getTaxSubtotals().getCode() : ""; - return Catalog - .valueOfCode(Catalog5.class, code) - .orElse(null); - }, - XMLSunatDocumentSummaryDocumentsLine.TaxTotalSummaryDocuments::getTaxAmount - )); - - io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteAfectado comprobanteAfectado = Optional.ofNullable(line.getBillingReference()) - .map(billingReference -> io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteAfectado.builder() - .serieNumero(billingReference.getInvoiceDocumentReference_id()) - .tipoComprobante(billingReference.getInvoiceDocumentReference_documentTypeCode()) - .build() - ) - .orElse(null); - - return SummaryDocumentsItem.builder() - .tipoOperacion(line.getStatus_conditionCode()) - .comprobante(Comprobante.builder() - .moneda(line.getTotalAmount_currencyID()) - .tipoComprobante(line.getDocumentTypeCode()) - .serieNumero(line.getDocumentId()) - .cliente(Cliente.builder() - .numeroDocumentoIdentidad(line.getAccountingCustomerParty_customerAssignedAccountId()) - .tipoDocumentoIdentidad(line.getAccountingCustomerParty_additionalAccountID()) - .build() - ) - .comprobanteAfectado(comprobanteAfectado) - .valorVenta(ComprobanteValorVenta.builder() - .importeTotal(line.getTotalAmount()) - .gravado(billingPayments.get("01")) - .exonerado(billingPayments.get("02")) - .inafecto(billingPayments.get("03")) - .gratuito(billingPayments.get("05")) - .otrosCargos(line.getAllowanceCharge_amount()) - .build() - ) - .impuestos(ComprobanteImpuestos.builder() - .igv(taxTotals.get(Catalog5.IGV)) - .icb(taxTotals.get(Catalog5.ICBPER)) - .build() - ) - .build() - ) - .build(); - } - ) - .collect(Collectors.toList()) - ); - } - - return builder.build(); - } - } - - public static DespatchAdvice unmarshallDespatchAdvice(String xml) throws JAXBException, IOException { - try ( - InputStream documentOXM = Thread.currentThread().getContextClassLoader().getResourceAsStream("jaxb/xml-bindings/despatch-advice.xml"); - StringReader reader = new StringReader(xml); - ) { - XMLDespatchAdvice xmlDocument = unmarshall(documentOXM, new InputSource(reader)); - DespatchAdvice.DespatchAdviceBuilder builder = DespatchAdvice.builder(); - - // Serie y numero - String[] split = xmlDocument.getDocumentId().split("-"); - if (split.length == 2) { - builder.serie(split[0]); - builder.numero(Integer.parseInt(split[1])); - } - - builder.fechaEmision(xmlDocument.getIssueDate()); - builder.horaEmision(xmlDocument.getIssueTime()); - builder.tipoComprobante(xmlDocument.getDespatchAdviceTypeCode()); - builder.observaciones(xmlDocument.getNote()); - builder.documentoBaja(Optional.ofNullable(xmlDocument.getOrderReference()) - .map(elem -> DocumentoBaja.builder() - .serieNumero(elem.getId()) - .tipoDocumento(elem.getOrderTypeCode()) - .build() - ) - .orElse(null) - ); - builder.documentoRelacionado(Optional.ofNullable(xmlDocument.getAdditionalDocumentReference()) - .map(elem -> DocumentoRelacionado.builder() - .serieNumero(elem.getId()) - .tipoDocumento(elem.getDocumentTypeCode()) - .build() - ) - .orElse(null) - ); - builder.firmante(Mapper.mapFirmante(xmlDocument.getSignature())); - - builder.remitente(Optional.ofNullable(xmlDocument.getDespatchSupplierParty()) - .map(elem -> Remitente.builder() - .ruc(elem.getCustomerAssignedAccountID()) - .razonSocial(elem.getRegistrationName()) - .build() - ) - .orElse(null) - ); - - builder.destinatario(Optional.ofNullable(xmlDocument.getDeliveryCustomerParty()) - .map(elem -> Destinatario.builder() - .numeroDocumentoIdentidad(elem.getPartyIdentification_id()) - .nombre(elem.getRegistrationName()) - .tipoDocumentoIdentidad(elem.getCustomerAssignedAccountID_schemeId()) - .build() - ) - .orElse(null) - ); - - builder.proveedor(Optional.ofNullable(xmlDocument.getSellerSupplierParty()) - .map(elem -> Proveedor.builder() - .ruc(elem.getCustomerAssignedAccountId()) - .nombreComercial(elem.getRegistrationName()) - .build() - ) - .orElse(null) - ); - - builder.envio(Optional.ofNullable(xmlDocument.getShipment()) - .map(elem -> { - Transportista transportista = null; - if (elem.getCarrierParty() != null || elem.getTransportMeans() != null || elem.getDriverPerson() != null) { - Transportista.TransportistaBuilder transportistaBuilder = Transportista.builder(); - - Optional.ofNullable(elem.getCarrierParty()) - .ifPresent(carrierParty -> transportistaBuilder - .tipoDocumentoIdentidad(carrierParty.getPartyIdentification_schemeId()) - .numeroDocumentoIdentidad(carrierParty.getPartyIdentification_id()) - .nombre(carrierParty.getPartyName()) - ); - Optional.ofNullable(elem.getTransportMeans()) - .ifPresent(transportMeans -> transportistaBuilder - .placaDelVehiculo(transportMeans.getLicensePlateId()) - ); - Optional.ofNullable(elem.getDriverPerson()) - .ifPresent(driverPerson -> transportistaBuilder - .choferTipoDocumentoIdentidad(driverPerson.getId()) - .choferTipoDocumentoIdentidad(driverPerson.getId_schemeId()) - ); - - transportista = transportistaBuilder.build(); - } - - return Envio.builder() - .tipoTraslado(elem.getHandlingCode()) - .motivoTraslado(elem.getInformation()) - .pesoTotal(elem.getGrossWeightMeasure()) - .pesoTotalUnidadMedida(elem.getGrossWeightMeasure_unitCode()) - .numeroDeBultos(elem.getTotalTransportHandlingUnitQuantity()) - .transbordoProgramado(elem.getSplitConsignmentIndicator()) - .tipoModalidadTraslado(elem.getTransportModeCode()) - .fechaTraslado(elem.getStartDate()) - .transportista(transportista) - .destino(Destino.builder() - .ubigeo(elem.getDeliveryAddress_id()) - .direccion(elem.getDeliveryAddress_line()) - .build() - ) - .numeroDeContenedor(elem.getTransportEquipment_id()) - .partida(Partida.builder() - .ubigeo(elem.getOriginAddress_id()) - .direccion(elem.getOriginAddress_streetName()) - .build() - ) - .codigoDePuerto(elem.getFirstArrivalPortLocation_id()) - .build(); - } - ) - .orElse(null) - ); - - builder.detalles(Optional.ofNullable(xmlDocument.getLines()) - .orElse(Collections.emptyList()) - .stream() - .map(elem -> DespatchAdviceItem.builder() - .cantidad(elem.getDeliveredQuantity()) - .unidadMedida(elem.getDeliveredQuantity_unitCode()) - .descripcion(elem.getItemName()) - .codigo(elem.getSellersItemIdentification_id()) - .codigoSunat(elem.getItemClassificationCode()) - .build() - ) - .collect(Collectors.toList()) - ); - - return builder.build(); - } - } - - private static T unmarshall(InputStream documentOXML, InputSource inputSource) throws JAXBException { - Map properties = new HashMap<>(); - properties.put(JAXBContextProperties.OXM_METADATA_SOURCE, List.of( - Objects.requireNonNull(documentOXML) - )); - - JAXBContext jaxbContext = JAXBContextFactory.createContext(Unmarshall.class.getPackageName(), null, properties); - Unmarshaller unmarshaller = jaxbContext.createUnmarshaller(); - return (T) unmarshaller.unmarshal(inputSource); - } - - private static void enrichSalesDocument(XMLSalesDocument xmlSalesDocument, SalesDocument.SalesDocumentBuilder builder) { - enrichDocument(xmlSalesDocument, builder); - - // Leyendas - Optional> notes = Optional - .ofNullable(xmlSalesDocument.getNotes()) - .map(o -> o.stream() - .filter(note -> note.getLanguageLocaleId() != null) - .collect(Collectors.toMap(XMLSalesDocument.Note::getLanguageLocaleId, XMLSalesDocument.Note::getValue)) - ); - notes.ifPresent(builder::leyendas); - - // Serie y numero - String[] split = xmlSalesDocument.getDocumentId().split("-"); - if (split.length == 2) { - builder.serie(split[0]); - builder.numero(Integer.parseInt(split[1])); - } - - // - builder.horaEmision(xmlSalesDocument.getIssueTime()); - builder.ordenDeCompra(xmlSalesDocument.getOrderReferenceId()); - - // Cliente - builder.cliente(Mapper.mapCliente(xmlSalesDocument.getAccountingCustomerParty())); - - // Total impuestos - builder.totalImpuestos(Mapper.mapTotalImpuestos(xmlSalesDocument.getTaxTotal())); - - // Guias - builder.guias(Mapper.mapGuias(xmlSalesDocument.getDespatchDocumentReferences())); - - // Documentos relacionados - builder.documentosRelacionados(Mapper.mapDocumentosRelacionados(xmlSalesDocument.getAdditionalDocumentReferences())); - - // Detalles - builder.detalles(Mapper.mapDetalles(xmlSalesDocument.getLines())); - } - - private static void enrichNote(XMLSalesDocument xmlSalesDocument, Note.NoteBuilder builder) { - enrichDocument(xmlSalesDocument, builder); - - // ComprobanteAfectado - builder.comprobanteAfectadoSerieNumero(xmlSalesDocument.getDiscrepancyResponse_referenceId()); - builder.comprobanteAfectadoTipo(xmlSalesDocument.getDiscrepancyResponse_responseCode()); - builder.sustentoDescripcion(xmlSalesDocument.getDiscrepancyResponse_description()); - - // Total importe - builder.totalImporte(Mapper.mapTotalImporteNote(xmlSalesDocument.getMonetaryTotal())); - } - - private static void enrichBasePercepcionRetencion(XMLPercepcionRetencion xmlDocument, BasePercepcionRetencion.BasePercepcionRetencionBuilder builder) { - enrichDocument(xmlDocument, builder); - - // Numero - String[] split = xmlDocument.getDocumentId().split("-"); - if (split.length == 2) { - builder.numero(Integer.parseInt(split[1])); - } - - // Tipo regimen porcentaje - builder.tipoRegimenPorcentaje(xmlDocument.getSunatPercent()); - - // Observacion - builder.observacion(xmlDocument.getNote()); - - // Cliente - builder.cliente(Mapper.mapCliente(xmlDocument.getAccountingCustomerParty())); - - // Operacion - XMLPercepcionRetencionSunatDocumentReference sunatDocumentReference = xmlDocument.getSunatDocumentReference(); - - if (sunatDocumentReference != null) { - XMLPercepcionRetencionInformation sunatInformation = sunatDocumentReference.getSunatInformation(); - - TipoCambio tipoCambio = null; - if (sunatInformation != null && sunatInformation.getExchangeRate() != null) { - tipoCambio = TipoCambio.builder() - .fecha(sunatInformation.getExchangeRate().getDate()) - .valor(sunatInformation.getExchangeRate().getCanculationRate()) - .build(); - } - - builder.operacion(PercepcionRetencionOperacion.builder() - .numeroOperacion(sunatDocumentReference.getPayment_id()) - .fechaOperacion(sunatDocumentReference.getPayment_paidDate()) - .importeOperacion(sunatDocumentReference.getPayment_paidAmount()) - .comprobante(ComprobanteAfectado.builder() - .moneda(sunatDocumentReference.getTotalInvoiceAmount_currencyId()) - .tipoComprobante(sunatDocumentReference.getId_schemeId()) - .serieNumero(sunatDocumentReference.getId()) - .fechaEmision(sunatDocumentReference.getIssueDate()) - .importeTotal(sunatDocumentReference.getTotalInvoiceAmount()) - .build() - ) - .tipoCambio(tipoCambio) - .build() - ); - } - - } - - private static void enrichSunatDocument(XMLSunatDocument xmlDocument, SunatDocument.SunatDocumentBuilder builder) { - enrichDocument(xmlDocument, builder); - - // Numero - String[] split = xmlDocument.getDocumentId().split("-"); - if (split.length == 3) { - builder.numero(Integer.parseInt(split[2])); - } - - // Fecha emision comprobante - builder.fechaEmisionComprobantes(xmlDocument.getReferenceDate()); - } - - private static void enrichDocument(XMLSalesDocument xmlSalesDocument, Document.DocumentBuilder builder) { - builder.moneda(xmlSalesDocument.getDocumentCurrencyCode()); - builder.fechaEmision(xmlSalesDocument.getIssueDate()); - builder.proveedor(Mapper.mapProveedor(xmlSalesDocument.getAccountingSupplierParty())); - builder.firmante(Mapper.mapFirmante(xmlSalesDocument.getSignature())); - } - - private static void enrichDocument(XMLPercepcionRetencion xmlDocument, Document.DocumentBuilder builder) { - builder.moneda(xmlDocument.getTotalInvoiceAmount_currencyId()); - builder.fechaEmision(xmlDocument.getIssueDate()); - builder.proveedor(Mapper.mapProveedor(xmlDocument.getAccountingSupplierParty())); - builder.firmante(Mapper.mapFirmante(xmlDocument.getSignature())); - } - - private static void enrichDocument(XMLSunatDocument xmlDocument, Document.DocumentBuilder builder) { - builder.moneda(null); - builder.fechaEmision(xmlDocument.getIssueDate()); - builder.proveedor(Mapper.mapProveedor(xmlDocument.getAccountingSupplierParty())); - builder.firmante(Mapper.mapFirmante(xmlDocument.getSignature())); - } - -} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/CreditNoteMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/CreditNoteMapper.java new file mode 100644 index 00000000..fca56e2e --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/CreditNoteMapper.java @@ -0,0 +1,40 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers; + +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SalesDocumentHelperMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SalesDocumentMapper; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLCreditNote; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLCreditNoteLine; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; +import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; +import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; +import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImporteNote; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.mapstruct.NullValueMappingStrategy; + +@Mapper(config = SalesDocumentMapper.class, + nullValueIterableMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT +) +public interface CreditNoteMapper extends SalesDocumentHelperMapper { + + @Mapping(target = "comprobanteAfectadoSerieNumero", source = "discrepancyResponse.referenceID") + @Mapping(target = "comprobanteAfectadoTipo", source = "discrepancyResponse.responseCode") + @Mapping(target = "sustentoDescripcion", source = "discrepancyResponse.description") + + @Mapping(target = "totalImporte", source = "monetaryTotal") + @Mapping(target = "detalles", source = "lines") + CreditNote map(XMLCreditNote xml); + + @Mapping(target = "importe", source = "payableAmount") + @Mapping(target = "importeSinImpuestos", source = "lineExtensionAmount") + @Mapping(target = "importeConImpuestos", source = "taxInclusiveAmount") + TotalImporteNote mapTotalImporteNote(XMLSalesDocument.MonetaryTotal xml); + + default DocumentoVentaDetalle mapDocumentoVentaDetalle(XMLCreditNoteLine xml) { + DocumentoVentaDetalle documentoVentaDetalle = mapSalesDocumentDetalle(xml); + documentoVentaDetalle.setCantidad(xml.getQuantity().getValue()); + documentoVentaDetalle.setUnidadMedida(xml.getQuantity().getUnitCode()); + + return documentoVentaDetalle; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DebitNoteMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DebitNoteMapper.java new file mode 100644 index 00000000..c31684b1 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DebitNoteMapper.java @@ -0,0 +1,40 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers; + +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SalesDocumentHelperMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SalesDocumentMapper; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLDebitNote; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLDebitNoteLine; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; +import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; +import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; +import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImporteNote; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.mapstruct.NullValueMappingStrategy; + +@Mapper(config = SalesDocumentMapper.class, + nullValueIterableMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT +) +public interface DebitNoteMapper extends SalesDocumentHelperMapper { + + @Mapping(target = "comprobanteAfectadoSerieNumero", source = "discrepancyResponse.referenceID") + @Mapping(target = "comprobanteAfectadoTipo", source = "discrepancyResponse.responseCode") + @Mapping(target = "sustentoDescripcion", source = "discrepancyResponse.description") + + @Mapping(target = "totalImporte", source = "monetaryTotal") + @Mapping(target = "detalles", source = "lines") + DebitNote map(XMLDebitNote xml); + + @Mapping(target = "importe", source = "payableAmount") + @Mapping(target = "importeSinImpuestos", source = "lineExtensionAmount") + @Mapping(target = "importeConImpuestos", source = "taxInclusiveAmount") + TotalImporteNote mapTotalImporteNote(XMLSalesDocument.MonetaryTotal xml); + + default DocumentoVentaDetalle mapDocumentoVentaDetalle(XMLDebitNoteLine xml) { + DocumentoVentaDetalle documentoVentaDetalle = mapSalesDocumentDetalle(xml); + documentoVentaDetalle.setCantidad(xml.getQuantity().getValue()); + documentoVentaDetalle.setUnidadMedida(xml.getQuantity().getUnitCode()); + + return documentoVentaDetalle; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DespatchAdviceMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DespatchAdviceMapper.java new file mode 100644 index 00000000..05f18fcf --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DespatchAdviceMapper.java @@ -0,0 +1,112 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers; + +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.FirmanteMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.Numero2Translator; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieNumeroMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieNumeroTranslator; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieTranslator; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdviceLine; +import io.github.project.openubl.xbuilder.content.models.common.Proveedor; +import io.github.project.openubl.xbuilder.content.models.standard.guia.DespatchAdvice; +import io.github.project.openubl.xbuilder.content.models.standard.guia.DespatchAdviceItem; +import io.github.project.openubl.xbuilder.content.models.standard.guia.Destinatario; +import io.github.project.openubl.xbuilder.content.models.standard.guia.Destino; +import io.github.project.openubl.xbuilder.content.models.standard.guia.DocumentoBaja; +import io.github.project.openubl.xbuilder.content.models.standard.guia.DocumentoRelacionado; +import io.github.project.openubl.xbuilder.content.models.standard.guia.Envio; +import io.github.project.openubl.xbuilder.content.models.standard.guia.Partida; +import io.github.project.openubl.xbuilder.content.models.standard.guia.Remitente; +import io.github.project.openubl.xbuilder.content.models.standard.guia.Transportista; +import org.mapstruct.Condition; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.mapstruct.Named; + +@Mapper(uses = { + SerieNumeroMapper.class, + FirmanteMapper.class +}) +public interface DespatchAdviceMapper { + + @Mapping(target = "serie", source = "documentId", qualifiedBy = {SerieNumeroTranslator.class, SerieTranslator.class}) + @Mapping(target = "numero", source = "documentId", qualifiedBy = {SerieNumeroTranslator.class, Numero2Translator.class}) + @Mapping(target = "fechaEmision", source = "issueDate") + @Mapping(target = "horaEmision", source = "issueTime") + @Mapping(target = "tipoComprobante", source = "despatchAdviceTypeCode") + @Mapping(target = "observaciones", source = "note") + @Mapping(target = "documentoBaja", source = "orderReference") + @Mapping(target = "documentoRelacionado", source = "additionalDocumentReference") + @Mapping(target = "firmante", source = "signature") + @Mapping(target = "remitente", source = "despatchSupplierParty") + @Mapping(target = "destinatario", source = "deliveryCustomerParty") + @Mapping(target = "proveedor", source = "sellerSupplierParty") + @Mapping(target = "envio", source = "shipment") + @Mapping(target = "detalles", source = "lines") + DespatchAdvice map(XMLDespatchAdvice xml); + + @Mapping(target = "tipoDocumento", source = "orderTypeCode") + @Mapping(target = "serieNumero", source = "id") + DocumentoBaja mapDocumentoBaja(XMLDespatchAdvice.OrderReference xml); + + @Mapping(target = "tipoDocumento", source = "documentTypeCode") + @Mapping(target = "serieNumero", source = "id") + DocumentoRelacionado mapDocumentoRelacionado(XMLDespatchAdvice.AdditionalDocumentReference xml); + + @Mapping(target = "ruc", source = "party.partyIdentification.id.value") + @Mapping(target = "razonSocial", source = "party.partyLegalEntity.registrationName") + Remitente mapRemitente(XMLDespatchAdvice.DespatchSupplierParty xml); + + @Mapping(target = "numeroDocumentoIdentidad", source = "party.partyIdentification.id.value") + @Mapping(target = "tipoDocumentoIdentidad", source = "party.partyIdentification.id.schemeID") + @Mapping(target = "nombre", source = "party.partyLegalEntity.registrationName") + Destinatario mapDestinatario(XMLDespatchAdvice.DeliveryCustomerParty xml); + + @Mapping(target = "ruc", source = "customerAssignedAccountId") + @Mapping(target = "nombreComercial", source = "party.partyLegalEntity.registrationName") + Proveedor mapProveedor(XMLDespatchAdvice.SellerSupplierParty xml); + + @Mapping(target = "tipoTraslado", source = "handlingCode") + @Mapping(target = "motivoTraslado", source = "information") + @Mapping(target = "pesoTotal", source = "grossWeightMeasure.value") + @Mapping(target = "pesoTotalUnidadMedida", source = "grossWeightMeasure.unitCode") + @Mapping(target = "numeroDeBultos", source = "totalTransportHandlingUnitQuantity") + @Mapping(target = "transbordoProgramado", source = "splitConsignmentIndicator") + @Mapping(target = "tipoModalidadTraslado", source = "shipmentStage.transportModeCode") + @Mapping(target = "fechaTraslado", source = "shipmentStage.transitPeriod.startDate") + @Mapping(target = "numeroDeContenedor", source = "transportHandlingUnit.transportEquipment.id") + @Mapping(target = "codigoDePuerto", source = "firstArrivalPortLocation.id") + @Mapping(target = "transportista", source = "shipmentStage", conditionQualifiedByName = "transportistaRequirements") + @Mapping(target = "destino", source = "delivery") + @Mapping(target = "partida", source = "originAddress") + Envio mapEnvio(XMLDespatchAdvice.Shipment xml); + + @Condition + @Named("transportistaRequirements") + default boolean conditionTransportista(XMLDespatchAdvice.ShipmentStage xml) { + return xml.getCarrierParty() != null && xml.getTransportMeans() != null && xml.getDriverPerson() != null; + } + + @Mapping(target = "tipoDocumentoIdentidad", source = "carrierParty.partyIdentification.id.value") + @Mapping(target = "numeroDocumentoIdentidad", source = "carrierParty.partyIdentification.id.schemeID") + @Mapping(target = "nombre", source = "carrierParty.partyName.name") + @Mapping(target = "placaDelVehiculo", source = "transportMeans.roadTransport.licensePlateID") + @Mapping(target = "choferTipoDocumentoIdentidad", source = "driverPerson.id.schemeID") + @Mapping(target = "choferNumeroDocumentoIdentidad", source = "driverPerson.id.value") + Transportista mapTransportista(XMLDespatchAdvice.ShipmentStage xml); + + @Mapping(target = "ubigeo", source = "deliveryAddress.id") + @Mapping(target = "direccion", source = "deliveryAddress.addressLine.line") + Destino mapDelivery(XMLDespatchAdvice.Delivery xml); + + @Mapping(target = "ubigeo", source = "id") + @Mapping(target = "direccion", source = "streetName") + Partida mapPartida(XMLDespatchAdvice.OriginAddress xml); + + @Mapping(target = "unidadMedida", source = "deliveredQuantity.unitCode") + @Mapping(target = "cantidad", source = "deliveredQuantity.value") + @Mapping(target = "descripcion", source = "item.name") + @Mapping(target = "codigo", source = "item.sellersItemIdentification.id") + @Mapping(target = "codigoSunat", source = "item.commodityClassification.itemClassificationCode") + DespatchAdviceItem mapLine(XMLDespatchAdviceLine xml); +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/InvoiceMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/InvoiceMapper.java new file mode 100644 index 00000000..69f776dd --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/InvoiceMapper.java @@ -0,0 +1,257 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers; + +import io.github.project.openubl.xbuilder.content.catalogs.Catalog; +import io.github.project.openubl.xbuilder.content.catalogs.Catalog53_Anticipo; +import io.github.project.openubl.xbuilder.content.catalogs.Catalog53_DescuentoGlobal; +import io.github.project.openubl.xbuilder.content.catalogs.CatalogContadoCredito; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.DireccionMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SalesDocumentHelperMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SalesDocumentMapper; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLInvoice; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLInvoiceLine; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; +import io.github.project.openubl.xbuilder.content.models.standard.general.Anticipo; +import io.github.project.openubl.xbuilder.content.models.standard.general.CuotaDePago; +import io.github.project.openubl.xbuilder.content.models.standard.general.Descuento; +import io.github.project.openubl.xbuilder.content.models.standard.general.Detraccion; +import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; +import io.github.project.openubl.xbuilder.content.models.standard.general.FormaDePago; +import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; +import io.github.project.openubl.xbuilder.content.models.standard.general.Percepcion; +import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImporteInvoice; +import org.mapstruct.CollectionMappingStrategy; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; +import org.mapstruct.NullValueMappingStrategy; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Collectors; + +import static io.github.project.openubl.xbuilder.content.jaxb.mappers.utils.MapperUtils.mapPorcentaje; + +@Mapper(config = SalesDocumentMapper.class, + nullValueIterableMappingStrategy = NullValueMappingStrategy.RETURN_DEFAULT, + uses = { + DireccionMapper.class + } +) +public interface InvoiceMapper extends SalesDocumentHelperMapper { + + @Mapping(target = "fechaVencimiento", source = "dueDate") + @Mapping(target = "tipoComprobante", source = "invoiceTypeCode.value") + @Mapping(target = "observaciones", source = "notes") + @Mapping(target = "tipoOperacion", source = "invoiceTypeCode.listID") + @Mapping(target = "formaDePago", source = "paymentTerms") + + @Mapping(target = "totalImporte", source = "monetaryTotal") + @Mapping(target = "direccionEntrega", source = "delivery.deliveryLocation.address") + @Mapping(target = "detraccion", source = ".") + @Mapping(target = "percepcion", source = ".") + @Mapping(target = "anticipos", source = ".") + @Mapping(target = "descuentos", source = "allowanceCharges") + + @Mapping(target = "detalles", source = "lines") + Invoice map(XMLInvoice xml); + + @Mapping(target = "importe", source = "payableAmount") + @Mapping(target = "importeSinImpuestos", source = "lineExtensionAmount") + @Mapping(target = "importeConImpuestos", source = "taxInclusiveAmount") + @Mapping(target = "anticipos", source = "prepaidAmount") + @Mapping(target = "descuentos", source = "allowanceTotalAmount") + TotalImporteInvoice mapTotalImporteInvoice(XMLSalesDocument.MonetaryTotal xml); + + default String mapObservaciones(List xml) { + if (xml == null) { + return null; + } + + return xml.stream() + .filter(e -> e.getLanguageLocaleId() == null) + .findFirst() + .map(XMLSalesDocument.Note::getValue) + .orElse(null); + } + + default FormaDePago mapFormaDePago(List paymentTerms) { + if (paymentTerms == null) { + return null; + } + + List formasDePago = paymentTerms.stream() + .filter(elem -> Objects.equals(elem.getId(), "FormaPago")) + .collect(Collectors.toList()); + if (formasDePago.isEmpty()) { + return null; + } + + XMLSalesDocument.PaymentTerms formaDePago = formasDePago.stream() + .filter(elem -> Objects.equals(elem.getPaymentMeansID(), CatalogContadoCredito.CREDITO.getCode()) || + Objects.equals(elem.getPaymentMeansID(), CatalogContadoCredito.CONTADO.getCode()) + ) + .findFirst() + .orElse(new XMLSalesDocument.PaymentTerms()); + + List cuotas = formasDePago.stream() + .filter(elem -> elem.getPaymentMeansID().startsWith("Cuota")) + .collect(Collectors.toList()); + + return FormaDePago.builder() + .tipo(formaDePago.getPaymentMeansID()) + .total(formaDePago.getAmount()) + .cuotas(cuotas.stream() + .map(elem -> CuotaDePago.builder() + .importe(elem.getAmount()) + .fechaPago(elem.getPaymentDueDate()) + .build() + ) + .collect(Collectors.toList()) + ) + .build(); + } + + default Detraccion mapDetraccion(XMLSalesDocument xml) { + if (xml == null) { + return null; + } + + XMLSalesDocument.PaymentMeans paymentMeans = xml.getPaymentMeans(); + List paymentTerms = xml.getPaymentTerms(); + if (paymentMeans == null || paymentTerms == null) { + return null; + } + + String cuentaBancaria = Optional.ofNullable(paymentMeans.getPayeeFinancialAccount()) + .map(XMLSalesDocument.PayeeFinancialAccount::getId) + .orElse(null); + + Detraccion.DetraccionBuilder builder = Detraccion.builder() + .medioDePago(paymentMeans.getPaymentMeansCode()) + .cuentaBancaria(cuentaBancaria); + + paymentTerms.stream() + .filter(elem -> Objects.equals(elem.getId(), "Detraccion")) + .findFirst() + .ifPresent(el -> builder + .tipoBienDetraido(el.getPaymentMeansID()) + .porcentaje(mapPorcentaje(el.getPaymentPercent())) + .monto(el.getAmount()) + ); + + return builder.build(); + } + + default Percepcion mapPercepcion(XMLSalesDocument xml) { + if (xml == null) { + return null; + } + + List paymentTerms = xml.getPaymentTerms(); + List allowanceCharges = xml.getAllowanceCharges(); + if (paymentTerms == null || allowanceCharges == null) { + return null; + } + + Optional paymentTerm = paymentTerms.stream() + .filter(elem -> Objects.equals(elem.getId(), "Percepcion")) + .findFirst(); + Optional allowanceCharge = allowanceCharges.stream() + .filter(XMLSalesDocument.AllowanceCharge::getChargeIndicator) + .findFirst(); + + if (paymentTerm.isEmpty() || allowanceCharge.isEmpty()) { + return null; + } + + Percepcion.PercepcionBuilder builder = Percepcion.builder(); + paymentTerm.ifPresent(elem -> builder + .montoTotal(elem.getAmount()) + ); + allowanceCharge.ifPresent(elem -> builder + .tipo(elem.getAllowanceChargeReasonCode()) + .porcentaje(elem.getMultiplierFactorNumeric()) + .monto(elem.getAmount()) + .montoBase(elem.getBaseAmount()) + ); + + return builder.build(); + } + + default List mapAnticipos(XMLSalesDocument xml) { + if (xml == null) { + return null; + } + + List additionalDocumentReferences = xml.getAdditionalDocumentReferences(); + List prepaidPayments = xml.getPrepaidPayments(); + List allowanceCharges = xml.getAllowanceCharges(); + if (additionalDocumentReferences == null || prepaidPayments == null || allowanceCharges == null) { + return Collections.emptyList(); + } + + additionalDocumentReferences = additionalDocumentReferences.stream() + .filter(additionalDocumentReference -> additionalDocumentReference.getDocumentStatusCode() != null) + .collect(Collectors.toList()); + + allowanceCharges = allowanceCharges.stream() + .filter(allowanceCharge -> !allowanceCharge.getChargeIndicator()) + .filter(allowanceCharge -> Catalog + .valueOfCode(Catalog53_Anticipo.class, allowanceCharge.getAllowanceChargeReasonCode()) + .isPresent() + ) + .collect(Collectors.toList()); + + if (additionalDocumentReferences.size() != prepaidPayments.size() || additionalDocumentReferences.size() != allowanceCharges.size()) { + return Collections.emptyList(); + } + + List result = new ArrayList<>(); + for (int i = 0; i < additionalDocumentReferences.size(); i++) { + XMLSalesDocument.AdditionalDocumentReference additionalDocumentReference = additionalDocumentReferences.get(i); + XMLSalesDocument.PrepaidPayment prepaidPayment = prepaidPayments.get(i); + XMLSalesDocument.AllowanceCharge allowanceCharge = allowanceCharges.get(i); + + result.add(Anticipo.builder() + .comprobanteSerieNumero(additionalDocumentReference.getId()) + .comprobanteTipo(additionalDocumentReference.getDocumentTypeCode()) + .monto(prepaidPayment.getPaidAmount()) + .tipo(allowanceCharge.getAllowanceChargeReasonCode()) + .build() + ); + } + + return result; + } + + default List mapDescuentos(List xml) { + if (xml == null) { + return Collections.emptyList(); + } + + return xml.stream() + .filter(allowanceCharge -> !allowanceCharge.getChargeIndicator()) + .filter(allowanceCharge -> Catalog + .valueOfCode(Catalog53_DescuentoGlobal.class, allowanceCharge.getAllowanceChargeReasonCode()) + .isPresent() + ) + .map(allowanceCharge -> Descuento.builder() + .tipoDescuento(allowanceCharge.getAllowanceChargeReasonCode()) + .factor(allowanceCharge.getMultiplierFactorNumeric()) + .monto(allowanceCharge.getAmount()) + .montoBase(allowanceCharge.getBaseAmount()) + .build() + ) + .collect(Collectors.toList()); + } + + default DocumentoVentaDetalle mapDocumentoVentaDetalle(XMLInvoiceLine xml) { + DocumentoVentaDetalle documentoVentaDetalle = mapSalesDocumentDetalle(xml); + documentoVentaDetalle.setCantidad(xml.getQuantity().getValue()); + documentoVentaDetalle.setUnidadMedida(xml.getQuantity().getUnitCode()); + + return documentoVentaDetalle; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/PerceptionMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/PerceptionMapper.java new file mode 100644 index 00000000..7584c8ef --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/PerceptionMapper.java @@ -0,0 +1,61 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers; + +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ClienteMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.FirmanteMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.Numero2Translator; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ProveedorMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieNumeroMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieNumeroTranslator; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieTranslator; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcion; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionSunatDocumentReference; +import io.github.project.openubl.xbuilder.content.models.common.TipoCambio; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.PercepcionRetencionOperacion; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Perception; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +@Mapper(uses = { + SerieNumeroMapper.class, + ProveedorMapper.class, + ClienteMapper.class, + FirmanteMapper.class +}) +public interface PerceptionMapper { + + @Mapping(target = "serie", source = "documentId", qualifiedBy = {SerieNumeroTranslator.class, SerieTranslator.class}) + @Mapping(target = "numero", source = "documentId", qualifiedBy = {SerieNumeroTranslator.class, Numero2Translator.class}) + @Mapping(target = "tipoRegimen", source = "sunatSystemCode") + @Mapping(target = "importeTotalPercibido", source = "sunatDocumentReference.sunatInformation.sunatAmount") + @Mapping(target = "importeTotalCobrado", source = "sunatDocumentReference.sunatInformation.sunatNetTotal") + // General Document + @Mapping(target = "moneda", source = "totalInvoiceAmount.currencyID") + @Mapping(target = "fechaEmision", source = "issueDate") + @Mapping(target = "proveedor", source = "accountingSupplierParty") + @Mapping(target = "firmante", source = "signature") + // PerceptionRetention General + @Mapping(target = "tipoRegimenPorcentaje", source = "sunatPercent") + @Mapping(target = "observacion", source = "note") + @Mapping(target = "cliente", source = "accountingCustomerParty") + @Mapping(target = "operacion", source = "sunatDocumentReference") + Perception map(XMLPercepcion xml); + + @Mapping(target = "numeroOperacion", source = "payment.id") + @Mapping(target = "fechaOperacion", source = "payment.paidDate") + @Mapping(target = "importeOperacion", source = "payment.paidAmount") + @Mapping(target = "comprobante", source = ".") + @Mapping(target = "tipoCambio", source = "sunatInformation.exchangeRate") + PercepcionRetencionOperacion map(XMLPercepcionSunatDocumentReference xml); + + @Mapping(target = "moneda", source = "totalInvoiceAmount.currencyID") + @Mapping(target = "importeTotal", source = "totalInvoiceAmount.value") + @Mapping(target = "serieNumero", source = "id.value") + @Mapping(target = "tipoComprobante", source = "id.schemeID") + @Mapping(target = "fechaEmision", source = "issueDate") + ComprobanteAfectado mapComprobante(XMLPercepcionSunatDocumentReference xml); + + @Mapping(target = "fecha", source = "date") + @Mapping(target = "valor", source = "calculationRate") + TipoCambio mapTipoCambio(XMLPercepcionSunatDocumentReference.ExchangeRate xml); +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/RetentionMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/RetentionMapper.java new file mode 100644 index 00000000..3c478445 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/RetentionMapper.java @@ -0,0 +1,61 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers; + +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ClienteMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.FirmanteMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.Numero2Translator; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ProveedorMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieNumeroMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieNumeroTranslator; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieTranslator; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLRetention; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLRetentionSunatDocumentReference; +import io.github.project.openubl.xbuilder.content.models.common.TipoCambio; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.ComprobanteAfectado; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.PercepcionRetencionOperacion; +import io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.Retention; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +@Mapper(uses = { + SerieNumeroMapper.class, + ProveedorMapper.class, + ClienteMapper.class, + FirmanteMapper.class +}) +public interface RetentionMapper { + + @Mapping(target = "serie", source = "documentId", qualifiedBy = {SerieNumeroTranslator.class, SerieTranslator.class}) + @Mapping(target = "numero", source = "documentId", qualifiedBy = {SerieNumeroTranslator.class, Numero2Translator.class}) + @Mapping(target = "tipoRegimen", source = "sunatSystemCode") + @Mapping(target = "importeTotalRetenido", source = "sunatDocumentReference.sunatInformation.sunatAmount") + @Mapping(target = "importeTotalPagado", source = "sunatDocumentReference.sunatInformation.sunatNetTotal") + // General Document + @Mapping(target = "moneda", source = "totalInvoiceAmount.currencyID") + @Mapping(target = "fechaEmision", source = "issueDate") + @Mapping(target = "proveedor", source = "accountingSupplierParty") + @Mapping(target = "firmante", source = "signature") + // PerceptionRetention General + @Mapping(target = "tipoRegimenPorcentaje", source = "sunatPercent") + @Mapping(target = "observacion", source = "note") + @Mapping(target = "cliente", source = "accountingCustomerParty") + @Mapping(target = "operacion", source = "sunatDocumentReference") + Retention map(XMLRetention xml); + + @Mapping(target = "numeroOperacion", source = "payment.id") + @Mapping(target = "fechaOperacion", source = "payment.paidDate") + @Mapping(target = "importeOperacion", source = "payment.paidAmount") + @Mapping(target = "comprobante", source = ".") + @Mapping(target = "tipoCambio", source = "sunatInformation.exchangeRate") + PercepcionRetencionOperacion map(XMLRetentionSunatDocumentReference xml); + + @Mapping(target = "moneda", source = "totalInvoiceAmount.currencyID") + @Mapping(target = "importeTotal", source = "totalInvoiceAmount.value") + @Mapping(target = "serieNumero", source = "id.value") + @Mapping(target = "tipoComprobante", source = "id.schemeID") + @Mapping(target = "fechaEmision", source = "issueDate") + ComprobanteAfectado mapComprobante(XMLRetentionSunatDocumentReference xml); + + @Mapping(target = "fecha", source = "date") + @Mapping(target = "valor", source = "calculationRate") + TipoCambio mapTipoCambio(XMLRetentionSunatDocumentReference.ExchangeRate xml); +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/SummaryDocumentsMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/SummaryDocumentsMapper.java new file mode 100644 index 00000000..26449a3c --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/SummaryDocumentsMapper.java @@ -0,0 +1,115 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers; + +import io.github.project.openubl.xbuilder.content.catalogs.Catalog; +import io.github.project.openubl.xbuilder.content.catalogs.Catalog5; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ClienteMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.FirmanteMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.Numero3Translator; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ProveedorMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieNumeroMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieNumeroTranslator; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocuments; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine; +import io.github.project.openubl.xbuilder.content.models.common.Cliente; +import io.github.project.openubl.xbuilder.content.models.sunat.resumen.Comprobante; +import io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteImpuestos; +import io.github.project.openubl.xbuilder.content.models.sunat.resumen.ComprobanteValorVenta; +import io.github.project.openubl.xbuilder.content.models.sunat.resumen.SummaryDocuments; +import io.github.project.openubl.xbuilder.content.models.sunat.resumen.SummaryDocumentsItem; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +import java.math.BigDecimal; +import java.util.Collections; +import java.util.Map; +import java.util.Optional; +import java.util.stream.Collectors; + +@Mapper(uses = { + SerieNumeroMapper.class, + FirmanteMapper.class, + ProveedorMapper.class +}) +public interface SummaryDocumentsMapper { + + @Mapping(target = "fechaEmision", source = "issueDate") + @Mapping(target = "firmante", source = "signature") + @Mapping(target = "proveedor", source = "accountingSupplierParty") + + @Mapping(target = "numero", source = "documentId", qualifiedBy = {SerieNumeroTranslator.class, Numero3Translator.class}) + @Mapping(target = "fechaEmisionComprobantes", source = "referenceDate") + @Mapping(target = "comprobantes", source = "lines") + SummaryDocuments map(XMLSummaryDocuments xml); + + @Mapping(target = "tipoOperacion", source = "status.conditionCode") + @Mapping(target = "comprobante", source = ".") + SummaryDocumentsItem mapLines(XMLSummaryDocumentsLine xml); + + @Mapping(target = "moneda", source = "totalAmount.currencyID") + @Mapping(target = "tipoComprobante", source = "documentTypeCode") + @Mapping(target = "serieNumero", source = "documentId") + @Mapping(target = "cliente", source = "accountingCustomerParty") + @Mapping(target = "comprobanteAfectado.serieNumero", source = "billingReference.invoiceDocumentReference.id") + @Mapping(target = "comprobanteAfectado.tipoComprobante", source = "billingReference.invoiceDocumentReference.documentTypeCode") + @Mapping(target = "valorVenta", source = ".") + @Mapping(target = "impuestos", source = ".") + Comprobante mapLineComprobante(XMLSummaryDocumentsLine xml); + + @Mapping(target = "numeroDocumentoIdentidad", source = "customerAssignedAccountID") + @Mapping(target = "tipoDocumentoIdentidad", source = "additionalAccountID") + Cliente mapCliente(XMLSummaryDocumentsLine.AccountingCustomerParty xml); + + default ComprobanteValorVenta mapLineComprobanteValorVenta(XMLSummaryDocumentsLine xml) { + if (xml == null) { + return null; + } + + Map billingPayments = Optional.ofNullable(xml.getBillingPayments()) + .orElse(Collections.emptyList()) + .stream() + .collect(Collectors.toMap( + XMLSummaryDocumentsLine.BillingPayment::getInstructionId, + XMLSummaryDocumentsLine.BillingPayment::getPaidAmount + )); + + BigDecimal importeTotal = Optional.ofNullable(xml.getTotalAmount()) + .map(XMLSummaryDocumentsLine.TotalAmount::getValue) + .orElse(null); + BigDecimal otrosCargos = Optional.ofNullable(xml.getAllowanceCharge()) + .map(XMLSummaryDocumentsLine.AllowanceCharge::getValue) + .orElse(null); + + return ComprobanteValorVenta.builder() + .importeTotal(importeTotal) + .gravado(billingPayments.get("01")) + .exonerado(billingPayments.get("02")) + .inafecto(billingPayments.get("03")) + .gratuito(billingPayments.get("05")) + .otrosCargos(otrosCargos) + .build(); + } + + default ComprobanteImpuestos mapLineComprobanteImpuestos(XMLSummaryDocumentsLine xml) { + if (xml == null) { + return null; + } + + Map taxTotals = Optional.ofNullable(xml.getTaxTotals()) + .orElse(Collections.emptyList()) + .stream() + .collect(Collectors.toMap( + taxTotal -> Optional.ofNullable(taxTotal.getTaxSubtotals()) + .flatMap(f -> Optional.ofNullable(f.getTaxCategory())) + .flatMap(f -> Optional.ofNullable(f.getTaxScheme())) + .flatMap(taxScheme -> Optional.ofNullable(taxScheme.getId())) + .flatMap(code -> Catalog.valueOfCode(Catalog5.class, code)) + .orElse(null), + XMLSummaryDocumentsLine.TaxTotalSummaryDocuments::getTaxAmount + )); + + return ComprobanteImpuestos.builder() + .igv(taxTotals.get(Catalog5.IGV)) + .icb(taxTotals.get(Catalog5.ICBPER)) + .build(); + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/VoidedDocumentsMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/VoidedDocumentsMapper.java new file mode 100644 index 00000000..bba5bd42 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/VoidedDocumentsMapper.java @@ -0,0 +1,36 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers; + +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.FirmanteMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.Numero3Translator; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ProveedorMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieNumeroMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieNumeroTranslator; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLVoidedDocuments; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLVoidedDocumentsLine; +import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocuments; +import io.github.project.openubl.xbuilder.content.models.sunat.baja.VoidedDocumentsItem; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +@Mapper(uses = { + SerieNumeroMapper.class, + FirmanteMapper.class, + ProveedorMapper.class +}) +public interface VoidedDocumentsMapper { + + @Mapping(target = "fechaEmision", source = "issueDate") + @Mapping(target = "firmante", source = "signature") + @Mapping(target = "proveedor", source = "accountingSupplierParty") + + @Mapping(target = "numero", source = "documentId", qualifiedBy = {SerieNumeroTranslator.class, Numero3Translator.class}) + @Mapping(target = "fechaEmisionComprobantes", source = "referenceDate") + @Mapping(target = "comprobantes", source = "lines") + VoidedDocuments map(XMLVoidedDocuments xml); + + @Mapping(target = "tipoComprobante", source = "documentTypeCode") + @Mapping(target = "serie", source = "documentSerialID") + @Mapping(target = "numero", source = "documentNumberID") + @Mapping(target = "descripcionSustento", source = "voidReasonDescription") + VoidedDocumentsItem mapLines(XMLVoidedDocumentsLine xml); +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ClienteMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ClienteMapper.java new file mode 100644 index 00000000..a4f15981 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ClienteMapper.java @@ -0,0 +1,21 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLCustomer; +import io.github.project.openubl.xbuilder.content.models.common.Cliente; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +@Mapper(uses = { + ContactoMapper.class, + DireccionMapper.class +}) +public interface ClienteMapper { + + @Mapping(target = "tipoDocumentoIdentidad", source = "partyIdentification.id.schemeID") + @Mapping(target = "numeroDocumentoIdentidad", source = "partyIdentification.id.value") + @Mapping(target = "nombre", source = "partyLegalEntity.registrationName") + @Mapping(target = "direccion", source = "partyLegalEntity.address") + @Mapping(target = "contacto", source = "contact") + Cliente map(XMLCustomer xml); + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ContactoMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ContactoMapper.java new file mode 100644 index 00000000..12ac885c --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ContactoMapper.java @@ -0,0 +1,15 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLContact; +import io.github.project.openubl.xbuilder.content.models.common.Contacto; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +@Mapper +public interface ContactoMapper { + + @Mapping(target = "telefono", source = "telephone") + @Mapping(target = "email", source = "electronicMail") + Contacto map(XMLContact xml); + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/DireccionMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/DireccionMapper.java new file mode 100644 index 00000000..2ca858ff --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/DireccionMapper.java @@ -0,0 +1,21 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLAddress; +import io.github.project.openubl.xbuilder.content.models.common.Direccion; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +@Mapper +public interface DireccionMapper { + + @Mapping(target = "ubigeo", source = "id") + @Mapping(target = "codigoLocal", source = "addressTypeCode") + @Mapping(target = "urbanizacion", source = "citySubdivisionName") + @Mapping(target = "provincia", source = "cityName") + @Mapping(target = "departamento", source = "countrySubEntity") + @Mapping(target = "distrito", source = "district") + @Mapping(target = "codigoPais", source = "country.identificationCode") + @Mapping(target = "direccion", source = "addressLine.line") + Direccion map(XMLAddress xml); + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/FirmanteMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/FirmanteMapper.java new file mode 100644 index 00000000..a8b923d4 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/FirmanteMapper.java @@ -0,0 +1,18 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSignature; +import io.github.project.openubl.xbuilder.content.models.common.Firmante; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +@Mapper(uses = { + ContactoMapper.class, + DireccionMapper.class +}) +public interface FirmanteMapper { + + @Mapping(target = "ruc", source = "id") + @Mapping(target = "razonSocial", source = "signatoryParty.partyName.name") + Firmante map(XMLSignature xml); + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/GuiaMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/GuiaMapper.java new file mode 100644 index 00000000..e45a5cbd --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/GuiaMapper.java @@ -0,0 +1,15 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; +import io.github.project.openubl.xbuilder.content.models.standard.general.Guia; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +@Mapper +public interface GuiaMapper { + + @Mapping(target = "serieNumero", source = "id") + @Mapping(target = "tipoDocumento", source = "documentTypeCode") + Guia mapGuia(XMLSalesDocument.DespatchDocumentReference xml); + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero2Translator.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero2Translator.java new file mode 100644 index 00000000..2fbcb334 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero2Translator.java @@ -0,0 +1,14 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +import org.mapstruct.Qualifier; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Qualifier +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.CLASS) +public @interface Numero2Translator { +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero3Translator.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero3Translator.java new file mode 100644 index 00000000..81bcff1d --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero3Translator.java @@ -0,0 +1,14 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +import org.mapstruct.Qualifier; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Qualifier +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.CLASS) +public @interface Numero3Translator { +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ProveedorMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ProveedorMapper.java new file mode 100644 index 00000000..5cb53442 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ProveedorMapper.java @@ -0,0 +1,28 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplier; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplierSunat; +import io.github.project.openubl.xbuilder.content.models.common.Proveedor; +import org.mapstruct.Mapper; +import org.mapstruct.Mapping; + +@Mapper(uses = { + ContactoMapper.class, + DireccionMapper.class +}) +public interface ProveedorMapper { + + @Mapping(target = "ruc", source = "partyIdentification.id") + @Mapping(target = "nombreComercial", source = "partyName.name") + @Mapping(target = "razonSocial", source = "partyLegalEntity.registrationName") + @Mapping(target = "direccion", source = "partyLegalEntity.address") + @Mapping(target = "contacto", source = "contact") + Proveedor map(XMLSupplier xml); + + @Mapping(target = "ruc", source = "customerAssignedAccountID") + @Mapping(target = "nombreComercial", source = "partyName.name") + @Mapping(target = "razonSocial", source = "party.partyLegalEntity.registrationName") + @Mapping(target = "direccion", source = "party.partyLegalEntity.address") + @Mapping(target = "contacto", source = "contact") + Proveedor map(XMLSupplierSunat xml); +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentHelperMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentHelperMapper.java new file mode 100644 index 00000000..ef816512 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentHelperMapper.java @@ -0,0 +1,178 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +import io.github.project.openubl.xbuilder.content.catalogs.Catalog; +import io.github.project.openubl.xbuilder.content.catalogs.Catalog12; +import io.github.project.openubl.xbuilder.content.catalogs.Catalog12_Anticipo; +import io.github.project.openubl.xbuilder.content.catalogs.Catalog5; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine; +import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoRelacionado; +import io.github.project.openubl.xbuilder.content.models.standard.general.DocumentoVentaDetalle; +import io.github.project.openubl.xbuilder.content.models.standard.general.TotalImpuestos; + +import java.math.BigDecimal; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; +import java.util.stream.Collectors; + +import static io.github.project.openubl.xbuilder.content.jaxb.mappers.utils.MapperUtils.mapPorcentaje; + +public interface SalesDocumentHelperMapper { + + default Map mapLeyendas(List xml) { + return Optional.ofNullable(xml) + .map(o -> o.stream() + .filter(note -> note.getLanguageLocaleId() != null) + .collect(Collectors.toMap(XMLSalesDocument.Note::getLanguageLocaleId, XMLSalesDocument.Note::getValue)) + ) + .orElse(Collections.emptyMap()); + } + + default TotalImpuestos mapTotalImpuestos(XMLSalesDocument.TaxTotal xml) { + if (xml == null) { + return null; + } + + TotalImpuestos.TotalImpuestosBuilder builder = TotalImpuestos.builder() + .total(xml.getTaxAmount()); + + for (XMLSalesDocument.TaxSubtotal taxSubtotal : xml.getTaxSubtotals()) { + Catalog5 catalog5 = Catalog + .valueOfCode(Catalog5.class, taxSubtotal.getTaxCategory().getTaxScheme().getId()) + .orElseThrow(Catalog.invalidCatalogValue); + switch (catalog5) { + case IGV: + builder = builder + .gravadoBaseImponible(taxSubtotal.getTaxableAmount()) + .gravadoImporte(taxSubtotal.getTaxAmount()); + break; + case IMPUESTO_ARROZ_PILADO: + builder = builder + .ivapBaseImponible(taxSubtotal.getTaxableAmount()) + .ivapImporte(taxSubtotal.getTaxAmount()); + break; + case ISC: + builder = builder + .iscBaseImponible(taxSubtotal.getTaxableAmount()) + .iscImporte(taxSubtotal.getTaxAmount()); + break; + case EXPORTACION: + builder = builder + .exportacionBaseImponible(taxSubtotal.getTaxableAmount()) + .exportacionImporte(taxSubtotal.getTaxAmount()); + break; + case GRATUITO: + builder = builder + .gratuitoBaseImponible(taxSubtotal.getTaxableAmount()) + .gratuitoImporte(taxSubtotal.getTaxAmount()); + break; + case EXONERADO: + builder = builder + .exoneradoBaseImponible(taxSubtotal.getTaxableAmount()) + .exoneradoImporte(taxSubtotal.getTaxAmount()); + break; + case INAFECTO: + builder = builder + .inafectoBaseImponible(taxSubtotal.getTaxableAmount()) + .inafectoImporte(taxSubtotal.getTaxAmount()); + break; + case ICBPER: + builder = builder + .icbImporte(taxSubtotal.getTaxAmount()); + break; + case OTROS: + break; + } + } + + return builder.build(); + } + + default List mapDocumentosRelacionados(List xml) { + if (xml == null) { + return Collections.emptyList(); + } + + return xml.stream() + .filter(additionalDocumentReference -> Objects.nonNull(additionalDocumentReference.getDocumentTypeCode())) + .filter(additionalDocumentReference -> { + Optional catalog12 = Catalog + .valueOfCode(Catalog12.class, additionalDocumentReference.getDocumentTypeCode()); + Optional catalog12_anticipo = Catalog + .valueOfCode(Catalog12_Anticipo.class, additionalDocumentReference.getDocumentTypeCode()); + return catalog12.isPresent() && catalog12_anticipo.isEmpty(); + }) + .map(despatchDocumentReference -> DocumentoRelacionado.builder() + .serieNumero(despatchDocumentReference.getId()) + .tipoDocumento(despatchDocumentReference.getDocumentTypeCode()) + .build()) + .collect(Collectors.toList()); + } + + default DocumentoVentaDetalle mapSalesDocumentDetalle(XMLSalesDocumentLine documentLine) { + if (documentLine == null) { + return null; + } + + DocumentoVentaDetalle.DocumentoVentaDetalleBuilder builder = DocumentoVentaDetalle.builder(); + + // Extract taxes + XMLSalesDocumentLine.TaxTotalLine taxTotal = documentLine.getTaxTotal(); + Map> subTotals = taxTotal.getTaxSubtotals().stream() + .collect(Collectors.groupingBy( + taxSubtotalLine -> taxSubtotalLine.getTaxCategory().getTaxScheme().getId(), + Collectors.reducing((o, o2) -> o) // Only one element per type is expected + )); + + // ISC + Optional iscTaxSubtotal = subTotals.getOrDefault(Catalog5.ISC.getCode(), Optional.empty()); + iscTaxSubtotal.ifPresent(taxSubtotalLine -> { + builder.iscBaseImponible(taxSubtotalLine.getTaxableAmount()); + builder.isc(taxSubtotalLine.getTaxAmount()); + builder.tasaIsc(mapPorcentaje(taxSubtotalLine.getTaxCategory().getPercent())); + builder.iscTipo(taxSubtotalLine.getTaxCategory().getTierRange()); + }); + + // IGV + Optional igvTaxSubtotal = taxTotal.getTaxSubtotals().stream() + .filter(line -> { + String code = line.getTaxCategory().getTaxScheme().getId(); + return !Objects.equals(code, Catalog5.ISC.getCode()) && !Objects.equals(code, Catalog5.ICBPER.getCode()); + }) + .findFirst(); + igvTaxSubtotal.ifPresent(taxSubtotalLine -> { + builder.igvBaseImponible(taxSubtotalLine.getTaxableAmount()); + builder.igv(taxSubtotalLine.getTaxAmount()); + builder.tasaIgv(mapPorcentaje(taxSubtotalLine.getTaxCategory().getPercent())); + builder.igvTipo(taxSubtotalLine.getTaxCategory().getTaxExemptionReasonCode()); + }); + + // ICB + Optional icbTaxSubtotal = subTotals.getOrDefault(Catalog5.ICBPER.getCode(), Optional.empty()); + icbTaxSubtotal.ifPresent(taxSubtotalLine -> { + builder.icb(taxSubtotalLine.getTaxAmount()); + builder.tasaIcb(taxSubtotalLine.getTaxCategory().getPerUnitAmount()); + builder.icbAplica(taxSubtotalLine.getTaxAmount() != null && taxSubtotalLine.getTaxAmount().compareTo(BigDecimal.ZERO) > 0); + }); + + BigDecimal precioReferencia = Optional.ofNullable(documentLine.getPricingReference()) + .flatMap(pricingReference -> Optional.ofNullable(pricingReference.getAlternativeConditionPrice())) + .map(XMLSalesDocumentLine.AlternativeConditionPrice::getAlternativeConditionPrice) + .orElse(null); + String precioReferenciaTipo = Optional.ofNullable(documentLine.getPricingReference()) + .flatMap(pricingReference -> Optional.ofNullable(pricingReference.getAlternativeConditionPrice())) + .map(XMLSalesDocumentLine.AlternativeConditionPrice::getPriceTypeCode) + .orElse(null); + + return builder + .descripcion(documentLine.getItem().getDescription()) + .precio(documentLine.getPrice().getPriceAmount()) + .precioReferencia(precioReferencia) + .precioReferenciaTipo(precioReferenciaTipo) + .totalImpuestos(taxTotal.getTaxAmount()) + .build(); + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentMapper.java new file mode 100644 index 00000000..fb9f8927 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentMapper.java @@ -0,0 +1,40 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; +import io.github.project.openubl.xbuilder.content.models.standard.general.Guia; +import io.github.project.openubl.xbuilder.content.models.standard.general.SalesDocument; +import org.mapstruct.MapperConfig; +import org.mapstruct.Mapping; +import org.mapstruct.MappingInheritanceStrategy; + +@MapperConfig( + mappingInheritanceStrategy = MappingInheritanceStrategy.AUTO_INHERIT_FROM_CONFIG, + uses = { + SerieNumeroMapper.class, + FirmanteMapper.class, + ProveedorMapper.class, + ClienteMapper.class, + GuiaMapper.class + } +) +public interface SalesDocumentMapper { + + @Mapping(target = "serie", source = "documentId", qualifiedBy = {SerieNumeroTranslator.class, SerieTranslator.class}) + @Mapping(target = "numero", source = "documentId", qualifiedBy = {SerieNumeroTranslator.class, Numero2Translator.class}) + + @Mapping(target = "moneda", source = "documentCurrencyCode") + @Mapping(target = "fechaEmision", source = "issueDate") + @Mapping(target = "horaEmision", source = "issueTime") + @Mapping(target = "ordenDeCompra", source = "orderReference.id") + + @Mapping(target = "firmante", source = "signature") + @Mapping(target = "proveedor", source = "accountingSupplierParty.party") + @Mapping(target = "cliente", source = "accountingCustomerParty.party") + + @Mapping(target = "leyendas", source = "notes") + @Mapping(target = "guias", source = "despatchDocumentReferences") + @Mapping(target = "totalImpuestos", source = "taxTotal") + @Mapping(target = "documentosRelacionados", source = "additionalDocumentReferences") + SalesDocument map(XMLSalesDocument xml); + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroMapper.java new file mode 100644 index 00000000..90d82581 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroMapper.java @@ -0,0 +1,35 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +@SerieNumeroTranslator +public class SerieNumeroMapper { + + @SerieTranslator + public String toSerie(String serieNumero) { + if (serieNumero == null) { + return null; + } + + String[] split = serieNumero.split("-"); + return split.length >= 1 ? split[0] : null; + } + + @Numero2Translator + public Integer toNumero2(String serieNumero) { + if (serieNumero == null) { + return null; + } + + String[] split = serieNumero.split("-"); + return split.length >= 2 ? Integer.parseInt(split[1]) : null; + } + + @Numero3Translator + public Integer toNumero3(String serieNumero) { + if (serieNumero == null) { + return null; + } + + String[] split = serieNumero.split("-"); + return split.length >= 3 ? Integer.parseInt(split[2]) : null; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroTranslator.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroTranslator.java new file mode 100644 index 00000000..d2db43a8 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroTranslator.java @@ -0,0 +1,14 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +import org.mapstruct.Qualifier; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Qualifier +@Target(ElementType.TYPE) +@Retention(RetentionPolicy.CLASS) +public @interface SerieNumeroTranslator { +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieTranslator.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieTranslator.java new file mode 100644 index 00000000..ada1af3d --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieTranslator.java @@ -0,0 +1,14 @@ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; + +import org.mapstruct.Qualifier; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Qualifier +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.CLASS) +public @interface SerieTranslator { +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/utils/MapperUtils.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/utils/MapperUtils.java new file mode 100644 index 00000000..78fa6651 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/utils/MapperUtils.java @@ -0,0 +1,31 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.mappers.utils; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.Optional; + +public class MapperUtils { + + public static BigDecimal mapPorcentaje(BigDecimal number) { + return Optional.ofNullable(number) + .map(bigDecimal -> bigDecimal.divide(new BigDecimal("100"), 10, RoundingMode.HALF_EVEN)) + .orElse(null); + } + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLAddress.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLAddress.java index fef3160b..2893ab89 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLAddress.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLAddress.java @@ -19,31 +19,56 @@ import lombok.Data; import lombok.NoArgsConstructor; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +@XmlAccessorType(XmlAccessType.NONE) +@XmlType(name = "RegistrationAddress") @Data @NoArgsConstructor public class XMLAddress { - @XmlPath("cbc:ID/text()") + + @XmlElement(name = "ID", namespace = XMLConstants.CBC) private String id; - @XmlPath("cbc:AddressTypeCode/text()") + @XmlElement(name = "AddressTypeCode", namespace = XMLConstants.CBC) private String addressTypeCode; - @XmlPath("cbc:CitySubdivisionName/text()") + @XmlElement(name = "CitySubdivisionName", namespace = XMLConstants.CBC) private String citySubdivisionName; - @XmlPath("cbc:CityName/text()") + @XmlElement(name = "CityName", namespace = XMLConstants.CBC) private String cityName; - @XmlPath("cbc:CountrySubentity/text()") + @XmlElement(name = "CountrySubentity", namespace = XMLConstants.CBC) private String countrySubEntity; - @XmlPath("cbc:District/text()") + @XmlElement(name = "District", namespace = XMLConstants.CBC) private String district; - @XmlPath("cac:AddressLine/cbc:Line/text()") - private String addressLine; + @XmlElement(name = "AddressLine", namespace = XMLConstants.CAC) + private AddressLine addressLine; + + @XmlElement(name = "Country", namespace = XMLConstants.CAC) + private Country country; + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "Address.AddressLine") + @Data + @NoArgsConstructor + public static class AddressLine { + @XmlElement(name = "Line", namespace = XMLConstants.CBC) + private String line; + } - @XmlPath("cac:Country/cbc:IdentificationCode/text()") - private String identificationCode; + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "Address.Country") + @Data + @NoArgsConstructor + public static class Country { + @XmlElement(name = "IdentificationCode", namespace = XMLConstants.CBC) + private String identificationCode; + } } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLConstants.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLConstants.java new file mode 100644 index 00000000..3882d0fb --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLConstants.java @@ -0,0 +1,8 @@ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +public class XMLConstants { + public static final String CBC = "urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2"; + public static final String CAC = "urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2"; + public static final String SAC = "urn:sunat:names:specification:ubl:peru:schema:xsd:SunatAggregateComponents-1"; + public static final String EXT = "urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2"; +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLContact.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLContact.java index 05488030..e08444f4 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLContact.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLContact.java @@ -19,13 +19,20 @@ import lombok.Data; import lombok.NoArgsConstructor; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +@XmlAccessorType(XmlAccessType.NONE) +@XmlType(name = "Contact") @Data @NoArgsConstructor public class XMLContact { - @XmlPath("cbc:Telephone/text()") + + @XmlElement(name = "Telephone", namespace = XMLConstants.CBC) private String telephone; - @XmlPath("cbc:ElectronicMail/text()") + @XmlElement(name = "ElectronicMail", namespace = XMLConstants.CBC) private String electronicMail; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCreditNote.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCreditNote.java new file mode 100644 index 00000000..44dacd64 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCreditNote.java @@ -0,0 +1,40 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlAccessorType(XmlAccessType.NONE) +@XmlRootElement(name = "CreditNote", namespace = "urn:oasis:names:specification:ubl:schema:xsd:CreditNote-2") +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +public class XMLCreditNote extends XMLSalesDocument { + @XmlElement(name = "LegalMonetaryTotal", namespace = XMLConstants.CAC) + private MonetaryTotal monetaryTotal; + + @XmlElement(name = "CreditNoteLine", namespace = XMLConstants.CAC) + private List lines; +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCreditNoteLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCreditNoteLine.java new file mode 100644 index 00000000..62955efc --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCreditNoteLine.java @@ -0,0 +1,52 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import java.math.BigDecimal; + +@XmlType(name = "CreditNoteDocumentLine") +@XmlAccessorType(XmlAccessType.NONE) +@Data +@EqualsAndHashCode(callSuper = true) +@NoArgsConstructor +public class XMLCreditNoteLine extends XMLSalesDocumentLine { + @XmlElement(name = "CreditedQuantity", namespace = XMLConstants.CBC) + private Quantity quantity; + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "CreditNoteDocumentLine.Quantity") + @Data + @NoArgsConstructor + public static class Quantity { + @XmlValue + private BigDecimal value; + + @XmlAttribute(name = "unitCode") + private String unitCode; + } + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCustomer.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCustomer.java index 5d99396e..2c003deb 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCustomer.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLCustomer.java @@ -19,23 +19,58 @@ import lombok.Data; import lombok.NoArgsConstructor; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +@XmlAccessorType(XmlAccessType.NONE) +@XmlType(name = "Customer.Party") @Data @NoArgsConstructor public class XMLCustomer { - @XmlPath("cac:PartyIdentification/cbc:ID/text()") - private String partyIdentification_id; + @XmlElement(name = "PartyIdentification", namespace = XMLConstants.CAC) + private PartyIdentification partyIdentification; - @XmlPath("cac:PartyIdentification/cbc:ID/@schemeID") - private String partyIdentification_id_schemeId; + @XmlElement(name = "PartyLegalEntity", namespace = XMLConstants.CAC) + private PartyLegalEntity partyLegalEntity; - @XmlPath("cac:PartyLegalEntity/cbc:RegistrationName/text()") - private String registrationName; + @XmlElement(name = "Contact", namespace = XMLConstants.CAC) + private XMLContact contact; - @XmlPath("cac:PartyLegalEntity/cac:RegistrationAddress") - private XMLAddress address; + @XmlType(name = "Customer.PartyIdentification") + @XmlAccessorType(XmlAccessType.NONE) + @Data + @NoArgsConstructor + public static class PartyIdentification { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private PartyIdentification_ID id; + } - @XmlPath("cac:Contact") - private XMLContact contact; + @XmlType(name = "Customer.ID") + @XmlAccessorType(XmlAccessType.NONE) + @Data + @NoArgsConstructor + public static class PartyIdentification_ID { + @XmlValue + private String value; + + @XmlAttribute(name = "schemeID") + private String schemeID; + } + + @XmlType(name = "Customer.PartyLegalEntity") + @XmlAccessorType(XmlAccessType.NONE) + @Data + @NoArgsConstructor + public static class PartyLegalEntity { + @XmlElement(name = "RegistrationName", namespace = XMLConstants.CBC) + private String registrationName; + + @XmlElement(name = "RegistrationAddress", namespace = XMLConstants.CAC) + private XMLAddress address; + } } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDebitNote.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDebitNote.java new file mode 100644 index 00000000..ff9fd63f --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDebitNote.java @@ -0,0 +1,40 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; + +@XmlAccessorType(XmlAccessType.NONE) +@XmlRootElement(name = "DebitNote", namespace = "urn:oasis:names:specification:ubl:schema:xsd:DebitNote-2") +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +public class XMLDebitNote extends XMLSalesDocument { + @XmlElement(name = "RequestedMonetaryTotal", namespace = XMLConstants.CAC) + private MonetaryTotal monetaryTotal; + + @XmlElement(name = "DebitNoteLine", namespace = XMLConstants.CAC) + private List lines; +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDebitNoteLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDebitNoteLine.java new file mode 100644 index 00000000..eac67db3 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDebitNoteLine.java @@ -0,0 +1,52 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import java.math.BigDecimal; + +@XmlType(name = "DebitNoteDocumentLine") +@XmlAccessorType(XmlAccessType.NONE) +@Data +@EqualsAndHashCode(callSuper = true) +@NoArgsConstructor +public class XMLDebitNoteLine extends XMLSalesDocumentLine { + @XmlElement(name = "DebitedQuantity", namespace = XMLConstants.CBC) + private Quantity quantity; + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DebitnOTEDocumentLine.Quantity") + @Data + @NoArgsConstructor + public static class Quantity { + @XmlValue + private BigDecimal value; + + @XmlAttribute(name = "unitCode") + private String unitCode; + } + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdvice.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdvice.java index c03316e3..cd23a0a5 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdvice.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdvice.java @@ -16,193 +16,361 @@ */ package io.github.project.openubl.xbuilder.content.jaxb.models; +import io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalDateAdapter; +import io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalTimeAdapter; import lombok.Data; import lombok.NoArgsConstructor; - +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalTime; import java.util.List; +@XmlAccessorType(XmlAccessType.NONE) +@XmlRootElement(name = "DespatchAdvice", namespace = "urn:oasis:names:specification:ubl:schema:xsd:DespatchAdvice-2") @Data @NoArgsConstructor public class XMLDespatchAdvice { - @XmlPath("cbc:ID/text()") + @XmlElement(name = "ID", namespace = XMLConstants.CBC) private String documentId; - @XmlPath("cbc:IssueDate/text()") + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "IssueDate", namespace = XMLConstants.CBC) private LocalDate issueDate; - @XmlPath("cbc:IssueTime/text()") + @XmlJavaTypeAdapter(LocalTimeAdapter.class) + @XmlElement(name = "IssueTime", namespace = XMLConstants.CBC) private LocalTime issueTime; - @XmlPath("cbc:DespatchAdviceTypeCode/text()") + @XmlElement(name = "DespatchAdviceTypeCode", namespace = XMLConstants.CBC) private String despatchAdviceTypeCode; - @XmlPath("cbc:Note/text()") + @XmlElement(name = "Note", namespace = XMLConstants.CBC) private String note; - @XmlPath("cac:OrderReference") + @XmlElement(name = "OrderReference", namespace = XMLConstants.CAC) private OrderReference orderReference; - @XmlPath("cac:AdditionalDocumentReference") + @XmlElement(name = "AdditionalDocumentReference", namespace = XMLConstants.CAC) private AdditionalDocumentReference additionalDocumentReference; - @XmlPath("cac:Signature") + @XmlElement(name = "Signature", namespace = XMLConstants.CAC) private XMLSignature signature; - @XmlPath("cac:DespatchSupplierParty") + @XmlElement(name = "DespatchSupplierParty", namespace = XMLConstants.CAC) private DespatchSupplierParty despatchSupplierParty; - @XmlPath("cac:DeliveryCustomerParty") + @XmlElement(name = "DeliveryCustomerParty", namespace = XMLConstants.CAC) private DeliveryCustomerParty deliveryCustomerParty; - @XmlPath("cac:SellerSupplierParty") + @XmlElement(name = "SellerSupplierParty", namespace = XMLConstants.CAC) private SellerSupplierParty sellerSupplierParty; - @XmlPath("cac:Shipment") + @XmlElement(name = "Shipment", namespace = XMLConstants.CAC) private Shipment shipment; - @XmlPath("cac:DespatchLine") + @XmlElement(name = "DespatchLine", namespace = XMLConstants.CAC) private List lines; + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.OrderReference") @Data @NoArgsConstructor public static class OrderReference { - @XmlPath("cbc:ID/text()") + @XmlElement(name = "ID", namespace = XMLConstants.CBC) private String id; - @XmlPath("cbc:OrderTypeCode/text()") + @XmlElement(name = "OrderTypeCode", namespace = XMLConstants.CBC) private String orderTypeCode; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.AdditionalDocumentReference") @Data @NoArgsConstructor public static class AdditionalDocumentReference { - @XmlPath("cbc:ID/text()") + @XmlElement(name = "ID", namespace = XMLConstants.CBC) private String id; - @XmlPath("cbc:DocumentTypeCode/text()") + @XmlElement(name = "DocumentTypeCode", namespace = XMLConstants.CBC) private String documentTypeCode; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.DespatchSupplierParty") @Data @NoArgsConstructor public static class DespatchSupplierParty { - @XmlPath("cac:Party/cac:PartyIdentification/cbc:ID/text()") - private String customerAssignedAccountID; + @XmlElement(name = "Party", namespace = XMLConstants.CAC) + private Party party; + } - @XmlPath("cac:Party/cac:PartyLegalEntity/cbc:RegistrationName/text()") - private String registrationName; + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.Party") + @Data + @NoArgsConstructor + public static class Party { + @XmlElement(name = "PartyIdentification", namespace = XMLConstants.CAC) + private PartyIdentification partyIdentification; + + @XmlElement(name = "PartyLegalEntity", namespace = XMLConstants.CAC) + private PartyLegalEntity partyLegalEntity; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.PartyIdentification") @Data @NoArgsConstructor - public static class DeliveryCustomerParty { - @XmlPath("cac:Party/cac:PartyIdentification/cbc:ID/text()") - private String partyIdentification_id; + public static class PartyIdentification { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private ID id; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.PartyIdentification.ID") + @Data + @NoArgsConstructor + public static class ID { + @XmlValue + private String value; - @XmlPath("cac:Party/cac:PartyIdentification/cbc:ID/@schemeID") - private String customerAssignedAccountID_schemeId; + @XmlAttribute(name = "schemeID") + private String schemeID; + } - @XmlPath("cac:Party/cac:PartyLegalEntity/cbc:RegistrationName/text()") + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.PartyLegalEntity") + @Data + @NoArgsConstructor + public static class PartyLegalEntity { + @XmlElement(name = "RegistrationName", namespace = XMLConstants.CBC) private String registrationName; } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.DeliveryCustomerParty") + @Data + @NoArgsConstructor + public static class DeliveryCustomerParty { + @XmlElement(name = "Party", namespace = XMLConstants.CAC) + private Party party; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.SellerSupplierParty") @Data @NoArgsConstructor public static class SellerSupplierParty { - @XmlPath("cbc:CustomerAssignedAccountID/text()") + @XmlElement(name = "CustomerAssignedAccountID", namespace = XMLConstants.CBC) private String customerAssignedAccountId; - @XmlPath("cac:Party/cac:PartyLegalEntity/cbc:RegistrationName/text()") - private String registrationName; + @XmlElement(name = "Party", namespace = XMLConstants.CAC) + private Party party; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.Shipment") @Data @NoArgsConstructor public static class Shipment { - @XmlPath("cbc:HandlingCode/text()") + @XmlElement(name = "HandlingCode", namespace = XMLConstants.CBC) private String handlingCode; - @XmlPath("cbc:Information/text()") + @XmlElement(name = "Information", namespace = XMLConstants.CBC) private String information; - @XmlPath("cbc:GrossWeightMeasure/text()") - private BigDecimal grossWeightMeasure; - - @XmlPath("cbc:GrossWeightMeasure/@unitCode") - private String grossWeightMeasure_unitCode; + @XmlElement(name = "GrossWeightMeasure", namespace = XMLConstants.CBC) + private GrossWeightMeasure grossWeightMeasure; - @XmlPath("cbc:TotalTransportHandlingUnitQuantity/text()") + @XmlElement(name = "TotalTransportHandlingUnitQuantity", namespace = XMLConstants.CBC) private Integer totalTransportHandlingUnitQuantity; - @XmlPath("cbc:SplitConsignmentIndicator/text()") + @XmlElement(name = "SplitConsignmentIndicator", namespace = XMLConstants.CBC) private Boolean splitConsignmentIndicator; - @XmlPath("cac:ShipmentStage/cbc:TransportModeCode/text()") + @XmlElement(name = "ShipmentStage", namespace = XMLConstants.CAC) + private ShipmentStage shipmentStage; + + @XmlElement(name = "Delivery", namespace = XMLConstants.CAC) + private Delivery delivery; + + @XmlElement(name = "TransportHandlingUnit", namespace = XMLConstants.CAC) + private TransportHandlingUnit transportHandlingUnit; + + @XmlElement(name = "OriginAddress", namespace = XMLConstants.CAC) + private OriginAddress originAddress; + + @XmlElement(name = "FirstArrivalPortLocation", namespace = XMLConstants.CAC) + private FirstArrivalPortLocation firstArrivalPortLocation; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.GrossWeightMeasure") + @Data + @NoArgsConstructor + public static class GrossWeightMeasure { + @XmlValue + private BigDecimal value; + + @XmlAttribute(name = "unitCode") + private String unitCode; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.ShipmentStage") + @Data + @NoArgsConstructor + public static class ShipmentStage { + @XmlElement(name = "TransportModeCode", namespace = XMLConstants.CBC) private String transportModeCode; - @XmlPath("cac:ShipmentStage/cac:TransitPeriod/cbc:StartDate/text()") - private LocalDate startDate; + @XmlElement(name = "TransitPeriod", namespace = XMLConstants.CAC) + private TransitPeriod transitPeriod; - @XmlPath("cac:ShipmentStage/cac:CarrierParty") + @XmlElement(name = "CarrierParty", namespace = XMLConstants.CAC) private CarrierParty carrierParty; - @XmlPath("cac:ShipmentStage/cac:TransportMeans") + @XmlElement(name = "TransportMeans", namespace = XMLConstants.CAC) private TransportMeans transportMeans; - @XmlPath("cac:ShipmentStage/cac:DriverPerson") + @XmlElement(name = "DriverPerson", namespace = XMLConstants.CAC) private DriverPerson driverPerson; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.TransitPeriod") + @Data + @NoArgsConstructor + public static class TransitPeriod { + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "StartDate", namespace = XMLConstants.CBC) + private LocalDate startDate; + } - @XmlPath("cac:Delivery/cac:DeliveryAddress/cbc:ID/text()") - private String deliveryAddress_id; + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.CarrierParty") + @Data + @NoArgsConstructor + public static class CarrierParty { + @XmlElement(name = "PartyIdentification", namespace = XMLConstants.CAC) + private PartyIdentification partyIdentification; - @XmlPath("cac:Delivery/cac:DeliveryAddress/cac:AddressLine/cbc:Line/text()") - private String deliveryAddress_line; + @XmlElement(name = "PartyName", namespace = XMLConstants.CAC) + private PartyName partyName; + } - @XmlPath("cac:TransportHandlingUnit/cac:TransportEquipment/cbc:ID/text()") - private String transportEquipment_id; + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.PartyName") + @Data + @NoArgsConstructor + public static class PartyName { + @XmlElement(name = "Name", namespace = XMLConstants.CBC) + private String name; + } - @XmlPath("cac:OriginAddress/cbc:ID/text()") - private String originAddress_id; + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.TransportMeans") + @Data + @NoArgsConstructor + public static class TransportMeans { + @XmlElement(name = "RoadTransport", namespace = XMLConstants.CAC) + private RoadTransport roadTransport; + } - @XmlPath("cac:OriginAddress/cbc:StreetName/text()") - private String originAddress_streetName; + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.RoadTransport") + @Data + @NoArgsConstructor + public static class RoadTransport { + @XmlElement(name = "LicensePlateID", namespace = XMLConstants.CBC) + private String licensePlateID; + } - @XmlPath("cac:FirstArrivalPortLocation/cbc:ID/text()") - private String firstArrivalPortLocation_id; + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.DriverPerson") + @Data + @NoArgsConstructor + public static class DriverPerson { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private ID id; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.Delivery") @Data @NoArgsConstructor - public static class CarrierParty { - @XmlPath("cac:PartyIdentification/cbc:ID/text()") - private String partyIdentification_id; + public static class Delivery { + @XmlElement(name = "DeliveryAddress", namespace = XMLConstants.CAC) + private DeliveryAddress deliveryAddress; + } - @XmlPath("cac:PartyIdentification/cbc:ID/@schemeID") - private String partyIdentification_schemeId; + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.DeliveryAddress") + @Data + @NoArgsConstructor + public static class DeliveryAddress { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String id; - @XmlPath("cac:PartyName/cbc:Name/text()") - private String partyName; + @XmlElement(name = "AddressLine", namespace = XMLConstants.CAC) + private AddressLine addressLine; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.AddressLine") @Data @NoArgsConstructor - public static class TransportMeans { - @XmlPath("cac:RoadTransport/cbc:LicensePlateID/text()") - private String licensePlateId; + public static class AddressLine { + @XmlElement(name = "Line", namespace = XMLConstants.CBC) + private String line; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.TransportHandlingUnit") @Data @NoArgsConstructor - public static class DriverPerson { - @XmlPath("cbc:ID/text()") + public static class TransportHandlingUnit { + @XmlElement(name = "TransportEquipment", namespace = XMLConstants.CAC) + private TransportEquipment transportEquipment; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.TransportEquipment") + @Data + @NoArgsConstructor + public static class TransportEquipment { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String id; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.OriginAddress") + @Data + @NoArgsConstructor + public static class OriginAddress { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) private String id; - @XmlPath("cbc:ID/@schemeID") - private String id_schemeId; + @XmlElement(name = "StreetName", namespace = XMLConstants.CBC) + private String streetName; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdvice.FirstArrivalPortLocation") + @Data + @NoArgsConstructor + public static class FirstArrivalPortLocation { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String id; } } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdviceLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdviceLine.java index 493219ad..277caefc 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdviceLine.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLDespatchAdviceLine.java @@ -19,26 +19,67 @@ import lombok.Data; import lombok.NoArgsConstructor; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; -import java.math.BigDecimal; - +@XmlType(name = "DespatchAdviceLine") +@XmlAccessorType(XmlAccessType.NONE) @Data @NoArgsConstructor public class XMLDespatchAdviceLine { - @XmlPath("cbc:DeliveredQuantity/text()") - private BigDecimal deliveredQuantity; + @XmlElement(name = "DeliveredQuantity", namespace = XMLConstants.CBC) + private DeliveredQuantity deliveredQuantity; + + @XmlElement(name = "Item", namespace = XMLConstants.CAC) + private Item item; + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdviceLine.DeliveredQuantity") + @Data + @NoArgsConstructor + public static class DeliveredQuantity { + @XmlValue + private String value; + + @XmlAttribute(name = "unitCode") + private String unitCode; + } - @XmlPath("cbc:DeliveredQuantity/@unitCode") - private String deliveredQuantity_unitCode; + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdviceLine.Item") + @Data + @NoArgsConstructor + public static class Item { + @XmlElement(name = "Name", namespace = XMLConstants.CBC) + private String name; - @XmlPath("cac:Item/cbc:Name/text()") - private String itemName; + @XmlElement(name = "SellersItemIdentification", namespace = XMLConstants.CAC) + private SellersItemIdentification sellersItemIdentification; - @XmlPath("cac:Item/cac:SellersItemIdentification/cbc:ID/text()") - private String sellersItemIdentification_id; + @XmlElement(name = "CommodityClassification", namespace = XMLConstants.CAC) + private CommodityClassification commodityClassification; + } - @XmlPath("cac:Item/cac:CommodityClassification/cbc:ItemClassificationCode/text()") - private String itemClassificationCode; + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdviceLine.SellersItemIdentification") + @Data + @NoArgsConstructor + public static class SellersItemIdentification { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String id; + } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "DespatchAdviceLine.CommodityClassification") + @Data + @NoArgsConstructor + public static class CommodityClassification { + @XmlElement(name = "ItemClassificationCode", namespace = XMLConstants.CBC) + private String itemClassificationCode; + } } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionInformation.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLInvoice.java similarity index 54% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionInformation.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLInvoice.java index 9d738c24..577f929b 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionInformation.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLInvoice.java @@ -17,30 +17,24 @@ package io.github.project.openubl.xbuilder.content.jaxb.models; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import java.util.List; -import java.math.BigDecimal; -import java.time.LocalDate; - +@XmlAccessorType(XmlAccessType.NONE) +@XmlRootElement(name = "Invoice", namespace = "urn:oasis:names:specification:ubl:schema:xsd:Invoice-2") +@EqualsAndHashCode(callSuper = true) @Data @NoArgsConstructor -public class XMLPercepcionRetencionInformation { - - private BigDecimal sunatAmount; - private LocalDate sunatDate; - private BigDecimal sunatNetTotal; - - @XmlPath("cac:ExchangeRate") - private ExchangeRate exchangeRate; - - @Data - @NoArgsConstructor - public static class ExchangeRate { - @XmlPath("cbc:CalculationRate/text()") - private BigDecimal canculationRate; +public class XMLInvoice extends XMLSalesDocument { + @XmlElement(name = "LegalMonetaryTotal", namespace = XMLConstants.CAC) + private MonetaryTotal monetaryTotal; - @XmlPath("cbc:Date/text()") - private LocalDate date; - } + @XmlElement(name = "InvoiceLine", namespace = XMLConstants.CAC) + private List lines; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLInvoiceLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLInvoiceLine.java new file mode 100644 index 00000000..afda7e4a --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLInvoiceLine.java @@ -0,0 +1,52 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import java.math.BigDecimal; + +@XmlType(name = "InvoiceDocumentLine") +@XmlAccessorType(XmlAccessType.NONE) +@Data +@EqualsAndHashCode(callSuper = true) +@NoArgsConstructor +public class XMLInvoiceLine extends XMLSalesDocumentLine { + @XmlElement(name = "InvoicedQuantity", namespace = XMLConstants.CBC) + private Quantity quantity; + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "InvoiceDocumentLine.Quantity") + @Data + @NoArgsConstructor + public static class Quantity { + @XmlValue + private BigDecimal value; + + @XmlAttribute(name = "unitCode") + private String unitCode; + } + +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcion.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcion.java new file mode 100644 index 00000000..2952a4de --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcion.java @@ -0,0 +1,47 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; +import java.math.BigDecimal; + +@XmlAccessorType(XmlAccessType.NONE) +@XmlRootElement(name = "Perception", namespace = "urn:sunat:names:specification:ubl:peru:schema:xsd:Perception-1") +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +public class XMLPercepcion extends XMLPercepcionRetencionBase { + + @XmlElement(name = "SUNATPerceptionSystemCode", namespace = XMLConstants.SAC) + private String sunatSystemCode; + + @XmlElement(name = "SUNATPerceptionPercent", namespace = XMLConstants.SAC) + private BigDecimal sunatPercent; + + @XmlElement(name = "SUNATTotalCashed", namespace = XMLConstants.SAC) + private BigDecimal sunatTotal; + + @XmlElement(name = "SUNATPerceptionDocumentReference", namespace = XMLConstants.SAC) + private XMLPercepcionSunatDocumentReference sunatDocumentReference; +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionBase.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionBase.java new file mode 100644 index 00000000..ea41bc2e --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionBase.java @@ -0,0 +1,72 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalDateAdapter; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import java.math.BigDecimal; +import java.time.LocalDate; + +@XmlType(name = "PerceptionRetentionBase") +@XmlAccessorType(XmlAccessType.NONE) +@Data +@NoArgsConstructor +public abstract class XMLPercepcionRetencionBase { + + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String documentId; + + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "IssueDate", namespace = XMLConstants.CBC) + private LocalDate issueDate; + + @XmlElement(name = "Note", namespace = XMLConstants.CBC) + private String note; + + @XmlElement(name = "TotalInvoiceAmount", namespace = XMLConstants.CBC) + private TotalInvoiceAmount totalInvoiceAmount; + + @XmlElement(name = "Signature", namespace = XMLConstants.CAC) + private XMLSignature signature; + + @XmlElement(name = "AgentParty", namespace = XMLConstants.CAC) + private XMLSupplier accountingSupplierParty; + + @XmlElement(name = "ReceiverParty", namespace = XMLConstants.CAC) + private XMLCustomer accountingCustomerParty; + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "PerceptionRetentionBase.TotalInvoiceAmount") + @Data + @NoArgsConstructor + public static class TotalInvoiceAmount { + @XmlValue + private BigDecimal value; + + @XmlAttribute(name = "currencyID") + private String currencyID; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReference.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReference.java deleted file mode 100644 index 0a055bcc..00000000 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReference.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License - 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.github.project.openubl.xbuilder.content.jaxb.models; - -import lombok.Data; -import lombok.NoArgsConstructor; - - -import java.math.BigDecimal; -import java.time.LocalDate; - -@Data -@NoArgsConstructor -public class XMLPercepcionRetencionSunatDocumentReference { - - @XmlPath("cbc:ID/text()") - private String id; - - @XmlPath("cbc:ID/@schemeID") - private String id_schemeId; - - @XmlPath("cbc:IssueDate/text()") - private LocalDate issueDate; - - @XmlPath("cbc:TotalInvoiceAmount/text()") - private BigDecimal totalInvoiceAmount; - - @XmlPath("cbc:TotalInvoiceAmount/@currencyID") - private String totalInvoiceAmount_currencyId; - - @XmlPath("cac:Payment/cbc:ID/text()") - private Integer payment_id; - - @XmlPath("cac:Payment/cbc:PaidAmount/text()") - private BigDecimal payment_paidAmount; - - @XmlPath("cac:Payment/cbc:PaidDate/text()") - private LocalDate payment_paidDate; - - private XMLPercepcionRetencionInformation sunatInformation; -} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReferenceBase.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReferenceBase.java new file mode 100644 index 00000000..0b17dfd1 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencionSunatDocumentReferenceBase.java @@ -0,0 +1,91 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalDateAdapter; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import java.math.BigDecimal; +import java.time.LocalDate; + +@XmlAccessorType(XmlAccessType.NONE) +@XmlType(name = "XMLPercepcionRetencionSunatDocumentReferenceBase") +@Data +@NoArgsConstructor +public abstract class XMLPercepcionRetencionSunatDocumentReferenceBase { + + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private ID id; + + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "IssueDate", namespace = XMLConstants.CBC) + private LocalDate issueDate; + + @XmlElement(name = "TotalInvoiceAmount", namespace = XMLConstants.CBC) + private TotalInvoiceAmount totalInvoiceAmount; + + @XmlElement(name = "Payment", namespace = XMLConstants.CAC) + private Payment payment; + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "XMLPercepcionRetencionSunatDocumentReferenceBase.ID") + @Data + @NoArgsConstructor + public static class ID { + @XmlValue + private String value; + + @XmlAttribute(name = "schemeID") + private String schemeID; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "XMLPercepcionRetencionSunatDocumentReferenceBase.TotalInvoiceAmount") + @Data + @NoArgsConstructor + public static class TotalInvoiceAmount { + @XmlValue + private BigDecimal value; + + @XmlAttribute(name = "currencyID") + private String currencyID; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "XMLPercepcionRetencionSunatDocumentReferenceBase.Payment") + @Data + @NoArgsConstructor + public static class Payment { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private Integer id; + + @XmlElement(name = "PaidAmount", namespace = XMLConstants.CBC) + private BigDecimal paidAmount; + + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "PaidDate", namespace = XMLConstants.CBC) + private LocalDate paidDate; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionSunatDocumentReference.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionSunatDocumentReference.java new file mode 100644 index 00000000..0c8ddb95 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionSunatDocumentReference.java @@ -0,0 +1,57 @@ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalDateAdapter; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import java.math.BigDecimal; +import java.time.LocalDate; + +@XmlAccessorType(XmlAccessType.NONE) +@XmlType(name = "XMLPercepcionSunatDocumentReference") +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +public class XMLPercepcionSunatDocumentReference extends XMLPercepcionRetencionSunatDocumentReferenceBase { + + @XmlElement(name = "SUNATPerceptionInformation", namespace = XMLConstants.SAC) + private XMLPercepcionInformation sunatInformation; + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "XMLPercepcionSunatDocumentReference.XMLPercepcionInformation") + @Data + @NoArgsConstructor + public static class XMLPercepcionInformation { + @XmlElement(name = "SUNATPerceptionAmount", namespace = XMLConstants.SAC) + private BigDecimal sunatAmount; + + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "SUNATPerceptionDate", namespace = XMLConstants.SAC) + private LocalDate sunatDate; + + @XmlElement(name = "SUNATNetTotalCashed", namespace = XMLConstants.SAC) + private BigDecimal sunatNetTotal; + + @XmlElement(name = "ExchangeRate", namespace = XMLConstants.CAC) + private ExchangeRate exchangeRate; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "XMLPercepcionSunatDocumentReference.ExchangeRate") + @Data + @NoArgsConstructor + public static class ExchangeRate { + @XmlElement(name = "CalculationRate", namespace = XMLConstants.CBC) + private BigDecimal calculationRate; + + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "Date", namespace = XMLConstants.CBC) + private LocalDate date; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetention.java similarity index 52% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetention.java index f3d445eb..4628cc0b 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionRetencion.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetention.java @@ -17,45 +17,30 @@ package io.github.project.openubl.xbuilder.content.jaxb.models; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; - +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; import java.math.BigDecimal; -import java.time.LocalDate; +@XmlAccessorType(XmlAccessType.NONE) +@XmlRootElement(name = "Retention", namespace = "urn:sunat:names:specification:ubl:peru:schema:xsd:Retention-1") +@EqualsAndHashCode(callSuper = true) @Data @NoArgsConstructor -public class XMLPercepcionRetencion { - - @XmlPath("cbc:ID/text()") - private String documentId; - - @XmlPath("cbc:IssueDate/text()") - private LocalDate issueDate; - +public class XMLRetention extends XMLPercepcionRetencionBase { + @XmlElement(name = "SUNATRetentionSystemCode", namespace = XMLConstants.SAC) private String sunatSystemCode; - private BigDecimal sunatPercent; - - @XmlPath("cbc:Note/text()") - private String note; - @XmlPath("cbc:TotalInvoiceAmount/text()") - private BigDecimal totalInvoiceAmount; - - @XmlPath("cbc:TotalInvoiceAmount/@currencyID") - private String totalInvoiceAmount_currencyId; + @XmlElement(name = "SUNATRetentionPercent", namespace = XMLConstants.SAC) + private BigDecimal sunatPercent; + @XmlElement(name = "SUNATTotalPaid", namespace = XMLConstants.SAC) private BigDecimal sunatTotal; - @XmlPath("cac:Signature") - private XMLSignature signature; - - @XmlPath("cac:AgentParty") - private XMLSupplier accountingSupplierParty; - - @XmlPath("cac:ReceiverParty") - private XMLCustomer accountingCustomerParty; - - private XMLPercepcionRetencionSunatDocumentReference sunatDocumentReference; - + @XmlElement(name = "SUNATRetentionDocumentReference", namespace = XMLConstants.SAC) + private XMLRetentionSunatDocumentReference sunatDocumentReference; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetentionSunatDocumentReference.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetentionSunatDocumentReference.java new file mode 100644 index 00000000..951349c3 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetentionSunatDocumentReference.java @@ -0,0 +1,57 @@ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalDateAdapter; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; +import java.math.BigDecimal; +import java.time.LocalDate; + +@XmlAccessorType(XmlAccessType.NONE) +@XmlType(name = "XMLRetentionSunatDocumentReference") +@EqualsAndHashCode(callSuper = true) +@Data +@NoArgsConstructor +public class XMLRetentionSunatDocumentReference extends XMLPercepcionRetencionSunatDocumentReferenceBase { + + @XmlElement(name = "SUNATRetentionInformation", namespace = XMLConstants.SAC) + private XMLRetencionInformation sunatInformation; + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "XMLRetentionSunatDocumentReference.XMLRetencionInformation") + @Data + @NoArgsConstructor + public static class XMLRetencionInformation { + @XmlElement(name = "SUNATRetentionAmount", namespace = XMLConstants.SAC) + private BigDecimal sunatAmount; + + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "SUNATRetentionDate", namespace = XMLConstants.SAC) + private LocalDate sunatDate; + + @XmlElement(name = "SUNATNetTotalPaid", namespace = XMLConstants.SAC) + private BigDecimal sunatNetTotal; + + @XmlElement(name = "ExchangeRate", namespace = XMLConstants.CAC) + private ExchangeRate exchangeRate; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "XMLRetentionSunatDocumentReference.ExchangeRate") + @Data + @NoArgsConstructor + public static class ExchangeRate { + @XmlElement(name = "CalculationRate", namespace = XMLConstants.CBC) + private BigDecimal calculationRate; + + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "Date", namespace = XMLConstants.CBC) + private LocalDate date; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java index 9b1a5db9..67a998a1 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocument.java @@ -16,229 +16,345 @@ */ package io.github.project.openubl.xbuilder.content.jaxb.models; +import io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalDateAdapter; +import io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalTimeAdapter; import lombok.Data; import lombok.NoArgsConstructor; - +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import java.math.BigDecimal; import java.time.LocalDate; import java.time.LocalTime; import java.util.List; +@XmlAccessorType(XmlAccessType.NONE) @Data @NoArgsConstructor -public class XMLSalesDocument { +public abstract class XMLSalesDocument { - @XmlPath("cbc:ID/text()") + @XmlElement(name = "ID", namespace = XMLConstants.CBC) private String documentId; - @XmlPath("cbc:IssueDate/text()") + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "IssueDate", namespace = XMLConstants.CBC) private LocalDate issueDate; - @XmlPath("cbc:IssueTime/text()") + @XmlJavaTypeAdapter(LocalTimeAdapter.class) + @XmlElement(name = "IssueTime", namespace = XMLConstants.CBC) private LocalTime issueTime; - @XmlPath("cbc:DueDate/text()") + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "DueDate", namespace = XMLConstants.CBC) private LocalDate dueDate; - @XmlPath("cbc:InvoiceTypeCode/text()") - private String invoiceTypeCode; - - @XmlPath("cbc:InvoiceTypeCode/@listID") - private String invoiceTypeCode_listID; + @XmlElement(name = "InvoiceTypeCode", namespace = XMLConstants.CBC) + private InvoiceTypeCode invoiceTypeCode; - @XmlPath("cbc:Note") + @XmlElement(name = "Note", namespace = XMLConstants.CBC) private List notes; - @XmlPath("cbc:DocumentCurrencyCode/text()") + @XmlElement(name = "DocumentCurrencyCode", namespace = XMLConstants.CBC) private String documentCurrencyCode; - @XmlPath("cac:OrderReference/cbc:ID/text()") - private String orderReferenceId; + @XmlElement(name = "OrderReference", namespace = XMLConstants.CAC) + private OrderReference orderReference; - @XmlPath("cac:DespatchDocumentReference") + @XmlElement(name = "DespatchDocumentReference", namespace = XMLConstants.CAC) private List despatchDocumentReferences; - @XmlPath("cac:AdditionalDocumentReference") + @XmlElement(name = "AdditionalDocumentReference", namespace = XMLConstants.CAC) private List additionalDocumentReferences; - @XmlPath("cac:Signature") + @XmlElement(name = "Signature", namespace = XMLConstants.CAC) private XMLSignature signature; - @XmlPath("cac:AccountingSupplierParty/cac:Party") - private XMLSupplier accountingSupplierParty; + @XmlElement(name = "AccountingSupplierParty", namespace = XMLConstants.CAC) + private AccountingSupplierParty accountingSupplierParty; - @XmlPath("cac:AccountingCustomerParty/cac:Party") - private XMLCustomer accountingCustomerParty; + @XmlElement(name = "AccountingCustomerParty", namespace = XMLConstants.CAC) + private AccountingCustomerParty accountingCustomerParty; - @XmlPath("cac:Delivery/cac:DeliveryLocation/cac:Address") - private XMLAddress deliveryLocation; + @XmlElement(name = "Delivery", namespace = XMLConstants.CAC) + private Delivery delivery; - @XmlPath("cac:PaymentMeans") + @XmlElement(name = "PaymentMeans", namespace = XMLConstants.CAC) private PaymentMeans paymentMeans; - @XmlPath("cac:PaymentTerms") + @XmlElement(name = "PaymentTerms", namespace = XMLConstants.CAC) private List paymentTerms; - @XmlPath("cac:PrepaidPayment") + @XmlElement(name = "PrepaidPayment", namespace = XMLConstants.CAC) private List prepaidPayments; - @XmlPath("cac:AllowanceCharge") + @XmlElement(name = "AllowanceCharge", namespace = XMLConstants.CAC) private List allowanceCharges; - @XmlPath("cac:TaxTotal") + @XmlElement(name = "TaxTotal", namespace = XMLConstants.CAC) private TaxTotal taxTotal; - // When Invoice or CreditNote then @XmlPath("cac:LegalMonetaryTotal") - // When DebitNote @XmlPath("cac:RequestedMonetaryTotal") - // Therefore defining it in bindings/*.xml - private MonetaryTotal monetaryTotal; - - private List lines; - // Note - @XmlPath("cac:DiscrepancyResponse/cbc:ReferenceID/text()") - String discrepancyResponse_referenceId; + @XmlElement(name = "DiscrepancyResponse", namespace = XMLConstants.CAC) + private DiscrepancyResponse discrepancyResponse; - @XmlPath("cac:DiscrepancyResponse/cbc:ResponseCode/text()") - String discrepancyResponse_responseCode; + // + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.InvoiceTypeCode") + @Data + @NoArgsConstructor + public static class InvoiceTypeCode { + @XmlValue + private String value; - @XmlPath("cac:DiscrepancyResponse/cbc:Description/text()") - String discrepancyResponse_description; + @XmlAttribute(name = "listID") + private String listID; + } - // + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.Note") @Data @NoArgsConstructor public static class Note { - @XmlPath("@languageLocaleID") + @XmlValue + private String value; + + @XmlAttribute(name = "languageLocaleID") private String languageLocaleId; + } - @XmlPath("text()") - private String value; + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.OrderReference") + @Data + @NoArgsConstructor + public static class OrderReference { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String id; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.DespatchDocumentReference") @Data @NoArgsConstructor public static class DespatchDocumentReference { - @XmlPath("cbc:ID/text()") + @XmlElement(name = "ID", namespace = XMLConstants.CBC) private String id; - @XmlPath("cbc:DocumentTypeCode/text()") + @XmlElement(name = "DocumentTypeCode", namespace = XMLConstants.CBC) private String documentTypeCode; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.AdditionalDocumentReference") @Data @NoArgsConstructor public static class AdditionalDocumentReference { - @XmlPath("cbc:ID/text()") + @XmlElement(name = "ID", namespace = XMLConstants.CBC) private String id; - @XmlPath("cbc:DocumentTypeCode/text()") + @XmlElement(name = "DocumentTypeCode", namespace = XMLConstants.CBC) private String documentTypeCode; - @XmlPath("cbc:DocumentStatusCode/text()") + @XmlElement(name = "DocumentStatusCode", namespace = XMLConstants.CBC) private String documentStatusCode; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.AccountingSupplierParty") + @Data + @NoArgsConstructor + public static class AccountingSupplierParty { + @XmlElement(name = "Party", namespace = XMLConstants.CAC) + private XMLSupplier party; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.AccountingCustomerParty") + @Data + @NoArgsConstructor + public static class AccountingCustomerParty { + @XmlElement(name = "Party", namespace = XMLConstants.CAC) + private XMLCustomer party; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.Delivery") + @Data + @NoArgsConstructor + public static class Delivery { + @XmlElement(name = "DeliveryLocation", namespace = XMLConstants.CAC) + private DeliveryLocation deliveryLocation; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.DeliveryLocation") + @Data + @NoArgsConstructor + public static class DeliveryLocation { + @XmlElement(name = "Address", namespace = XMLConstants.CAC) + private XMLAddress address; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.PaymentMeans") @Data @NoArgsConstructor public static class PaymentMeans { - @XmlPath("cbc:PaymentMeansCode/text()") + @XmlElement(name = "PaymentMeansCode", namespace = XMLConstants.CBC) private String paymentMeansCode; - @XmlPath("cac:PayeeFinancialAccount/cbc:ID/text()") - private String payeeFinancialAccount_id; + @XmlElement(name = "PayeeFinancialAccount", namespace = XMLConstants.CAC) + private PayeeFinancialAccount payeeFinancialAccount; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.PayeeFinancialAccount") + @Data + @NoArgsConstructor + public static class PayeeFinancialAccount { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String id; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.PaymentTerms") @Data @NoArgsConstructor public static class PaymentTerms { - @XmlPath("cbc:ID/text()") + @XmlElement(name = "ID", namespace = XMLConstants.CBC) private String id; - @XmlPath("cbc:PaymentMeansID/text()") + @XmlElement(name = "PaymentMeansID", namespace = XMLConstants.CBC) private String paymentMeansID; - @XmlPath("cbc:Amount/text()") + @XmlElement(name = "Amount", namespace = XMLConstants.CBC) private BigDecimal amount; - @XmlPath("cbc:PaymentDueDate/text()") + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "PaymentDueDate", namespace = XMLConstants.CBC) private LocalDate paymentDueDate; - @XmlPath("cbc:PaymentPercent/text()") + @XmlElement(name = "PaymentPercent", namespace = XMLConstants.CBC) private BigDecimal paymentPercent; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.PrepaidPayment") @Data @NoArgsConstructor public static class PrepaidPayment { - @XmlPath("cbc:ID/text()") + @XmlElement(name = "ID", namespace = XMLConstants.CBC) private String id; - @XmlPath("cbc:PaidAmount/text()") + @XmlElement(name = "PaidAmount", namespace = XMLConstants.CBC) private BigDecimal paidAmount; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.AllowanceCharge") @Data @NoArgsConstructor public static class AllowanceCharge { - @XmlPath("cbc:ChargeIndicator/text()") + @XmlElement(name = "ChargeIndicator", namespace = XMLConstants.CBC) private Boolean chargeIndicator; - @XmlPath("cbc:AllowanceChargeReasonCode/text()") + @XmlElement(name = "AllowanceChargeReasonCode", namespace = XMLConstants.CBC) private String allowanceChargeReasonCode; - @XmlPath("cbc:MultiplierFactorNumeric/text()") + @XmlElement(name = "MultiplierFactorNumeric", namespace = XMLConstants.CBC) private BigDecimal multiplierFactorNumeric; - @XmlPath("cbc:Amount/text()") + @XmlElement(name = "Amount", namespace = XMLConstants.CBC) private BigDecimal amount; - @XmlPath("cbc:BaseAmount/text()") + @XmlElement(name = "BaseAmount", namespace = XMLConstants.CBC) private BigDecimal baseAmount; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.TaxTotal") @Data @NoArgsConstructor public static class TaxTotal { - @XmlPath("cbc:TaxAmount/text()") + @XmlElement(name = "TaxAmount", namespace = XMLConstants.CBC) BigDecimal taxAmount; - @XmlPath("cac:TaxSubtotal") + @XmlElement(name = "TaxSubtotal", namespace = XMLConstants.CAC) List taxSubtotals; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.TaxSubtotal") @Data @NoArgsConstructor public static class TaxSubtotal { - @XmlPath("cbc:TaxableAmount/text()") + @XmlElement(name = "TaxableAmount", namespace = XMLConstants.CBC) private BigDecimal taxableAmount; - @XmlPath("cbc:TaxAmount/text()") + @XmlElement(name = "TaxAmount", namespace = XMLConstants.CBC) private BigDecimal taxAmount; - @XmlPath("cac:TaxCategory/cac:TaxScheme/cbc:ID/text()") - private String code; + @XmlElement(name = "TaxCategory", namespace = XMLConstants.CAC) + private TaxCategory taxCategory; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.TaxCategory") + @Data + @NoArgsConstructor + public static class TaxCategory { + @XmlElement(name = "TaxScheme", namespace = XMLConstants.CAC) + private TaxScheme taxScheme; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.TaxScheme") + @Data + @NoArgsConstructor + public static class TaxScheme { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String id; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.MonetaryTotal") @Data @NoArgsConstructor public static class MonetaryTotal { - @XmlPath("cbc:LineExtensionAmount/text()") + @XmlElement(name = "LineExtensionAmount", namespace = XMLConstants.CBC) private BigDecimal lineExtensionAmount; - @XmlPath("cbc:TaxInclusiveAmount/text()") + @XmlElement(name = "TaxInclusiveAmount", namespace = XMLConstants.CBC) private BigDecimal taxInclusiveAmount; - @XmlPath("cbc:AllowanceTotalAmount/text()") + @XmlElement(name = "AllowanceTotalAmount", namespace = XMLConstants.CBC) private BigDecimal allowanceTotalAmount; - @XmlPath("cbc:PrepaidAmount/text()") + @XmlElement(name = "PrepaidAmount", namespace = XMLConstants.CBC) private BigDecimal prepaidAmount; - @XmlPath("cbc:PayableAmount/text()") + @XmlElement(name = "PayableAmount", namespace = XMLConstants.CBC) private BigDecimal payableAmount; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocument.DiscrepancyResponse") + @Data + @NoArgsConstructor + public static class DiscrepancyResponse { + @XmlElement(name = "ReferenceID", namespace = XMLConstants.CBC) + private String referenceID; + + @XmlElement(name = "ResponseCode", namespace = XMLConstants.CBC) + private String responseCode; + + @XmlElement(name = "Description", namespace = XMLConstants.CBC) + private String description; + } } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java index 1ce72d07..a0930875 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSalesDocumentLine.java @@ -19,66 +19,127 @@ import lombok.Data; import lombok.NoArgsConstructor; - +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; import java.math.BigDecimal; import java.util.List; +@XmlType(name = "SalesDocumentLine") +@XmlAccessorType(XmlAccessType.NONE) @Data @NoArgsConstructor public class XMLSalesDocumentLine { - private BigDecimal quantity; - private String quantity_unitCode; - @XmlPath("cbc:LineExtensionAmount/text()") + @XmlElement(name = "LineExtensionAmount", namespace = XMLConstants.CBC) private BigDecimal lineExtensionAmount; - @XmlPath("cac:PricingReference/cac:AlternativeConditionPrice/cbc:PriceAmount/text()") - private BigDecimal alternativeConditionPrice_priceAmount; - - @XmlPath("cac:PricingReference/cac:AlternativeConditionPrice/cbc:PriceTypeCode/text()") - private String alternativeConditionPrice_priceTypeCode; + @XmlElement(name = "PricingReference", namespace = XMLConstants.CAC) + private PricingReference pricingReference; - @XmlPath("cac:TaxTotal") + @XmlElement(name = "TaxTotal", namespace = XMLConstants.CAC) private TaxTotalLine taxTotal; - @XmlPath("cac:Item/cbc:Description/text()") - private String description; + @XmlElement(name = "Item", namespace = XMLConstants.CAC) + private Item item; + + @XmlElement(name = "Price", namespace = XMLConstants.CAC) + private Price price; + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocumentLine.PricingReference") + @Data + @NoArgsConstructor + public static class PricingReference { + @XmlElement(name = "AlternativeConditionPrice", namespace = XMLConstants.CAC) + private AlternativeConditionPrice alternativeConditionPrice; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocumentLine.AlternativeConditionPrice") + @Data + @NoArgsConstructor + public static class AlternativeConditionPrice { + @XmlElement(name = "PriceAmount", namespace = XMLConstants.CBC) + private BigDecimal alternativeConditionPrice; - @XmlPath("cac:Price/cbc:PriceAmount/text()") - private BigDecimal priceAmount; + @XmlElement(name = "PriceTypeCode", namespace = XMLConstants.CBC) + private String priceTypeCode; + } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocumentLine.TaxTotalLine") @Data @NoArgsConstructor public static class TaxTotalLine { - @XmlPath("cbc:TaxAmount/text()") + @XmlElement(name = "TaxAmount", namespace = XMLConstants.CBC) BigDecimal taxAmount; - @XmlPath("cac:TaxSubtotal") + @XmlElement(name = "TaxSubtotal", namespace = XMLConstants.CAC) List taxSubtotals; } + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocumentLine.TaxSubtotalLine") @Data @NoArgsConstructor public static class TaxSubtotalLine { - @XmlPath("cbc:TaxableAmount/text()") + @XmlElement(name = "TaxableAmount", namespace = XMLConstants.CBC) private BigDecimal taxableAmount; - @XmlPath("cbc:TaxAmount/text()") + @XmlElement(name = "TaxAmount", namespace = XMLConstants.CBC) private BigDecimal taxAmount; - @XmlPath("cac:TaxCategory/cbc:Percent/text()") + @XmlElement(name = "TaxCategory", namespace = XMLConstants.CAC) + private TaxCategory taxCategory; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocumentLine.TaxCategory") + @Data + @NoArgsConstructor + public static class TaxCategory { + @XmlElement(name = "Percent", namespace = XMLConstants.CBC) private BigDecimal percent; - @XmlPath("cac:TaxCategory/cbc:TierRange/text()") + @XmlElement(name = "TierRange", namespace = XMLConstants.CBC) private String tierRange; - @XmlPath("cac:TaxCategory/cbc:PerUnitAmount/text()") + @XmlElement(name = "PerUnitAmount", namespace = XMLConstants.CBC) private BigDecimal perUnitAmount; - @XmlPath("cac:TaxCategory/cbc:TaxExemptionReasonCode/text()") + @XmlElement(name = "TaxExemptionReasonCode", namespace = XMLConstants.CBC) private String taxExemptionReasonCode; - @XmlPath("cac:TaxCategory/cac:TaxScheme/cbc:ID/text()") - private String code; + @XmlElement(name = "TaxScheme", namespace = XMLConstants.CAC) + private TaxScheme TaxScheme; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocumentLine.TaxScheme") + @Data + @NoArgsConstructor + public static class TaxScheme { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String id; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocumentLine.Item") + @Data + @NoArgsConstructor + public static class Item { + @XmlElement(name = "Description", namespace = XMLConstants.CBC) + private String description; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SalesDocumentLine.Price") + @Data + @NoArgsConstructor + public static class Price { + @XmlElement(name = "PriceAmount", namespace = XMLConstants.CBC) + private BigDecimal priceAmount; } } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSignature.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSignature.java index 38254c31..5535ce09 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSignature.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSignature.java @@ -19,13 +19,37 @@ import lombok.Data; import lombok.NoArgsConstructor; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +@XmlAccessorType(XmlAccessType.NONE) +@XmlType(name = "Signature") @Data @NoArgsConstructor public class XMLSignature { - @XmlPath("cbc:ID/text()") + @XmlElement(name = "ID", namespace = XMLConstants.CBC) private String id; - @XmlPath("cac:SignatoryParty/cac:PartyName/cbc:Name/text()") - private String partyName; + @XmlElement(name = "SignatoryParty", namespace = XMLConstants.CAC) + private SignatoryParty signatoryParty; + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "Signature.SignatoryParty") + @Data + @NoArgsConstructor + public static class SignatoryParty { + @XmlElement(name = "PartyName", namespace = XMLConstants.CAC) + private PartyName partyName; + } + + @XmlType(name = "Signature.PartyName") + @XmlAccessorType(XmlAccessType.NONE) + @Data + @NoArgsConstructor + public static class PartyName { + @XmlElement(name = "Name", namespace = XMLConstants.CBC) + private String name; + } } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocuments.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSummaryDocuments.java similarity index 62% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocuments.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSummaryDocuments.java index 4b7a6006..8d93f596 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocuments.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSummaryDocuments.java @@ -20,15 +20,20 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; - +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; import java.util.List; -@Data +@XmlAccessorType(XmlAccessType.NONE) +@XmlRootElement(name = "SummaryDocuments", namespace = "urn:sunat:names:specification:ubl:peru:schema:xsd:SummaryDocuments-1") @EqualsAndHashCode(callSuper = true) +@Data @NoArgsConstructor -public class XMLSunatDocumentVoidedDocuments extends XMLSunatDocument { +public class XMLSummaryDocuments extends XMLSunatDocument { - @XmlPath("sac:VoidedDocumentsLine") - private List lines; + @XmlElement(name = "SummaryDocumentsLine", namespace = XMLConstants.SAC) + private List lines; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSummaryDocumentsLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSummaryDocumentsLine.java new file mode 100644 index 00000000..bed5e926 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSummaryDocumentsLine.java @@ -0,0 +1,180 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlAttribute; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +import javax.xml.bind.annotation.XmlValue; +import java.math.BigDecimal; +import java.util.List; + +@XmlType(name = "SummaryDocumentsLine") +@XmlAccessorType(XmlAccessType.NONE) +@Data +@NoArgsConstructor +public class XMLSummaryDocumentsLine { + + @XmlElement(name = "DocumentTypeCode", namespace = XMLConstants.CBC) + private String documentTypeCode; + + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String documentId; + + @XmlElement(name = "AccountingCustomerParty", namespace = XMLConstants.CAC) + private AccountingCustomerParty accountingCustomerParty; + + @XmlElement(name = "BillingReference", namespace = XMLConstants.CAC) + private BillingReference billingReference; + + @XmlElement(name = "Status", namespace = XMLConstants.CAC) + private Status status; + + @XmlElement(name = "TotalAmount", namespace = XMLConstants.SAC) + private TotalAmount totalAmount; + + @XmlElement(name = "BillingPayment", namespace = XMLConstants.SAC) + private List billingPayments; + + @XmlElement(name = "AllowanceCharge", namespace = XMLConstants.CAC) + private AllowanceCharge allowanceCharge; + + @XmlElement(name = "TaxTotal", namespace = XMLConstants.CAC) + private List taxTotals; + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SummaryDocumentsLine.AccountingCustomerParty") + @Data + @NoArgsConstructor + public static class AccountingCustomerParty { + @XmlElement(name = "CustomerAssignedAccountID", namespace = XMLConstants.CBC) + private String customerAssignedAccountID; + + @XmlElement(name = "AdditionalAccountID", namespace = XMLConstants.CBC) + private String additionalAccountID; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SummaryDocumentsLine.Status") + @Data + @NoArgsConstructor + public static class Status { + @XmlElement(name = "ConditionCode", namespace = XMLConstants.CBC) + private String conditionCode; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SummaryDocumentsLine.TotalAmount") + @Data + @NoArgsConstructor + public static class TotalAmount { + @XmlValue + private BigDecimal value; + + @XmlAttribute(name = "currencyID") + private String currencyID; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SummaryDocumentsLine.AllowanceCharge") + @Data + @NoArgsConstructor + public static class AllowanceCharge { + @XmlElement(name = "Amount", namespace = XMLConstants.CBC) + private BigDecimal value; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SummaryDocumentsLine.BillingPayment") + @Data + @NoArgsConstructor + public static class BillingPayment { + @XmlElement(name = "PaidAmount", namespace = XMLConstants.CBC) + BigDecimal paidAmount; + + @XmlElement(name = "InstructionID", namespace = XMLConstants.CBC) + String instructionId; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SummaryDocumentsLine.BillingReference") + @Data + @NoArgsConstructor + public static class BillingReference { + @XmlElement(name = "InvoiceDocumentReference", namespace = XMLConstants.CAC) + private InvoiceDocumentReference invoiceDocumentReference; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SummaryDocumentsLine.InvoiceDocumentReference") + @Data + @NoArgsConstructor + public static class InvoiceDocumentReference { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String id; + + @XmlElement(name = "DocumentTypeCode", namespace = XMLConstants.CBC) + private String documentTypeCode; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SummaryDocumentsLine.TaxTotalSummaryDocuments") + @Data + @NoArgsConstructor + public static class TaxTotalSummaryDocuments { + @XmlElement(name = "TaxAmount", namespace = XMLConstants.CBC) + BigDecimal taxAmount; + + @XmlElement(name = "TaxSubtotal", namespace = XMLConstants.CAC) + TaxSubtotalTaxTotalSummaryDocuments taxSubtotals; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SummaryDocumentsLine.TaxSubtotalTaxTotalSummaryDocuments") + @Data + @NoArgsConstructor + public static class TaxSubtotalTaxTotalSummaryDocuments { + @XmlElement(name = "TaxAmount", namespace = XMLConstants.CBC) + private BigDecimal taxAmount; + + @XmlElement(name = "TaxCategory", namespace = XMLConstants.CAC) + private TaxCategory taxCategory; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SummaryDocumentsLine.TaxCategory") + @Data + @NoArgsConstructor + public static class TaxCategory { + @XmlElement(name = "TaxScheme", namespace = XMLConstants.CAC) + private TaxScheme taxScheme; + } + + @XmlAccessorType(XmlAccessType.NONE) + @XmlType(name = "SummaryDocumentsLine.TaxScheme") + @Data + @NoArgsConstructor + public static class TaxScheme { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String id; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocument.java index ed55491b..4eec3327 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocument.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocument.java @@ -16,29 +16,36 @@ */ package io.github.project.openubl.xbuilder.content.jaxb.models; +import io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalDateAdapter; import lombok.Data; import lombok.NoArgsConstructor; - +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import java.time.LocalDate; +@XmlAccessorType(XmlAccessType.NONE) @Data @NoArgsConstructor public abstract class XMLSunatDocument { - @XmlPath("cbc:ID/text()") + @XmlElement(name = "ID", namespace = XMLConstants.CBC) private String documentId; - @XmlPath("cbc:ReferenceDate/text()") + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "ReferenceDate", namespace = XMLConstants.CBC) private LocalDate referenceDate; - @XmlPath("cbc:IssueDate/text()") + @XmlJavaTypeAdapter(LocalDateAdapter.class) + @XmlElement(name = "IssueDate", namespace = XMLConstants.CBC) private LocalDate issueDate; - @XmlPath("cac:Signature") + @XmlElement(name = "Signature", namespace = XMLConstants.CAC) private XMLSignature signature; - @XmlPath("cac:AccountingSupplierParty") - private XMLSupplier accountingSupplierParty; + @XmlElement(name = "AccountingSupplierParty", namespace = XMLConstants.CAC) + private XMLSupplierSunat accountingSupplierParty; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocumentsLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocumentsLine.java deleted file mode 100644 index bf91750c..00000000 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocumentsLine.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License - 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.github.project.openubl.xbuilder.content.jaxb.models; - -import lombok.Data; -import lombok.NoArgsConstructor; - - -import java.math.BigDecimal; -import java.util.List; - -@Data -@NoArgsConstructor -public class XMLSunatDocumentSummaryDocumentsLine { - - @XmlPath("cbc:DocumentTypeCode/text()") - private String documentTypeCode; - - @XmlPath("cbc:ID/text()") - private String documentId; - - @XmlPath("cac:AccountingCustomerParty/cbc:CustomerAssignedAccountID/text()") - private String accountingCustomerParty_customerAssignedAccountId; - - @XmlPath("cac:AccountingCustomerParty/cbc:AdditionalAccountID/text()") - private String accountingCustomerParty_additionalAccountID; - - @XmlPath("cac:BillingReference") - private BillingReference billingReference; - - @XmlPath("cac:Status/cbc:ConditionCode/text()") - private String status_conditionCode; - - @XmlPath("sac:TotalAmount/text()") - private BigDecimal totalAmount; - - @XmlPath("sac:TotalAmount/@currencyID") - private String totalAmount_currencyID; - - @XmlPath("sac:BillingPayment") - private List billingPayments; - - @XmlPath("cac:AllowanceCharge/cbc:Amount/text()") - private BigDecimal allowanceCharge_amount; - - @XmlPath("cac:TaxTotal") - private List taxTotals; - - @Data - @NoArgsConstructor - public static class BillingPayment { - @XmlPath("cbc:PaidAmount/text()") - BigDecimal paidAmount; - - @XmlPath("cbc:InstructionID/text()") - String instructionId; - } - - @Data - @NoArgsConstructor - public static class BillingReference { - @XmlPath("cac:InvoiceDocumentReference/cbc:ID/text()") - private String invoiceDocumentReference_id; - - @XmlPath("cac:InvoiceDocumentReference/cbc:DocumentTypeCode/text()") - private String invoiceDocumentReference_documentTypeCode; - } - - @Data - @NoArgsConstructor - public static class TaxTotalSummaryDocuments { - @XmlPath("cbc:TaxAmount/text()") - BigDecimal taxAmount; - - @XmlPath("cac:TaxSubtotal") - TaxSubtotalTaxTotalSummaryDocuments taxSubtotals; - } - - @Data - @NoArgsConstructor - public static class TaxSubtotalTaxTotalSummaryDocuments { - @XmlPath("cbc:TaxAmount/text()") - private BigDecimal taxAmount; - - @XmlPath("cac:TaxCategory/cac:TaxScheme/cbc:ID/text()") - private String code; - } -} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplier.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplier.java index 437e14dc..a7b7d26c 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplier.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplier.java @@ -19,22 +19,56 @@ import lombok.Data; import lombok.NoArgsConstructor; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +@XmlAccessorType(XmlAccessType.NONE) +@XmlType(name = "Supplier.Party") @Data @NoArgsConstructor public class XMLSupplier { - @XmlPath("cac:PartyIdentification/cbc:ID/text()") - private String partyIdentification_id; - @XmlPath("cac:PartyName/cbc:Name/text()") - private String partyName; + @XmlElement(name = "PartyIdentification", namespace = XMLConstants.CAC) + private PartyIdentification partyIdentification; - @XmlPath("cac:PartyLegalEntity/cbc:RegistrationName/text()") - private String registrationName; + @XmlElement(name = "PartyName", namespace = XMLConstants.CAC) + private PartyName partyName; - @XmlPath("cac:PartyLegalEntity/cac:RegistrationAddress") - private XMLAddress address; + @XmlElement(name = "PartyLegalEntity", namespace = XMLConstants.CAC) + private PartyLegalEntity partyLegalEntity; - @XmlPath("cac:Contact") + @XmlElement(name = "Contact", namespace = XMLConstants.CAC) private XMLContact contact; + + @XmlType(name = "Supplier.PartyIdentification") + @XmlAccessorType(XmlAccessType.NONE) + @Data + @NoArgsConstructor + public static class PartyIdentification { + @XmlElement(name = "ID", namespace = XMLConstants.CBC) + private String id; + } + + @XmlType(name = "Supplier.PartyName") + @XmlAccessorType(XmlAccessType.NONE) + @Data + @NoArgsConstructor + public static class PartyName { + @XmlElement(name = "Name", namespace = XMLConstants.CBC) + private String name; + } + + @XmlType(name = "Supplier.PartyLegalEntity") + @XmlAccessorType(XmlAccessType.NONE) + @Data + @NoArgsConstructor + public static class PartyLegalEntity { + @XmlElement(name = "RegistrationName", namespace = XMLConstants.CBC) + private String registrationName; + + @XmlElement(name = "RegistrationAddress", namespace = XMLConstants.CAC) + private XMLAddress address; + } } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplierSunat.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplierSunat.java new file mode 100644 index 00000000..3a811399 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSupplierSunat.java @@ -0,0 +1,74 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; + +@XmlAccessorType(XmlAccessType.NONE) +@XmlType(name = "SupplierSunat") +@Data +@NoArgsConstructor +public class XMLSupplierSunat { + + @XmlElement(name = "CustomerAssignedAccountID", namespace = XMLConstants.CBC) + private String customerAssignedAccountID; + + @XmlElement(name = "PartyName", namespace = XMLConstants.CAC) + private PartyName partyName; + + @XmlElement(name = "Party", namespace = XMLConstants.CAC) + private Party party; + + @XmlElement(name = "Contact", namespace = XMLConstants.CAC) + private XMLContact contact; + + @XmlType(name = "SupplierSunat.PartyName") + @XmlAccessorType(XmlAccessType.NONE) + @Data + @NoArgsConstructor + public static class PartyName { + @XmlElement(name = "Name", namespace = XMLConstants.CBC) + private String name; + } + + @XmlType(name = "SupplierSunat.Party") + @XmlAccessorType(XmlAccessType.NONE) + @Data + @NoArgsConstructor + public static class Party { + @XmlElement(name = "PartyLegalEntity", namespace = XMLConstants.CAC) + private PartyLegalEntity partyLegalEntity; + } + + @XmlType(name = "SupplierSunat.PartyLegalEntity") + @XmlAccessorType(XmlAccessType.NONE) + @Data + @NoArgsConstructor + public static class PartyLegalEntity { + @XmlElement(name = "RegistrationName", namespace = XMLConstants.CBC) + private String registrationName; + + @XmlElement(name = "RegistrationAddress", namespace = XMLConstants.CAC) + private XMLAddress address; + } +} diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocuments.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLVoidedDocuments.java similarity index 63% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocuments.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLVoidedDocuments.java index 30ceb688..3bb9b8c1 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentSummaryDocuments.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLVoidedDocuments.java @@ -20,15 +20,20 @@ import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; - +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; import java.util.List; -@Data +@XmlAccessorType(XmlAccessType.NONE) +@XmlRootElement(name = "VoidedDocuments", namespace = "urn:sunat:names:specification:ubl:peru:schema:xsd:VoidedDocuments-1") @EqualsAndHashCode(callSuper = true) +@Data @NoArgsConstructor -public class XMLSunatDocumentSummaryDocuments extends XMLSunatDocument { +public class XMLVoidedDocuments extends XMLSunatDocument { - @XmlPath("sac:SummaryDocumentsLine") - private List lines; + @XmlElement(name = "VoidedDocumentsLine", namespace = XMLConstants.SAC) + private List lines; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentsLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLVoidedDocumentsLine.java similarity index 62% rename from core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentsLine.java rename to core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLVoidedDocumentsLine.java index 87bb9e4b..2af33ff5 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSunatDocumentVoidedDocumentsLine.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLVoidedDocumentsLine.java @@ -19,20 +19,26 @@ import lombok.Data; import lombok.NoArgsConstructor; +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlType; +@XmlType(name = "VoidedDocumentsLine") +@XmlAccessorType(XmlAccessType.NONE) @Data @NoArgsConstructor -public class XMLSunatDocumentVoidedDocumentsLine { +public class XMLVoidedDocumentsLine { - @XmlPath("cbc:DocumentTypeCode/text()") + @XmlElement(name = "DocumentTypeCode", namespace = XMLConstants.CBC) private String documentTypeCode; - @XmlPath("sac:DocumentSerialID/text()") + @XmlElement(name = "DocumentSerialID", namespace = XMLConstants.SAC) private String documentSerialID; - @XmlPath("sac:DocumentNumberID/text()") + @XmlElement(name = "DocumentNumberID", namespace = XMLConstants.SAC) private Integer documentNumberID; - @XmlPath("sac:VoidReasonDescription/text()") + @XmlElement(name = "VoidReasonDescription", namespace = XMLConstants.SAC) private String voidReasonDescription; } diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/package-info.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/package-info.java new file mode 100644 index 00000000..7c8f8575 --- /dev/null +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/package-info.java @@ -0,0 +1,14 @@ +@XmlSchema( + xmlns = { + @XmlNs(prefix = "cbc", namespaceURI = XMLConstants.CBC), + @XmlNs(prefix = "cac", namespaceURI = XMLConstants.CAC), + @XmlNs(prefix = "sac", namespaceURI = XMLConstants.SAC), + @XmlNs(prefix = "ext", namespaceURI = XMLConstants.EXT) + }, + elementFormDefault = XmlNsForm.QUALIFIED +) +package io.github.project.openubl.xbuilder.content.jaxb.models; + +import javax.xml.bind.annotation.XmlNs; +import javax.xml.bind.annotation.XmlNsForm; +import javax.xml.bind.annotation.XmlSchema; \ No newline at end of file diff --git a/core/src/main/resources/jaxb/xml-bindings/credit-note.xml b/core/src/main/resources/jaxb/xml-bindings/credit-note.xml deleted file mode 100644 index 29a663d3..00000000 --- a/core/src/main/resources/jaxb/xml-bindings/credit-note.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/src/main/resources/jaxb/xml-bindings/debit-note.xml b/core/src/main/resources/jaxb/xml-bindings/debit-note.xml deleted file mode 100644 index 7acd3982..00000000 --- a/core/src/main/resources/jaxb/xml-bindings/debit-note.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/src/main/resources/jaxb/xml-bindings/despatch-advice.xml b/core/src/main/resources/jaxb/xml-bindings/despatch-advice.xml deleted file mode 100644 index f8e6851c..00000000 --- a/core/src/main/resources/jaxb/xml-bindings/despatch-advice.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/core/src/main/resources/jaxb/xml-bindings/invoice.xml b/core/src/main/resources/jaxb/xml-bindings/invoice.xml deleted file mode 100644 index 30431553..00000000 --- a/core/src/main/resources/jaxb/xml-bindings/invoice.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/src/main/resources/jaxb/xml-bindings/perception.xml b/core/src/main/resources/jaxb/xml-bindings/perception.xml deleted file mode 100644 index 120ace6f..00000000 --- a/core/src/main/resources/jaxb/xml-bindings/perception.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/src/main/resources/jaxb/xml-bindings/retention.xml b/core/src/main/resources/jaxb/xml-bindings/retention.xml deleted file mode 100644 index dcdb5fb1..00000000 --- a/core/src/main/resources/jaxb/xml-bindings/retention.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/src/main/resources/jaxb/xml-bindings/summary-documents.xml b/core/src/main/resources/jaxb/xml-bindings/summary-documents.xml deleted file mode 100644 index 06ce283f..00000000 --- a/core/src/main/resources/jaxb/xml-bindings/summary-documents.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/src/main/resources/jaxb/xml-bindings/voided-documents.xml b/core/src/main/resources/jaxb/xml-bindings/voided-documents.xml deleted file mode 100644 index 2e4cc97e..00000000 --- a/core/src/main/resources/jaxb/xml-bindings/voided-documents.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/core/src/test/java/e2e/AbstractTest.java b/core/src/test/java/e2e/AbstractTest.java index 2f308fa9..5ad65a20 100644 --- a/core/src/test/java/e2e/AbstractTest.java +++ b/core/src/test/java/e2e/AbstractTest.java @@ -23,7 +23,22 @@ import com.fasterxml.jackson.dataformat.yaml.YAMLMapper; import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; import e2e.renderer.XMLAssertUtils; -import io.github.project.openubl.xbuilder.content.jaxb.Unmarshall; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.CreditNoteMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.DebitNoteMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.DespatchAdviceMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.InvoiceMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.PerceptionMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.RetentionMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.SummaryDocumentsMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.VoidedDocumentsMapper; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLCreditNote; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLDebitNote; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLVoidedDocuments; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLInvoice; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcion; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLRetention; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocuments; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; @@ -37,8 +52,12 @@ import io.github.project.openubl.xbuilder.enricher.config.Defaults; import io.github.project.openubl.xbuilder.renderer.TemplateProducer; import io.quarkus.qute.Template; +import org.mapstruct.factory.Mappers; +import org.xml.sax.InputSource; +import javax.xml.bind.JAXBContext; import java.io.IOException; +import java.io.StringReader; import java.math.BigDecimal; import java.net.URISyntaxException; import java.nio.file.Files; @@ -49,6 +68,15 @@ public class AbstractTest { + private static final InvoiceMapper invoiceMapper = Mappers.getMapper(InvoiceMapper.class); + private static final CreditNoteMapper creditNoteMapper = Mappers.getMapper(CreditNoteMapper.class); + private static final DebitNoteMapper debitNoteMapper = Mappers.getMapper(DebitNoteMapper.class); + private static final VoidedDocumentsMapper voidedDocumentsMapper = Mappers.getMapper(VoidedDocumentsMapper.class); + private static final SummaryDocumentsMapper summaryDocumentsMapper = Mappers.getMapper(SummaryDocumentsMapper.class); + private static final PerceptionMapper perceptionMapper = Mappers.getMapper(PerceptionMapper.class); + private static final RetentionMapper retentionMapper = Mappers.getMapper(RetentionMapper.class); + private static final DespatchAdviceMapper despatchAdviceMapper = Mappers.getMapper(DespatchAdviceMapper.class); + protected static final Defaults defaults = Defaults.builder() .icbTasa(new BigDecimal("0.2")) .igvTasa(new BigDecimal("0.18")) @@ -90,8 +118,14 @@ protected void assertInput(Invoice input, String snapshotFilename) throws Except Template template = TemplateProducer.getInstance().getInvoice(); String xml = template.data(input).render(); - Invoice inputFromXml = Unmarshall.unmarshallInvoice(xml); - String reconstructedXml = template.data(inputFromXml).render(); + String reconstructedXml; + try (StringReader reader = new StringReader(xml);) { + XMLInvoice xmlPojo = (XMLInvoice) JAXBContext.newInstance(XMLInvoice.class) + .createUnmarshaller() + .unmarshal(new InputSource(reader)); + Invoice inputFromXml = invoiceMapper.map(xmlPojo); + reconstructedXml = template.data(inputFromXml).render(); + } // Then XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); @@ -108,8 +142,14 @@ protected void assertInput(CreditNote input, String snapshotFilename) throws Exc Template template = TemplateProducer.getInstance().getCreditNote(); String xml = template.data(input).render(); - CreditNote inputFromXml = Unmarshall.unmarshallCreditNote(xml); - String reconstructedXml = template.data(inputFromXml).render(); + String reconstructedXml; + try (StringReader reader = new StringReader(xml);) { + XMLCreditNote xmlPojo = (XMLCreditNote) JAXBContext.newInstance(XMLCreditNote.class) + .createUnmarshaller() + .unmarshal(new InputSource(reader)); + CreditNote inputFromXml = creditNoteMapper.map(xmlPojo); + reconstructedXml = template.data(inputFromXml).render(); + } // Then XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); @@ -126,8 +166,14 @@ protected void assertInput(DebitNote input, String snapshotFilename) throws Exce Template template = TemplateProducer.getInstance().getDebitNote(); String xml = template.data(input).render(); - DebitNote inputFromXml = Unmarshall.unmarshallDebitNote(xml); - String reconstructedXml = template.data(inputFromXml).render(); + String reconstructedXml; + try (StringReader reader = new StringReader(xml);) { + XMLDebitNote xmlPojo = (XMLDebitNote) JAXBContext.newInstance(XMLDebitNote.class) + .createUnmarshaller() + .unmarshal(new InputSource(reader)); + DebitNote inputFromXml = debitNoteMapper.map(xmlPojo); + reconstructedXml = template.data(inputFromXml).render(); + } // Then XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); @@ -144,8 +190,14 @@ protected void assertInput(VoidedDocuments input, String snapshotFilename) throw Template template = TemplateProducer.getInstance().getVoidedDocument(); String xml = template.data(input).render(); - VoidedDocuments inputFromXml = Unmarshall.unmarshallVoidedDocuments(xml); - String reconstructedXml = template.data(inputFromXml).render(); + String reconstructedXml; + try (StringReader reader = new StringReader(xml);) { + XMLVoidedDocuments xmlPojo = (XMLVoidedDocuments) JAXBContext.newInstance(XMLVoidedDocuments.class) + .createUnmarshaller() + .unmarshal(new InputSource(reader)); + VoidedDocuments inputFromXml = voidedDocumentsMapper.map(xmlPojo); + reconstructedXml = template.data(inputFromXml).render(); + } // Then XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); @@ -162,8 +214,14 @@ protected void assertInput(SummaryDocuments input, String snapshotFilename) thro Template template = TemplateProducer.getInstance().getSummaryDocuments(); String xml = template.data(input).render(); - SummaryDocuments inputFromXml = Unmarshall.unmarshallSummaryDocuments(xml); - String reconstructedXml = template.data(inputFromXml).render(); + String reconstructedXml; + try (StringReader reader = new StringReader(xml);) { + XMLSummaryDocuments xmlPojo = (XMLSummaryDocuments) JAXBContext.newInstance(XMLSummaryDocuments.class) + .createUnmarshaller() + .unmarshal(new InputSource(reader)); + SummaryDocuments inputFromXml = summaryDocumentsMapper.map(xmlPojo); + reconstructedXml = template.data(inputFromXml).render(); + } // Then XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); @@ -180,8 +238,14 @@ protected void assertInput(Perception input, String snapshotFilename) throws Exc Template template = TemplateProducer.getInstance().getPerception(); String xml = template.data(input).render(); - Perception inputFromXml = Unmarshall.unmarshallPerception(xml); - String reconstructedXml = template.data(inputFromXml).render(); + String reconstructedXml; + try (StringReader reader = new StringReader(xml);) { + XMLPercepcion xmlPojo = (XMLPercepcion) JAXBContext.newInstance(XMLPercepcion.class) + .createUnmarshaller() + .unmarshal(new InputSource(reader)); + Perception inputFromXml = perceptionMapper.map(xmlPojo); + reconstructedXml = template.data(inputFromXml).render(); + } // Then XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); @@ -198,8 +262,14 @@ protected void assertInput(Retention input, String snapshotFilename) throws Exce Template template = TemplateProducer.getInstance().getRetention(); String xml = template.data(input).render(); - Retention inputFromXml = Unmarshall.unmarshallRetention(xml); - String reconstructedXml = template.data(inputFromXml).render(); + String reconstructedXml; + try (StringReader reader = new StringReader(xml);) { + XMLRetention xmlPojo = (XMLRetention) JAXBContext.newInstance(XMLRetention.class) + .createUnmarshaller() + .unmarshal(new InputSource(reader)); + Retention inputFromXml = retentionMapper.map(xmlPojo); + reconstructedXml = template.data(inputFromXml).render(); + } // Then XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); @@ -216,8 +286,14 @@ protected void assertInput(DespatchAdvice input, String snapshotFilename) throws Template template = TemplateProducer.getInstance().getDespatchAdvice(); String xml = template.data(input).render(); - DespatchAdvice inputFromXml = Unmarshall.unmarshallDespatchAdvice(xml); - String reconstructedXml = template.data(inputFromXml).render(); + String reconstructedXml; + try (StringReader reader = new StringReader(xml);) { + XMLDespatchAdvice xmlPojo = (XMLDespatchAdvice) JAXBContext.newInstance(XMLDespatchAdvice.class) + .createUnmarshaller() + .unmarshal(new InputSource(reader)); + DespatchAdvice inputFromXml = despatchAdviceMapper.map(xmlPojo); + reconstructedXml = template.data(inputFromXml).render(); + } // Then XMLAssertUtils.assertSnapshot(xml, reconstructedXml, getClass(), snapshotFilename); diff --git a/pom.xml b/pom.xml index 02c275a7..359376b8 100644 --- a/pom.xml +++ b/pom.xml @@ -45,6 +45,7 @@ ${basedir} 1.18.26 + 1.5.3.Final 2.16.4.Final 2.9.1 4.1.3 From 4bf865014ebfe36bbaf1ef5c1c30e0d3d4a29f38 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sat, 1 Apr 2023 11:45:55 +0200 Subject: [PATCH 15/19] License --- .../content/jaxb/mappers/CreditNoteMapper.java | 16 ++++++++++++++++ .../content/jaxb/mappers/DebitNoteMapper.java | 16 ++++++++++++++++ .../jaxb/mappers/DespatchAdviceMapper.java | 16 ++++++++++++++++ .../content/jaxb/mappers/InvoiceMapper.java | 16 ++++++++++++++++ .../content/jaxb/mappers/PerceptionMapper.java | 16 ++++++++++++++++ .../content/jaxb/mappers/RetentionMapper.java | 16 ++++++++++++++++ .../jaxb/mappers/SummaryDocumentsMapper.java | 16 ++++++++++++++++ .../jaxb/mappers/VoidedDocumentsMapper.java | 16 ++++++++++++++++ .../jaxb/mappers/common/ClienteMapper.java | 16 ++++++++++++++++ .../jaxb/mappers/common/ContactoMapper.java | 16 ++++++++++++++++ .../jaxb/mappers/common/DireccionMapper.java | 16 ++++++++++++++++ .../jaxb/mappers/common/FirmanteMapper.java | 16 ++++++++++++++++ .../content/jaxb/mappers/common/GuiaMapper.java | 16 ++++++++++++++++ .../jaxb/mappers/common/Numero2Translator.java | 16 ++++++++++++++++ .../jaxb/mappers/common/Numero3Translator.java | 16 ++++++++++++++++ .../jaxb/mappers/common/ProveedorMapper.java | 16 ++++++++++++++++ .../common/SalesDocumentHelperMapper.java | 16 ++++++++++++++++ .../jaxb/mappers/common/SalesDocumentMapper.java | 16 ++++++++++++++++ .../jaxb/mappers/common/SerieNumeroMapper.java | 16 ++++++++++++++++ .../mappers/common/SerieNumeroTranslator.java | 16 ++++++++++++++++ .../jaxb/mappers/common/SerieTranslator.java | 16 ++++++++++++++++ .../content/jaxb/models/XMLConstants.java | 16 ++++++++++++++++ .../XMLPercepcionSunatDocumentReference.java | 16 ++++++++++++++++ .../XMLRetentionSunatDocumentReference.java | 16 ++++++++++++++++ .../content/jaxb/models/package-info.java | 16 ++++++++++++++++ 25 files changed, 400 insertions(+) diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/CreditNoteMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/CreditNoteMapper.java index fca56e2e..19a1bf00 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/CreditNoteMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/CreditNoteMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers; import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SalesDocumentHelperMapper; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DebitNoteMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DebitNoteMapper.java index c31684b1..452661ce 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DebitNoteMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DebitNoteMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers; import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SalesDocumentHelperMapper; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DespatchAdviceMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DespatchAdviceMapper.java index 05f18fcf..ac3211b7 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DespatchAdviceMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/DespatchAdviceMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers; import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.FirmanteMapper; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/InvoiceMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/InvoiceMapper.java index 69f776dd..914ee86f 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/InvoiceMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/InvoiceMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers; import io.github.project.openubl.xbuilder.content.catalogs.Catalog; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/PerceptionMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/PerceptionMapper.java index 7584c8ef..e1a61fbb 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/PerceptionMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/PerceptionMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers; import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ClienteMapper; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/RetentionMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/RetentionMapper.java index 3c478445..061c4373 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/RetentionMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/RetentionMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers; import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ClienteMapper; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/SummaryDocumentsMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/SummaryDocumentsMapper.java index 26449a3c..1e005de3 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/SummaryDocumentsMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/SummaryDocumentsMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers; import io.github.project.openubl.xbuilder.content.catalogs.Catalog; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/VoidedDocumentsMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/VoidedDocumentsMapper.java index bba5bd42..642d1be4 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/VoidedDocumentsMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/VoidedDocumentsMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers; import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.FirmanteMapper; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ClienteMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ClienteMapper.java index a4f15981..38821c16 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ClienteMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ClienteMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLCustomer; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ContactoMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ContactoMapper.java index 12ac885c..21cd578c 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ContactoMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ContactoMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLContact; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/DireccionMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/DireccionMapper.java index 2ca858ff..bd32fd54 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/DireccionMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/DireccionMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLAddress; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/FirmanteMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/FirmanteMapper.java index a8b923d4..0677410d 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/FirmanteMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/FirmanteMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSignature; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/GuiaMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/GuiaMapper.java index e45a5cbd..b5536938 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/GuiaMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/GuiaMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero2Translator.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero2Translator.java index 2fbcb334..5313d6b0 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero2Translator.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero2Translator.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; import org.mapstruct.Qualifier; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero3Translator.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero3Translator.java index 81bcff1d..e72e513f 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero3Translator.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/Numero3Translator.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; import org.mapstruct.Qualifier; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ProveedorMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ProveedorMapper.java index 5cb53442..daa8042f 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ProveedorMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/ProveedorMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplier; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentHelperMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentHelperMapper.java index ef816512..8353d1bb 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentHelperMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentHelperMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; import io.github.project.openubl.xbuilder.content.catalogs.Catalog; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentMapper.java index fb9f8927..83a1dc3e 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SalesDocumentMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroMapper.java index 90d82581..66375394 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroMapper.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; @SerieNumeroTranslator diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroTranslator.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroTranslator.java index d2db43a8..30dbb0d6 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroTranslator.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieNumeroTranslator.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; import org.mapstruct.Qualifier; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieTranslator.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieTranslator.java index ada1af3d..9d63fb9c 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieTranslator.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/common/SerieTranslator.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.mappers.common; import org.mapstruct.Qualifier; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLConstants.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLConstants.java index 3882d0fb..b42ee882 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLConstants.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLConstants.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.models; public class XMLConstants { diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionSunatDocumentReference.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionSunatDocumentReference.java index 0c8ddb95..85743adf 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionSunatDocumentReference.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLPercepcionSunatDocumentReference.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.models; import io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalDateAdapter; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetentionSunatDocumentReference.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetentionSunatDocumentReference.java index 951349c3..dbd454e3 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetentionSunatDocumentReference.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetentionSunatDocumentReference.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ package io.github.project.openubl.xbuilder.content.jaxb.models; import io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalDateAdapter; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/package-info.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/package-info.java index 7c8f8575..c7e5f8b0 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/package-info.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/package-info.java @@ -1,3 +1,19 @@ +/* + * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates + * and other contributors as indicated by the @author tags. + * + * Licensed under the Apache License - 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ @XmlSchema( xmlns = { @XmlNs(prefix = "cbc", namespaceURI = XMLConstants.CBC), From fc3b577fcfa9180c6f6042b813692b55a9259163 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:26:50 +0200 Subject: [PATCH 16/19] Add jaxb quarkus extension tests --- .../jaxb/mappers/SummaryDocumentsMapper.java | 3 +- .../XMLRetentionSunatDocumentReference.java | 4 +- .../jaxb/models/XMLSummaryDocumentsLine.java | 8 +- .../models/common/VirtualDocument.java | 39 ---- quarkus-extension/deployment/pom.xml | 4 + .../deployment/QuarkusXbuilderProcessor.java | 217 +++++++++++++++++- .../xbuilder/it/QuarkusXbuilderResource.java | 158 +++++++++++++ .../src/main/resources/application.properties | 4 +- .../it/QuarkusXbuilderResourceTest.java | 10 +- quarkus-extension/runtime/pom.xml | 4 + .../xbuilder/runtime/XBuilderConfig.java | 12 - 11 files changed, 398 insertions(+), 65 deletions(-) delete mode 100644 core/src/main/java/io/github/project/openubl/xbuilder/content/models/common/VirtualDocument.java diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/SummaryDocumentsMapper.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/SummaryDocumentsMapper.java index 1e005de3..c28dbc7a 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/SummaryDocumentsMapper.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/mappers/SummaryDocumentsMapper.java @@ -18,7 +18,6 @@ import io.github.project.openubl.xbuilder.content.catalogs.Catalog; import io.github.project.openubl.xbuilder.content.catalogs.Catalog5; -import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ClienteMapper; import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.FirmanteMapper; import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.Numero3Translator; import io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ProveedorMapper; @@ -120,7 +119,7 @@ default ComprobanteImpuestos mapLineComprobanteImpuestos(XMLSummaryDocumentsLine .flatMap(taxScheme -> Optional.ofNullable(taxScheme.getId())) .flatMap(code -> Catalog.valueOfCode(Catalog5.class, code)) .orElse(null), - XMLSummaryDocumentsLine.TaxTotalSummaryDocuments::getTaxAmount + XMLSummaryDocumentsLine.TaxTotal::getTaxAmount )); return ComprobanteImpuestos.builder() diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetentionSunatDocumentReference.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetentionSunatDocumentReference.java index dbd454e3..412eddef 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetentionSunatDocumentReference.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLRetentionSunatDocumentReference.java @@ -37,13 +37,13 @@ public class XMLRetentionSunatDocumentReference extends XMLPercepcionRetencionSunatDocumentReferenceBase { @XmlElement(name = "SUNATRetentionInformation", namespace = XMLConstants.SAC) - private XMLRetencionInformation sunatInformation; + private XMLRetentionInformation sunatInformation; @XmlAccessorType(XmlAccessType.NONE) @XmlType(name = "XMLRetentionSunatDocumentReference.XMLRetencionInformation") @Data @NoArgsConstructor - public static class XMLRetencionInformation { + public static class XMLRetentionInformation { @XmlElement(name = "SUNATRetentionAmount", namespace = XMLConstants.SAC) private BigDecimal sunatAmount; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSummaryDocumentsLine.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSummaryDocumentsLine.java index bed5e926..f1fca806 100644 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSummaryDocumentsLine.java +++ b/core/src/main/java/io/github/project/openubl/xbuilder/content/jaxb/models/XMLSummaryDocumentsLine.java @@ -59,7 +59,7 @@ public class XMLSummaryDocumentsLine { private AllowanceCharge allowanceCharge; @XmlElement(name = "TaxTotal", namespace = XMLConstants.CAC) - private List taxTotals; + private List taxTotals; @XmlAccessorType(XmlAccessType.NONE) @XmlType(name = "SummaryDocumentsLine.AccountingCustomerParty") @@ -140,19 +140,19 @@ public static class InvoiceDocumentReference { @XmlType(name = "SummaryDocumentsLine.TaxTotalSummaryDocuments") @Data @NoArgsConstructor - public static class TaxTotalSummaryDocuments { + public static class TaxTotal { @XmlElement(name = "TaxAmount", namespace = XMLConstants.CBC) BigDecimal taxAmount; @XmlElement(name = "TaxSubtotal", namespace = XMLConstants.CAC) - TaxSubtotalTaxTotalSummaryDocuments taxSubtotals; + TaxSubtotal taxSubtotals; } @XmlAccessorType(XmlAccessType.NONE) @XmlType(name = "SummaryDocumentsLine.TaxSubtotalTaxTotalSummaryDocuments") @Data @NoArgsConstructor - public static class TaxSubtotalTaxTotalSummaryDocuments { + public static class TaxSubtotal { @XmlElement(name = "TaxAmount", namespace = XMLConstants.CBC) private BigDecimal taxAmount; diff --git a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/common/VirtualDocument.java b/core/src/main/java/io/github/project/openubl/xbuilder/content/models/common/VirtualDocument.java deleted file mode 100644 index 581b03f3..00000000 --- a/core/src/main/java/io/github/project/openubl/xbuilder/content/models/common/VirtualDocument.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2019 Project OpenUBL, Inc. and/or its affiliates - * and other contributors as indicated by the @author tags. - * - * Licensed under the Apache License - 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package io.github.project.openubl.xbuilder.content.models.common; - -import lombok.NoArgsConstructor; -import lombok.experimental.SuperBuilder; - -import java.util.HashMap; -import java.util.Map; - -@SuperBuilder -@NoArgsConstructor -public abstract class VirtualDocument { - - private Map extensions = new HashMap<>(); - - public T get(String property) { - return (T) extensions.get(property); - } - - public void set(String property, Object value) { - extensions.put(property, value); - } - -} diff --git a/quarkus-extension/deployment/pom.xml b/quarkus-extension/deployment/pom.xml index 92bd640b..11ee5783 100644 --- a/quarkus-extension/deployment/pom.xml +++ b/quarkus-extension/deployment/pom.xml @@ -37,6 +37,10 @@ io.quarkus quarkus-qute-deployment + + io.quarkus + quarkus-jaxb-deployment + io.github.project-openubl quarkus-xbuilder diff --git a/quarkus-extension/deployment/src/main/java/io/github/project/openubl/quarkus/xbuilder/deployment/QuarkusXbuilderProcessor.java b/quarkus-extension/deployment/src/main/java/io/github/project/openubl/quarkus/xbuilder/deployment/QuarkusXbuilderProcessor.java index 73b91aef..d3309352 100644 --- a/quarkus-extension/deployment/src/main/java/io/github/project/openubl/quarkus/xbuilder/deployment/QuarkusXbuilderProcessor.java +++ b/quarkus-extension/deployment/src/main/java/io/github/project/openubl/quarkus/xbuilder/deployment/QuarkusXbuilderProcessor.java @@ -28,9 +28,12 @@ import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem; import io.quarkus.deployment.util.ServiceUtil; +import io.quarkus.jaxb.deployment.JaxbClassesToBeBoundBuildItem; import java.io.IOException; import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.List; import java.util.Set; class QuarkusXbuilderProcessor { @@ -106,7 +109,7 @@ void registerServices(BuildProducer services) throws I } @BuildStep - ReflectiveClassBuildItem reflectionLombok() { + ReflectiveClassBuildItem reflectionModelsLombok() { return new ReflectiveClassBuildItem(true, false, "io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote$CreditNoteBuilderImpl", "io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote$DebitNoteBuilderImpl", @@ -121,7 +124,119 @@ ReflectiveClassBuildItem reflectionLombok() { } @BuildStep - ReflectiveClassBuildItem reflection() { + ReflectiveClassBuildItem reflectionJaxbLombok() { + return new ReflectiveClassBuildItem(true, true, + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLAddress$AddressLine", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLAddress$Country", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLCreditNoteLine$Quantity", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLCustomer$PartyIdentification", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLCustomer$PartyIdentification_ID", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLCustomer$PartyLegalEntity", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDebitNoteLine$Quantity", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$AdditionalDocumentReference", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$AddressLine", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$CarrierParty", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$Delivery", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$DeliveryAddress", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$DeliveryCustomerParty", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$DespatchSupplierParty", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$DriverPerson", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$FirstArrivalPortLocation", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$GrossWeightMeasure", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$ID", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$OrderReference", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$OriginAddress", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$Party", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$PartyIdentification", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$PartyLegalEntity", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$PartyName", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$RoadTransport", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$SellerSupplierParty", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$Shipment", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$ShipmentStage", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$TransitPeriod", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$TransportEquipment", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$TransportHandlingUnit", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice$TransportMeans", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdviceLine$CommodityClassification", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdviceLine$DeliveredQuantity", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdviceLine$Item", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdviceLine$SellersItemIdentification", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLInvoiceLine$Quantity", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionBase$TotalInvoiceAmount", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionSunatDocumentReferenceBase$ID", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionSunatDocumentReferenceBase$Payment", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionSunatDocumentReferenceBase$TotalInvoiceAmount", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionSunatDocumentReference$ExchangeRate", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionSunatDocumentReference$XMLPercepcionInformation", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLRetentionSunatDocumentReference$ExchangeRate", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLRetentionSunatDocumentReference$XMLRetentionInformation", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$AccountingCustomerParty", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$AccountingSupplierParty", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$AdditionalDocumentReference", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$AllowanceCharge", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$Delivery", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$DeliveryLocation", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$DespatchDocumentReference", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$DiscrepancyResponse", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$InvoiceTypeCode", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$MonetaryTotal", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$Note", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$OrderReference", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$PayeeFinancialAccount", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$PaymentMeans", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$PaymentTerms", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$PrepaidPayment", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$TaxCategory", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$TaxScheme", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$TaxSubtotal", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument$TaxTotal", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine$AlternativeConditionPrice", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine$Item", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine$Price", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine$PricingReference", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine$TaxCategory", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine$TaxScheme", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine$TaxSubtotalLine", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine$TaxTotalLine", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSignature$PartyName", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSignature$SignatoryParty", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine$AccountingCustomerParty", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine$AllowanceCharge", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine$BillingPayment", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine$BillingReference", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine$InvoiceDocumentReference", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine$Status", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine$TaxCategory", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine$TaxScheme", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine$TaxSubtotal", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine$TaxTotal", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine$TotalAmount", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplier$PartyIdentification", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplier$PartyLegalEntity", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplier$PartyName", + + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplierSunat$Party", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplierSunat$PartyLegalEntity", + "io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplierSunat$PartyName" + ); + } + + @BuildStep + ReflectiveClassBuildItem reflectionModels() { return new ReflectiveClassBuildItem(true, false, io.github.project.openubl.xbuilder.content.models.common.Cliente.class, io.github.project.openubl.xbuilder.content.models.common.Cliente.ClienteBuilder.class, @@ -267,4 +382,102 @@ ReflectiveClassBuildItem reflection() { io.github.project.openubl.xbuilder.content.models.sunat.percepcionretencion.PercepcionRetencionOperacion.PercepcionRetencionOperacionBuilder.class ); } + + @BuildStep + ReflectiveClassBuildItem reflectionJaxb() { + return new ReflectiveClassBuildItem(true, true, + io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalDateAdapter.class, + io.github.project.openubl.xbuilder.content.jaxb.adapters.LocalTimeAdapter.class, + + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ClienteMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ContactoMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.DireccionMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.FirmanteMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.GuiaMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.Numero2Translator.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.Numero3Translator.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ProveedorMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SalesDocumentHelperMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SalesDocumentMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieNumeroMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieNumeroTranslator.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.common.SerieTranslator.class, + + io.github.project.openubl.xbuilder.content.jaxb.mappers.utils.MapperUtils.class, + + io.github.project.openubl.xbuilder.content.jaxb.mappers.CreditNoteMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.DebitNoteMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.DespatchAdviceMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.InvoiceMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.PerceptionMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.RetentionMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.SummaryDocumentsMapper.class, + io.github.project.openubl.xbuilder.content.jaxb.mappers.VoidedDocumentsMapper.class, + + io.github.project.openubl.xbuilder.content.jaxb.models.XMLAddress.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLConstants.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLContact.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLCreditNote.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLCreditNoteLine.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLCustomer.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLDebitNote.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLDebitNoteLine.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdviceLine.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLInvoice.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLInvoiceLine.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcion.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionBase.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionRetencionSunatDocumentReferenceBase.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcionSunatDocumentReference.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLRetention.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLRetentionSunatDocumentReference.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocument.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLSalesDocumentLine.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLSignature.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocuments.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocumentsLine.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLSunatDocument.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplier.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLSupplierSunat.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLVoidedDocuments.class, + io.github.project.openubl.xbuilder.content.jaxb.models.XMLVoidedDocumentsLine.class + ); + } + + @BuildStep + ReflectiveClassBuildItem mapstruct() { + return new ReflectiveClassBuildItem(true, false, + "io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ClienteMapperImpl", + "io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ContactoMapperImpl", + "io.github.project.openubl.xbuilder.content.jaxb.mappers.common.DireccionMapperImpl", + "io.github.project.openubl.xbuilder.content.jaxb.mappers.common.FirmanteMapperImpl", + "io.github.project.openubl.xbuilder.content.jaxb.mappers.common.GuiaMapperImpl", + "io.github.project.openubl.xbuilder.content.jaxb.mappers.common.ProveedorMapperImpl", + + "io.github.project.openubl.xbuilder.content.jaxb.mappers.CreditNoteMapperImpl", + "io.github.project.openubl.xbuilder.content.jaxb.mappers.DebitNoteMapperImpl", + "io.github.project.openubl.xbuilder.content.jaxb.mappers.DespatchAdviceMapperImpl", + "io.github.project.openubl.xbuilder.content.jaxb.mappers.InvoiceMapperImpl", + "io.github.project.openubl.xbuilder.content.jaxb.mappers.PerceptionMapperImpl", + "io.github.project.openubl.xbuilder.content.jaxb.mappers.RetentionMapperImpl", + "io.github.project.openubl.xbuilder.content.jaxb.mappers.SummaryDocumentsMapperImpl", + "io.github.project.openubl.xbuilder.content.jaxb.mappers.VoidedDocumentsMapperImpl" + ); + } + + @BuildStep + void jaxbRegisterClassesToBeBound(BuildProducer classesToBeBoundBuildItemProducer) { + List classesToBeBound = new ArrayList<>(); + classesToBeBound.add(io.github.project.openubl.xbuilder.content.jaxb.models.XMLInvoice.class.getName()); + classesToBeBound.add(io.github.project.openubl.xbuilder.content.jaxb.models.XMLCreditNote.class.getName()); + classesToBeBound.add(io.github.project.openubl.xbuilder.content.jaxb.models.XMLDebitNote.class.getName()); + classesToBeBound.add(io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice.class.getName()); + classesToBeBound.add(io.github.project.openubl.xbuilder.content.jaxb.models.XMLVoidedDocuments.class.getName()); + classesToBeBound.add(io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocuments.class.getName()); + classesToBeBound.add(io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcion.class.getName()); + classesToBeBound.add(io.github.project.openubl.xbuilder.content.jaxb.models.XMLRetention.class.getName()); + + classesToBeBoundBuildItemProducer.produce(new JaxbClassesToBeBoundBuildItem(classesToBeBound)); + } } diff --git a/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java b/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java index c7f86aca..b2788066 100644 --- a/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java +++ b/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java @@ -17,6 +17,22 @@ package io.github.project.openubl.quarkus.xbuilder.it; import io.github.project.openubl.quarkus.xbuilder.XBuilder; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.CreditNoteMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.DebitNoteMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.DespatchAdviceMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.InvoiceMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.PerceptionMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.RetentionMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.SummaryDocumentsMapper; +import io.github.project.openubl.xbuilder.content.jaxb.mappers.VoidedDocumentsMapper; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLCreditNote; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLDebitNote; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLDespatchAdvice; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLInvoice; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLPercepcion; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLRetention; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLSummaryDocuments; +import io.github.project.openubl.xbuilder.content.jaxb.models.XMLVoidedDocuments; import io.github.project.openubl.xbuilder.content.models.standard.general.CreditNote; import io.github.project.openubl.xbuilder.content.models.standard.general.DebitNote; import io.github.project.openubl.xbuilder.content.models.standard.general.Invoice; @@ -28,6 +44,8 @@ import io.github.project.openubl.xbuilder.enricher.ContentEnricher; import io.quarkus.qute.Template; import io.vertx.core.json.JsonObject; +import org.mapstruct.factory.Mappers; +import org.xml.sax.InputSource; import javax.enterprise.context.ApplicationScoped; import javax.inject.Inject; @@ -36,6 +54,12 @@ import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; +import javax.xml.bind.JAXBException; +import javax.xml.bind.Unmarshaller; +import java.io.IOException; +import java.io.StringReader; +import java.nio.file.Files; +import java.nio.file.Paths; import java.time.LocalDate; import static io.github.project.openubl.quarkus.xbuilder.XBuilder.Type.CREDIT_NOTE; @@ -56,6 +80,18 @@ public class QuarkusXbuilderResource { @Inject XBuilder xBuilder; + @Inject + Unmarshaller unmarshaller; + + private static final InvoiceMapper invoiceMapper = Mappers.getMapper(InvoiceMapper.class); + private static final CreditNoteMapper creditNoteMapper = Mappers.getMapper(CreditNoteMapper.class); + private static final DebitNoteMapper debitNoteMapper = Mappers.getMapper(DebitNoteMapper.class); + private static final VoidedDocumentsMapper voidedDocumentsMapper = Mappers.getMapper(VoidedDocumentsMapper.class); + private static final SummaryDocumentsMapper summaryDocumentsMapper = Mappers.getMapper(SummaryDocumentsMapper.class); + private static final PerceptionMapper perceptionMapper = Mappers.getMapper(PerceptionMapper.class); + private static final RetentionMapper retentionMapper = Mappers.getMapper(RetentionMapper.class); + private static final DespatchAdviceMapper despatchAdviceMapper = Mappers.getMapper(DespatchAdviceMapper.class); + @POST @Path("Invoice/from-json") public String createInvoiceXml(JsonObject json) { @@ -68,6 +104,24 @@ public String createInvoiceXml(JsonObject json) { return template.data(invoice).render(); } + @POST + @Consumes(MediaType.TEXT_PLAIN) + @Path("Invoice/from-xml") + public String createInvoiceXml(String xml) throws IOException, JAXBException { + Template template = xBuilder.getTemplate(INVOICE); + + try (StringReader reader = new StringReader(xml)) { + XMLInvoice xmlPojo = (XMLInvoice) unmarshaller.unmarshal(new InputSource(reader)); + Invoice inputFromXml = invoiceMapper.map(xmlPojo); + + Files.writeString(Paths.get("/home/cferiavi/Downloads/carlos1"), xmlPojo.toString()); + + return template.data(inputFromXml).render(); + } catch (JAXBException e) { + throw new RuntimeException(e); + } + } + @POST @Path("CreditNote/from-json") public String createCreditNote(JsonObject json) { @@ -80,6 +134,21 @@ public String createCreditNote(JsonObject json) { return template.data(creditNote).render(); } + @POST + @Consumes(MediaType.TEXT_PLAIN) + @Path("CreditNote/from-xml") + public String createCreditNoteXml(String xml) { + Template template = xBuilder.getTemplate(CREDIT_NOTE); + + try (StringReader reader = new StringReader(xml)) { + XMLCreditNote xmlPojo = (XMLCreditNote) unmarshaller.unmarshal(new InputSource(reader)); + CreditNote inputFromXml = creditNoteMapper.map(xmlPojo); + return template.data(inputFromXml).render(); + } catch (JAXBException e) { + throw new RuntimeException(e); + } + } + @POST @Path("DebitNote/from-json") public String createDebitNote(JsonObject json) { @@ -92,6 +161,21 @@ public String createDebitNote(JsonObject json) { return template.data(debitNote).render(); } + @POST + @Consumes(MediaType.TEXT_PLAIN) + @Path("DebitNote/from-xml") + public String createDebitNoteXml(String xml) { + Template template = xBuilder.getTemplate(DEBIT_NOTE); + + try (StringReader reader = new StringReader(xml)) { + XMLDebitNote xmlPojo = (XMLDebitNote) unmarshaller.unmarshal(new InputSource(reader)); + DebitNote inputFromXml = debitNoteMapper.map(xmlPojo); + return template.data(inputFromXml).render(); + } catch (JAXBException e) { + throw new RuntimeException(e); + } + } + @POST @Path("VoidedDocuments/from-json") public String createVoidedDocuments(JsonObject json) { @@ -104,6 +188,21 @@ public String createVoidedDocuments(JsonObject json) { return template.data(voidedDocuments).render(); } + @POST + @Consumes(MediaType.TEXT_PLAIN) + @Path("VoidedDocuments/from-xml") + public String createVoidedDocumentsXml(String xml) { + Template template = xBuilder.getTemplate(VOIDED_DOCUMENTS); + + try (StringReader reader = new StringReader(xml)) { + XMLVoidedDocuments xmlPojo = (XMLVoidedDocuments) unmarshaller.unmarshal(new InputSource(reader)); + VoidedDocuments inputFromXml = voidedDocumentsMapper.map(xmlPojo); + return template.data(inputFromXml).render(); + } catch (JAXBException e) { + throw new RuntimeException(e); + } + } + @POST @Path("SummaryDocuments/from-json") public String createSummaryDocuments(JsonObject json) { @@ -116,6 +215,21 @@ public String createSummaryDocuments(JsonObject json) { return template.data(summaryDocuments).render(); } + @POST + @Consumes(MediaType.TEXT_PLAIN) + @Path("SummaryDocuments/from-xml") + public String createSummaryDocumentsXml(String xml) { + Template template = xBuilder.getTemplate(SUMMARY_DOCUMENTS); + + try (StringReader reader = new StringReader(xml)) { + XMLSummaryDocuments xmlPojo = (XMLSummaryDocuments) unmarshaller.unmarshal(new InputSource(reader)); + SummaryDocuments inputFromXml = summaryDocumentsMapper.map(xmlPojo); + return template.data(inputFromXml).render(); + } catch (JAXBException e) { + throw new RuntimeException(e); + } + } + @POST @Path("Perception/from-json") public String createPerception(JsonObject json) { @@ -128,6 +242,21 @@ public String createPerception(JsonObject json) { return template.data(perception).render(); } + @POST + @Consumes(MediaType.TEXT_PLAIN) + @Path("Perception/from-xml") + public String createPerceptionXml(String xml) { + Template template = xBuilder.getTemplate(PERCEPTION); + + try (StringReader reader = new StringReader(xml)) { + XMLPercepcion xmlPojo = (XMLPercepcion) unmarshaller.unmarshal(new InputSource(reader)); + Perception inputFromXml = perceptionMapper.map(xmlPojo); + return template.data(inputFromXml).render(); + } catch (JAXBException e) { + throw new RuntimeException(e); + } + } + @POST @Path("Retention/from-json") public String createRetention(JsonObject json) { @@ -140,6 +269,21 @@ public String createRetention(JsonObject json) { return template.data(retention).render(); } + @POST + @Consumes(MediaType.TEXT_PLAIN) + @Path("Retention/from-xml") + public String createRetentionXml(String xml) { + Template template = xBuilder.getTemplate(RETENTION); + + try (StringReader reader = new StringReader(xml)) { + XMLRetention xmlPojo = (XMLRetention) unmarshaller.unmarshal(new InputSource(reader)); + Retention inputFromXml = retentionMapper.map(xmlPojo); + return template.data(inputFromXml).render(); + } catch (JAXBException e) { + throw new RuntimeException(e); + } + } + @POST @Path("DespatchAdvice/from-json") public String createDespatchAdvice(JsonObject json) { @@ -152,4 +296,18 @@ public String createDespatchAdvice(JsonObject json) { return template.data(despatchAdvice).render(); } + @POST + @Consumes(MediaType.TEXT_PLAIN) + @Path("DespatchAdvice/from-xml") + public String createDespatchAdviceXml(String xml) { + Template template = xBuilder.getTemplate(DESPATCH_ADVICE); + + try (StringReader reader = new StringReader(xml)) { + XMLDespatchAdvice xmlPojo = (XMLDespatchAdvice) unmarshaller.unmarshal(new InputSource(reader)); + DespatchAdvice inputFromXml = despatchAdviceMapper.map(xmlPojo); + return template.data(inputFromXml).render(); + } catch (JAXBException e) { + throw new RuntimeException(e); + } + } } diff --git a/quarkus-extension/integration-tests/src/main/resources/application.properties b/quarkus-extension/integration-tests/src/main/resources/application.properties index 10dabadf..45a13c31 100644 --- a/quarkus-extension/integration-tests/src/main/resources/application.properties +++ b/quarkus-extension/integration-tests/src/main/resources/application.properties @@ -15,7 +15,5 @@ # limitations under the License. # -quarkus.xbuilder.moneda=PEN -quarkus.xbuilder.unidad-medida=NIU quarkus.xbuilder.igv-tasa=0.2 -quarkus.xbuilder.icb-tasa=0.2 \ No newline at end of file +quarkus.xbuilder.icb-tasa=0.2 diff --git a/quarkus-extension/integration-tests/src/test/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResourceTest.java b/quarkus-extension/integration-tests/src/test/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResourceTest.java index b0a2befb..071226a4 100644 --- a/quarkus-extension/integration-tests/src/test/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResourceTest.java +++ b/quarkus-extension/integration-tests/src/test/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResourceTest.java @@ -56,7 +56,6 @@ import io.github.project.openubl.xbuilder.content.models.sunat.resumen.SummaryDocumentsItem; import io.quarkus.test.junit.QuarkusTest; import io.restassured.http.ContentType; -import io.vertx.core.json.JsonObject; import org.junit.jupiter.api.Test; import java.io.IOException; @@ -107,6 +106,15 @@ public void testAllYamlFilesFromSnapshot() throws URISyntaxException, IOExceptio .then() .statusCode(200) .body(is(snapshot)); + + given() + .when() + .contentType(ContentType.TEXT) + .body(snapshot) + .post("/quarkus-xbuilder/" + kind + "/from-xml") + .then() + .statusCode(200) + .body(is(snapshot)); } catch (IOException e) { throw new RuntimeException(e); } diff --git a/quarkus-extension/runtime/pom.xml b/quarkus-extension/runtime/pom.xml index 544a6905..0775cf68 100644 --- a/quarkus-extension/runtime/pom.xml +++ b/quarkus-extension/runtime/pom.xml @@ -37,6 +37,10 @@ io.quarkus quarkus-qute + + io.quarkus + quarkus-jaxb + io.github.project-openubl xbuilder diff --git a/quarkus-extension/runtime/src/main/java/io/github/project/openubl/quarkus/xbuilder/runtime/XBuilderConfig.java b/quarkus-extension/runtime/src/main/java/io/github/project/openubl/quarkus/xbuilder/runtime/XBuilderConfig.java index c5fce9bd..98a764ba 100644 --- a/quarkus-extension/runtime/src/main/java/io/github/project/openubl/quarkus/xbuilder/runtime/XBuilderConfig.java +++ b/quarkus-extension/runtime/src/main/java/io/github/project/openubl/quarkus/xbuilder/runtime/XBuilderConfig.java @@ -26,18 +26,6 @@ @ConfigRoot(name = "xbuilder", phase = ConfigPhase.RUN_TIME) public class XBuilderConfig { - /** - * Default moneda - */ - @ConfigItem - public Optional moneda; - - /** - * Default unidadMedida - */ - @ConfigItem - public Optional unidadMedida; - /** * Default igvTasa */ From b93a49b9c2a048feb9bab95c2e276789c366f9b9 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:36:51 +0200 Subject: [PATCH 17/19] Remove test files --- core/src/test/java/e2e/AbstractTest.java | 2 +- .../src/test/resources/.gitignore | 1 + .../Group1Test/factura1Con3Items.yaml | 324 ----------- .../Group1Test/factura2Con2Items.yaml | 271 --------- .../Group1Test/factura3Con1Items.yaml | 218 ------- .../Group1Test/factura4Con5Items.yaml | 430 -------------- .../Group1Test/factura5Con4Items.yaml | 377 ------------ .../Group1Test/notaDeCreditoDeFactura2.yaml | 268 --------- .../Group1Test/notaDeCreditoDeFactura3.yaml | 215 ------- .../Group1Test/notaDeCreditoDeFactura4.yaml | 427 -------------- .../Group1Test/notaDeDebitoDeFactura2.yaml | 268 --------- .../Group1Test/notaDeDebitoDeFactura3.yaml | 215 ------- .../Group1Test/notaDeDebitoDeFactura4.yaml | 427 -------------- .../factura1Con1Items.yaml | 218 ------- .../factura2Con4Items.yaml | 389 ------------- .../factura3Con7Items.yaml | 548 ------------------ .../factura4Con5Items.yaml | 442 -------------- .../factura5Con6Items.yaml | 495 ---------------- .../notaDeCreditoDeFactura1.yaml | 215 ------- .../notaDeCreditoDeFactura3.yaml | 545 ----------------- .../notaDeCreditoDeFactura5.yaml | 439 -------------- .../notaDeDebitoDeFactura1.yaml | 215 ------- .../notaDeDebitoDeFactura3.yaml | 545 ----------------- .../notaDeDebitoDeFactura5.yaml | 492 ---------------- .../Group2InafectoTest/factura1Con1Items.yaml | 218 ------- .../Group2InafectoTest/factura2Con4Items.yaml | 389 ------------- .../Group2InafectoTest/factura3Con7Items.yaml | 548 ------------------ .../Group2InafectoTest/factura4Con5Items.yaml | 442 -------------- .../Group2InafectoTest/factura5Con6Items.yaml | 495 ---------------- .../notaDeCreditoDeFactura1.yaml | 215 ------- .../notaDeCreditoDeFactura3.yaml | 545 ----------------- .../notaDeCreditoDeFactura5.yaml | 439 -------------- .../notaDeDebitoDeFactura1.yaml | 215 ------- .../notaDeDebitoDeFactura3.yaml | 545 ----------------- .../notaDeDebitoDeFactura5.yaml | 492 ---------------- .../Group3Test/factura1Con7Items.yaml | 536 ----------------- .../Group3Test/factura2Con2Items.yaml | 271 --------- .../Group3Test/factura3Con5Items.yaml | 430 -------------- .../Group3Test/factura4Con4Items.yaml | 377 ------------ .../Group3Test/factura5Con3Items.yaml | 324 ----------- .../Group4Test/factura1Con2Items.yaml | 282 --------- .../Group4Test/factura2Con2Items.yaml | 282 --------- .../Group4Test/factura3Con4Items.yaml | 388 ------------- .../Group4Test/factura4Con3Items.yaml | 347 ----------- .../Group4Test/factura5Con5Items.yaml | 441 -------------- .../Group4Test/notaDeCreditoDeFactura2.yaml | 268 --------- .../Group4Test/notaDeCreditoDeFactura3.yaml | 321 ---------- .../Group4Test/notaDeCreditoDeFactura5.yaml | 427 -------------- .../Group4Test/notaDeDebitoDeFactura2.yaml | 268 --------- .../Group4Test/notaDeDebitoDeFactura3.yaml | 321 ---------- .../Group4Test/notaDeDebitoDeFactura5.yaml | 427 -------------- .../Group5Test/factura1Con5Items.yaml | 506 ---------------- .../Group5Test/notaDeCreditoDeFactura1.yaml | 503 ---------------- .../Group5Test/notaDeDebitoDeFactura2.yaml | 503 ---------------- .../Group6Test/factura1Con5Items.yaml | 449 -------------- .../Group6Test/notaDeCreditoDeFactura1.yaml | 427 -------------- .../Group6Test/notaDeDebitoDeFactura1.yaml | 427 -------------- .../Group7Test/factura1Con5Items.yaml | 506 ---------------- .../Group7Test/notaDeCreditoDeFactura1.yaml | 503 ---------------- .../Group7Test/notaDeDebitoDeFactura2.yaml | 503 ---------------- .../isc_aplicacionAlMontoFijo.yaml | 292 ---------- .../CreditNoteIscTest/isc_sistemaAlValor.yaml | 292 ---------- ...isc_sistemaDePreciosDeVentalAlPublico.yaml | 292 ---------- .../ordenDeCompra.yaml | 272 --------- .../CreditNoteTest/MinData_RUC.yaml | 268 --------- .../debitnote/DebitNoteTest/MinData_RUC.yaml | 268 --------- .../DespatchAdviceTest/minData.yaml | 144 ----- .../InvoiceAnticiposTest/minAnticipos.yaml | 296 ---------- .../descuentoGlobal.yaml | 229 -------- .../descuentoGlobal_tipo02.yaml | 229 -------- .../descuentoGlobal_tipo03.yaml | 229 -------- .../InvoiceDetraccionTest/detraccion.yaml | 239 -------- .../direccionEntregaFull.yaml | 300 ---------- .../direccionEntregaMin.yaml | 284 --------- .../documentoRelacionado.yaml | 281 --------- .../conFechaVencimiento.yaml | 273 --------- .../InvoiceFormaPagoTest/conFormaPago.yaml | 288 --------- .../InvoiceFormaPagoTest/sinFormaPago.yaml | 271 --------- .../invoice/InvoiceGuiasTest/guiaSerieT.yaml | 277 --------- .../isc_aplicacionAlMontoFijo.yaml | 295 ---------- .../InvoiceIscTest/isc_mixedTipoIgv.yaml | 519 ----------------- .../isc_precioConImpuestos.yaml | 342 ----------- .../InvoiceIscTest/isc_sistemaAlValor.yaml | 295 ---------- ...isc_sistemaDePreciosDeVentalAlPublico.yaml | 295 ---------- .../with-precioUnitario-ICB.yaml | 241 -------- .../with-precioUnitario-conImpuestos-ICB.yaml | 241 -------- .../with-precioUnitario.yaml | 218 ------- .../with-precioUnitarioConImpuestos.yaml | 218 ------- .../invoice/InvoiceMoneda/customMoneda.yaml | 218 ------- .../ordenDeCompra.yaml | 275 --------- .../InvoicePercepcionTest/percepcion.yaml | 237 -------- .../customClienteDireccionAndContacto.yaml | 301 ---------- .../InvoiceTest/customCodigoLocal.yaml | 275 --------- .../InvoiceTest/customFechaEmision.yaml | 273 --------- .../invoice/InvoiceTest/customFirmante.yaml | 271 --------- .../customProveedorDireccionAndContacto.yaml | 296 ---------- .../InvoiceTest/customUnidadMedida.yaml | 271 --------- .../e2e/renderer/invoice/InvoiceTest/icb.yaml | 306 ---------- ...nvoice_pr_EXONERADO_OPERACION_ONEROSA.yaml | 218 ------- ...e_pr_EXONERADO_TRANSFERENCIA_GRATUITA.yaml | 218 ------- .../invoice_pr_EXPORTACION.yaml | 217 ------- .../invoice_pr_GRAVADO_BONIFICACIONES.yaml | 218 ------- .../invoice_pr_GRAVADO_IVAP.yaml | 220 ------- .../invoice_pr_GRAVADO_OPERACION_ONEROSA.yaml | 218 ------- .../invoice_pr_GRAVADO_RETIRO.yaml | 218 ------- ...nvoice_pr_GRAVADO_RETIRO_POR_DONACION.yaml | 218 ------- ...ADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml | 218 ------- .../invoice_pr_GRAVADO_RETIRO_POR_PREMIO.yaml | 218 ------- ...oice_pr_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml | 218 ------- ...invoice_pr_INAFECTO_OPERACION_ONEROSA.yaml | 218 ------- .../invoice_pr_INAFECTO_RETIRO.yaml | 218 ------- ...e_pr_INAFECTO_RETIRO_POR_BONIFICACION.yaml | 218 ------- ...NAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml | 218 ------- ..._INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml | 218 ------- ...invoice_pr_INAFECTO_RETIRO_POR_PREMIO.yaml | 218 ------- ...ice_pr_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml | 218 ------- ...ce_pr_icb_EXONERADO_OPERACION_ONEROSA.yaml | 241 -------- ..._icb_EXONERADO_TRANSFERENCIA_GRATUITA.yaml | 241 -------- .../invoice_pr_icb_EXPORTACION.yaml | 240 -------- ...invoice_pr_icb_GRAVADO_BONIFICACIONES.yaml | 241 -------- .../invoice_pr_icb_GRAVADO_IVAP.yaml | 243 -------- ...oice_pr_icb_GRAVADO_OPERACION_ONEROSA.yaml | 241 -------- .../invoice_pr_icb_GRAVADO_RETIRO.yaml | 241 -------- ...ce_pr_icb_GRAVADO_RETIRO_POR_DONACION.yaml | 241 -------- ...ADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml | 241 -------- ...oice_pr_icb_GRAVADO_RETIRO_POR_PREMIO.yaml | 241 -------- ..._pr_icb_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml | 241 -------- ...ice_pr_icb_INAFECTO_OPERACION_ONEROSA.yaml | 241 -------- .../invoice_pr_icb_INAFECTO_RETIRO.yaml | 241 -------- ..._icb_INAFECTO_RETIRO_POR_BONIFICACION.yaml | 241 -------- ...NAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml | 241 -------- ..._INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml | 241 -------- ...ice_pr_icb_INAFECTO_RETIRO_POR_PREMIO.yaml | 241 -------- ...pr_icb_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml | 241 -------- ...r_icb_isc_EXONERADO_OPERACION_ONEROSA.yaml | 241 -------- ..._isc_EXONERADO_TRANSFERENCIA_GRATUITA.yaml | 241 -------- .../invoice_pr_icb_isc_EXPORTACION.yaml | 240 -------- ...ice_pr_icb_isc_GRAVADO_BONIFICACIONES.yaml | 241 -------- ..._pr_icb_isc_GRAVADO_OPERACION_ONEROSA.yaml | 265 --------- .../invoice_pr_icb_isc_GRAVADO_RETIRO.yaml | 241 -------- ...r_icb_isc_GRAVADO_RETIRO_POR_DONACION.yaml | 241 -------- ...ADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml | 241 -------- ..._pr_icb_isc_GRAVADO_RETIRO_POR_PREMIO.yaml | 241 -------- ...icb_isc_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml | 241 -------- ...pr_icb_isc_INAFECTO_OPERACION_ONEROSA.yaml | 241 -------- .../invoice_pr_icb_isc_INAFECTO_RETIRO.yaml | 241 -------- ..._isc_INAFECTO_RETIRO_POR_BONIFICACION.yaml | 241 -------- ...NAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml | 241 -------- ..._INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml | 241 -------- ...pr_icb_isc_INAFECTO_RETIRO_POR_PREMIO.yaml | 241 -------- ...cb_isc_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml | 241 -------- ...nvoice_pu_EXONERADO_OPERACION_ONEROSA.yaml | 218 ------- ...e_pu_EXONERADO_TRANSFERENCIA_GRATUITA.yaml | 218 ------- .../invoice_pu_EXPORTACION.yaml | 217 ------- .../invoice_pu_GRAVADO_BONIFICACIONES.yaml | 218 ------- .../invoice_pu_GRAVADO_IVAP.yaml | 220 ------- .../invoice_pu_GRAVADO_OPERACION_ONEROSA.yaml | 218 ------- .../invoice_pu_GRAVADO_RETIRO.yaml | 218 ------- ...nvoice_pu_GRAVADO_RETIRO_POR_DONACION.yaml | 218 ------- ...ADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml | 218 ------- .../invoice_pu_GRAVADO_RETIRO_POR_PREMIO.yaml | 218 ------- ...oice_pu_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml | 218 ------- ...invoice_pu_INAFECTO_OPERACION_ONEROSA.yaml | 218 ------- .../invoice_pu_INAFECTO_RETIRO.yaml | 218 ------- ...e_pu_INAFECTO_RETIRO_POR_BONIFICACION.yaml | 218 ------- ...NAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml | 218 ------- ..._INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml | 218 ------- ...invoice_pu_INAFECTO_RETIRO_POR_PREMIO.yaml | 218 ------- ...ice_pu_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml | 218 ------- .../PerceptionTest/perception_simple.yaml | 121 ---- .../RetentionTest/retention_simple.yaml | 121 ---- .../summaryDocuments.yaml | 190 ------ .../VoidedDocumentsTest/voidedDocument.yaml | 98 ---- ...dedDocument_autoGeneratedFechaEmision.yaml | 98 ---- ...Document_autoGeneratedTipoComprobante.yaml | 98 ---- 175 files changed, 2 insertions(+), 50010 deletions(-) create mode 100644 quarkus-extension/integration-tests/src/test/resources/.gitignore delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura1Con3Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura2Con2Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura3Con1Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura4Con5Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura5Con4Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura2.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura3.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura4.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura2.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura3.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura4.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura1Con1Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura2Con4Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura3Con7Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura4Con5Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura5Con6Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura1.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura3.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura5.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura1.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura3.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura5.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura1Con1Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura2Con4Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura3Con7Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura4Con5Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura5Con6Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura1.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura3.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura5.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura1.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura3.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura5.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura1Con7Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura2Con2Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura3Con5Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura4Con4Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura5Con3Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura1Con2Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura2Con2Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura3Con4Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura4Con3Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura5Con5Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura2.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura3.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura5.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura2.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura3.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura5.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/factura1Con5Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeCreditoDeFactura1.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeDebitoDeFactura2.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/factura1Con5Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeCreditoDeFactura1.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeDebitoDeFactura1.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/factura1Con5Items.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeCreditoDeFactura1.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeDebitoDeFactura2.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_aplicacionAlMontoFijo.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaAlValor.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest/ordenDeCompra.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteTest/MinData_RUC.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/debitnote/DebitNoteTest/MinData_RUC.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/despatchadvice/DespatchAdviceTest/minData.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceAnticiposTest/minAnticipos.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo02.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo03.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDetraccionTest/detraccion.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaFull.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaMin.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest/documentoRelacionado.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFechaVencimientoTest/conFechaVencimiento.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/conFormaPago.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/sinFormaPago.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceGuiasTest/guiaSerieT.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_aplicacionAlMontoFijo.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_mixedTipoIgv.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_precioConImpuestos.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaAlValor.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-ICB.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-conImpuestos-ICB.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitarioConImpuestos.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceMoneda/customMoneda.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceOrdeDeCompraTest/ordenDeCompra.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoicePercepcionTest/percepcion.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customClienteDireccionAndContacto.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customCodigoLocal.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFechaEmision.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFirmante.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customProveedorDireccionAndContacto.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customUnidadMedida.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/icb.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_OPERACION_ONEROSA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_TRANSFERENCIA_GRATUITA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXPORTACION.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_BONIFICACIONES.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_IVAP.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_OPERACION_ONEROSA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_DONACION.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PREMIO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_OPERACION_ONEROSA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_BONIFICACION.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PREMIO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_OPERACION_ONEROSA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_TRANSFERENCIA_GRATUITA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXPORTACION.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_BONIFICACIONES.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_IVAP.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_OPERACION_ONEROSA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_DONACION.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PREMIO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_OPERACION_ONEROSA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_BONIFICACION.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PREMIO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_OPERACION_ONEROSA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_TRANSFERENCIA_GRATUITA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXPORTACION.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_BONIFICACIONES.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_OPERACION_ONEROSA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_DONACION.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PREMIO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_OPERACION_ONEROSA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_BONIFICACION.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PREMIO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_OPERACION_ONEROSA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_TRANSFERENCIA_GRATUITA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXPORTACION.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_BONIFICACIONES.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_IVAP.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_OPERACION_ONEROSA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_DONACION.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PREMIO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_OPERACION_ONEROSA.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_BONIFICACION.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PREMIO.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/perception/PerceptionTest/perception_simple.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/retention/RetentionTest/retention_simple.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/summarydocuments/SummaryDocumentsTest/summaryDocuments.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedFechaEmision.yaml delete mode 100644 quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedTipoComprobante.yaml diff --git a/core/src/test/java/e2e/AbstractTest.java b/core/src/test/java/e2e/AbstractTest.java index 5ad65a20..50446d6c 100644 --- a/core/src/test/java/e2e/AbstractTest.java +++ b/core/src/test/java/e2e/AbstractTest.java @@ -99,7 +99,7 @@ public void writeYaml(String kind, Object input, String snapshotFilename) throws String snapshotFileContent = Files.readString(Paths.get(getClass().getClassLoader().getResource(rootDir + "/" + snapshotFilename).toURI())); - Path directoryPath = Paths.get("target", "openubl", "testcases").resolve(rootDir); + Path directoryPath = Paths.get("../quarkus-extension/integration-tests/src/test/resources").resolve(rootDir); Files.createDirectories(directoryPath); Path filePath = directoryPath.resolve(snapshotFilename.replaceAll(".xml", "") + ".yaml"); diff --git a/quarkus-extension/integration-tests/src/test/resources/.gitignore b/quarkus-extension/integration-tests/src/test/resources/.gitignore new file mode 100644 index 00000000..4bc47c90 --- /dev/null +++ b/quarkus-extension/integration-tests/src/test/resources/.gitignore @@ -0,0 +1 @@ +/e2e/ diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura1Con3Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura1Con3Items.yaml deleted file mode 100644 index 087b1c52..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura1Con3Items.yaml +++ /dev/null @@ -1,324 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF11" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 252.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 252.000000000000 - gravadoBaseImponible: 1400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 1652.00 - importeSinImpuestos: 1400 - importeConImpuestos: 1652.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF11-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 252.00 - - 1400.00 - 252.00 - - S - - 1000 - IGV - VAT - - - - - - 1400.00 - 1652.00 - 0 - 0 - 1652.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura2Con2Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura2Con2Items.yaml deleted file mode 100644 index 676a50e6..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura2Con2Items.yaml +++ /dev/null @@ -1,271 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF11" - numero: 2 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 90.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 90.000000000000 - gravadoBaseImponible: 500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 590.00 - importeSinImpuestos: 500 - importeConImpuestos: 590.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF11-2 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 90.00 - - 500.00 - 90.00 - - S - - 1000 - IGV - VAT - - - - - - 500.00 - 590.00 - 0 - 0 - 590.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura3Con1Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura3Con1Items.yaml deleted file mode 100644 index a2034b87..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura3Con1Items.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF11" - numero: 3 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 18.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 18.000000000000 - gravadoBaseImponible: 100 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 118.00 - importeSinImpuestos: 100 - importeConImpuestos: 118.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF11-3 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 18.00 - - 100.00 - 18.00 - - S - - 1000 - IGV - VAT - - - - - - 100.00 - 118.00 - 0 - 0 - 118.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura4Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura4Con5Items.yaml deleted file mode 100644 index c31f4dd2..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura4Con5Items.yaml +++ /dev/null @@ -1,430 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF11" - numero: 4 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 990.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 990.000000000000 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 472.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 288.00 - igvBaseImponible: 1600 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 288.00 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 590.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 450.00 - igvBaseImponible: 2500 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 450.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 6490.00 - importeSinImpuestos: 5500 - importeConImpuestos: 6490.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF11-4 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 990.00 - - 5500.00 - 990.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 6490.00 - 0 - 0 - 6490.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 472.00 - 01 - - - - 288.00 - - 1600.00 - 288.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 590.00 - 01 - - - - 450.00 - - 2500.00 - 450.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura5Con4Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura5Con4Items.yaml deleted file mode 100644 index 75aa42f3..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/factura5Con4Items.yaml +++ /dev/null @@ -1,377 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF11" - numero: 5 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 540.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 540.000000000000 - gravadoBaseImponible: 3000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 472.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 288.00 - igvBaseImponible: 1600 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 288.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 3540.00 - importeSinImpuestos: 3000 - importeConImpuestos: 3540.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF11-5 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 540.00 - - 3000.00 - 540.00 - - S - - 1000 - IGV - VAT - - - - - - 3000.00 - 3540.00 - 0 - 0 - 3540.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 472.00 - 01 - - - - 288.00 - - 1600.00 - 288.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura2.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura2.yaml deleted file mode 100644 index a4bc78c6..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura2.yaml +++ /dev/null @@ -1,268 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF11" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 90.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 90.00 - gravadoBaseImponible: 500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF11-2" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 590.00 - importeSinImpuestos: 500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF11-1 - 2019-12-24 - PEN - - FF11-2 - 01 - - - - - FF11-2 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 90.00 - - 500.00 - 90.00 - - S - - 1000 - IGV - VAT - - - - - - 500.00 - 590.00 - 590.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura3.yaml deleted file mode 100644 index 0791af39..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura3.yaml +++ /dev/null @@ -1,215 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF11" - numero: 2 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 18.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 18.00 - gravadoBaseImponible: 100 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF11-3" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 118.00 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF11-2 - 2019-12-24 - PEN - - FF11-3 - 01 - - - - - FF11-3 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 18.00 - - 100.00 - 18.00 - - S - - 1000 - IGV - VAT - - - - - - 100.00 - 118.00 - 118.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura4.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura4.yaml deleted file mode 100644 index 8a1d78d3..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeCreditoDeFactura4.yaml +++ /dev/null @@ -1,427 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF11" - numero: 3 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 990.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 990.00 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 472.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 288.00 - igvBaseImponible: 1600 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 288.00 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 590.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 450.00 - igvBaseImponible: 2500 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 450.00 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF11-4" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 6490.00 - importeSinImpuestos: 5500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF11-3 - 2019-12-24 - PEN - - FF11-4 - 01 - - - - - FF11-4 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 990.00 - - 5500.00 - 990.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 6490.00 - 6490.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 472.00 - 01 - - - - 288.00 - - 1600.00 - 288.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 590.00 - 01 - - - - 450.00 - - 2500.00 - 450.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura2.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura2.yaml deleted file mode 100644 index 2d883801..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura2.yaml +++ /dev/null @@ -1,268 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF11" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 90.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 90.00 - gravadoBaseImponible: 500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF11-2" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 590.00 - importeSinImpuestos: 500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF11-1 - 2019-12-24 - PEN - - FF11-2 - 01 - - - - - FF11-2 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 90.00 - - 500.00 - 90.00 - - S - - 1000 - IGV - VAT - - - - - - 500.00 - 590.00 - 590.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura3.yaml deleted file mode 100644 index 2327a9a0..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura3.yaml +++ /dev/null @@ -1,215 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF11" - numero: 2 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 18.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 18.00 - gravadoBaseImponible: 100 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF11-3" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 118.00 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF11-2 - 2019-12-24 - PEN - - FF11-3 - 01 - - - - - FF11-3 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 18.00 - - 100.00 - 18.00 - - S - - 1000 - IGV - VAT - - - - - - 100.00 - 118.00 - 118.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura4.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura4.yaml deleted file mode 100644 index d0298f0e..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group1Test/notaDeDebitoDeFactura4.yaml +++ /dev/null @@ -1,427 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF11" - numero: 3 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 990.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 990.00 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 472.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 288.00 - igvBaseImponible: 1600 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 288.00 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 590.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 450.00 - igvBaseImponible: 2500 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 450.00 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF11-4" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 6490.00 - importeSinImpuestos: 5500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF11-3 - 2019-12-24 - PEN - - FF11-4 - 01 - - - - - FF11-4 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 990.00 - - 5500.00 - 990.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 6490.00 - 6490.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 472.00 - 01 - - - - 288.00 - - 1600.00 - 288.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 590.00 - 01 - - - - 450.00 - - 2500.00 - 450.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura1Con1Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura1Con1Items.yaml deleted file mode 100644 index 56313464..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura1Con1Items.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 100 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura2Con4Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura2Con4Items.yaml deleted file mode 100644 index 6dfedba8..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura2Con4Items.yaml +++ /dev/null @@ -1,389 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 2 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 100 - gratuitoImporte: 0 - gratuitoBaseImponible: 2900 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-2 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - 2900.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura3Con7Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura3Con7Items.yaml deleted file mode 100644 index 2bcc35e1..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura3Con7Items.yaml +++ /dev/null @@ -1,548 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 3 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 100 - gratuitoImporte: 0 - gratuitoBaseImponible: 13900 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item6" - unidadMedida: "NIU" - cantidad: 6 - precio: 0 - precioConImpuestos: false - precioReferencia: 600 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 3600 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 3600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item7" - unidadMedida: "NIU" - cantidad: 7 - precio: 0 - precioConImpuestos: false - precioReferencia: 700 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 4900 - igvTipo: "36" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 4900 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-3 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - 13900.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 6 - 6 - 3600.00 - - - 600.00 - 02 - - - - 0.00 - - 3600.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 7 - 7 - 4900.00 - - - 700.00 - 02 - - - - 0.00 - - 4900.00 - 0.00 - - S - 0.00 - 36 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura4Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura4Con5Items.yaml deleted file mode 100644 index 4f70d5ce..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura4Con5Items.yaml +++ /dev/null @@ -1,442 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 4 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 100 - gratuitoImporte: 0 - gratuitoBaseImponible: 5400 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-4 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - 5400.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura5Con6Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura5Con6Items.yaml deleted file mode 100644 index b978093e..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/factura5Con6Items.yaml +++ /dev/null @@ -1,495 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 5 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 100 - gratuitoImporte: 0 - gratuitoBaseImponible: 9000 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item6" - unidadMedida: "NIU" - cantidad: 6 - precio: 0 - precioConImpuestos: false - precioReferencia: 600 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 3600 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 3600 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-5 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - 9000.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 6 - 6 - 3600.00 - - - 600.00 - 02 - - - - 0.00 - - 3600.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura1.yaml deleted file mode 100644 index cebc26e1..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura1.yaml +++ /dev/null @@ -1,215 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 100 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF12-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 100 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-1 - 2019-12-24 - PEN - - FF12-1 - 01 - - - - - FF12-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - - 100.00 - 100.00 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura3.yaml deleted file mode 100644 index 221d4b9b..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura3.yaml +++ /dev/null @@ -1,545 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 2 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 100 - gratuitoImporte: 0 - gratuitoBaseImponible: 13900 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item6" - unidadMedida: "NIU" - cantidad: 6 - precio: 0 - precioConImpuestos: false - precioReferencia: 600 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 3600 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 3600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item7" - unidadMedida: "NIU" - cantidad: 7 - precio: 0 - precioConImpuestos: false - precioReferencia: 700 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 4900 - igvTipo: "36" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 4900 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF12-3" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 100 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-2 - 2019-12-24 - PEN - - FF12-3 - 01 - - - - - FF12-3 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - 13900.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 6 - 6 - 3600.00 - - - 600.00 - 02 - - - - 0.00 - - 3600.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 7 - 7 - 4900.00 - - - 700.00 - 02 - - - - 0.00 - - 4900.00 - 0.00 - - S - 0.00 - 36 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura5.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura5.yaml deleted file mode 100644 index fc70829f..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeCreditoDeFactura5.yaml +++ /dev/null @@ -1,439 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 3 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 100 - gratuitoImporte: 0 - gratuitoBaseImponible: 5400 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF12-5" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 100 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-3 - 2019-12-24 - PEN - - FF12-5 - 01 - - - - - FF12-5 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - 5400.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura1.yaml deleted file mode 100644 index 9f366856..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura1.yaml +++ /dev/null @@ -1,215 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 100 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF12-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 100 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-1 - 2019-12-24 - PEN - - FF12-1 - 01 - - - - - FF12-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - - 100.00 - 100.00 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura3.yaml deleted file mode 100644 index 1c9c3160..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura3.yaml +++ /dev/null @@ -1,545 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 2 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 100 - gratuitoImporte: 0 - gratuitoBaseImponible: 13900 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item6" - unidadMedida: "NIU" - cantidad: 6 - precio: 0 - precioConImpuestos: false - precioReferencia: 600 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 3600 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 3600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item7" - unidadMedida: "NIU" - cantidad: 7 - precio: 0 - precioConImpuestos: false - precioReferencia: 700 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 4900 - igvTipo: "36" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 4900 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF12-3" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 100 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-2 - 2019-12-24 - PEN - - FF12-3 - 01 - - - - - FF12-3 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - 13900.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 6 - 6 - 3600.00 - - - 600.00 - 02 - - - - 0.00 - - 3600.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 7 - 7 - 4900.00 - - - 700.00 - 02 - - - - 0.00 - - 4900.00 - 0.00 - - S - 0.00 - 36 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura5.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura5.yaml deleted file mode 100644 index 1f01a3bd..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2ExoneradoTest/notaDeDebitoDeFactura5.yaml +++ /dev/null @@ -1,492 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 3 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 100 - gratuitoImporte: 0 - gratuitoBaseImponible: 9000 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item6" - unidadMedida: "NIU" - cantidad: 6 - precio: 0 - precioConImpuestos: false - precioReferencia: 600 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 3600 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 3600 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF12-5" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 100 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-3 - 2019-12-24 - PEN - - FF12-5 - 01 - - - - - FF12-5 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - 9000.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 6 - 6 - 3600.00 - - - 600.00 - 02 - - - - 0.00 - - 3600.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura1Con1Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura1Con1Items.yaml deleted file mode 100644 index cc41a5e4..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura1Con1Items.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 100 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura2Con4Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura2Con4Items.yaml deleted file mode 100644 index 259dfa0e..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura2Con4Items.yaml +++ /dev/null @@ -1,389 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 2 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 100 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 2900 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-2 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - 2900.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura3Con7Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura3Con7Items.yaml deleted file mode 100644 index e5465024..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura3Con7Items.yaml +++ /dev/null @@ -1,548 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 3 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 100 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 13900 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item6" - unidadMedida: "NIU" - cantidad: 6 - precio: 0 - precioConImpuestos: false - precioReferencia: 600 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 3600 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 3600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item7" - unidadMedida: "NIU" - cantidad: 7 - precio: 0 - precioConImpuestos: false - precioReferencia: 700 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 4900 - igvTipo: "36" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 4900 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-3 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - 13900.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 6 - 6 - 3600.00 - - - 600.00 - 02 - - - - 0.00 - - 3600.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 7 - 7 - 4900.00 - - - 700.00 - 02 - - - - 0.00 - - 4900.00 - 0.00 - - S - 0.00 - 36 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura4Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura4Con5Items.yaml deleted file mode 100644 index d4b2bbb0..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura4Con5Items.yaml +++ /dev/null @@ -1,442 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 4 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 100 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 5400 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-4 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - 5400.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura5Con6Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura5Con6Items.yaml deleted file mode 100644 index b828ba6f..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/factura5Con6Items.yaml +++ /dev/null @@ -1,495 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 5 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 100 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 9000 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item6" - unidadMedida: "NIU" - cantidad: 6 - precio: 0 - precioConImpuestos: false - precioReferencia: 600 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 3600 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 3600 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-5 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - 9000.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 6 - 6 - 3600.00 - - - 600.00 - 02 - - - - 0.00 - - 3600.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura1.yaml deleted file mode 100644 index 08bb4bfe..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura1.yaml +++ /dev/null @@ -1,215 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 100 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF12-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 100 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-1 - 2019-12-24 - PEN - - FF12-1 - 01 - - - - - FF12-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - - 100.00 - 100.00 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura3.yaml deleted file mode 100644 index 9f32a08c..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura3.yaml +++ /dev/null @@ -1,545 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 2 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 100 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 13900 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item6" - unidadMedida: "NIU" - cantidad: 6 - precio: 0 - precioConImpuestos: false - precioReferencia: 600 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 3600 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 3600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item7" - unidadMedida: "NIU" - cantidad: 7 - precio: 0 - precioConImpuestos: false - precioReferencia: 700 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 4900 - igvTipo: "36" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 4900 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF12-3" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 100 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-2 - 2019-12-24 - PEN - - FF12-3 - 01 - - - - - FF12-3 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - 13900.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 6 - 6 - 3600.00 - - - 600.00 - 02 - - - - 0.00 - - 3600.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 7 - 7 - 4900.00 - - - 700.00 - 02 - - - - 0.00 - - 4900.00 - 0.00 - - S - 0.00 - 36 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura5.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura5.yaml deleted file mode 100644 index 14eb1266..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeCreditoDeFactura5.yaml +++ /dev/null @@ -1,439 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 3 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 100 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 5400 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF12-5" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 100 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-3 - 2019-12-24 - PEN - - FF12-5 - 01 - - - - - FF12-5 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - 5400.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura1.yaml deleted file mode 100644 index 7ba9a8f0..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura1.yaml +++ /dev/null @@ -1,215 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 100 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF12-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 100 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-1 - 2019-12-24 - PEN - - FF12-1 - 01 - - - - - FF12-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - - 100.00 - 100.00 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura3.yaml deleted file mode 100644 index 6bb63571..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura3.yaml +++ /dev/null @@ -1,545 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 2 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 100 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 13900 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item6" - unidadMedida: "NIU" - cantidad: 6 - precio: 0 - precioConImpuestos: false - precioReferencia: 600 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 3600 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 3600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item7" - unidadMedida: "NIU" - cantidad: 7 - precio: 0 - precioConImpuestos: false - precioReferencia: 700 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 4900 - igvTipo: "36" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 4900 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF12-3" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 100 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-2 - 2019-12-24 - PEN - - FF12-3 - 01 - - - - - FF12-3 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - 13900.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 6 - 6 - 3600.00 - - - 600.00 - 02 - - - - 0.00 - - 3600.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 7 - 7 - 4900.00 - - - 700.00 - 02 - - - - 0.00 - - 4900.00 - 0.00 - - S - 0.00 - 36 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura5.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura5.yaml deleted file mode 100644 index fe8b0b0f..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group2InafectoTest/notaDeDebitoDeFactura5.yaml +++ /dev/null @@ -1,492 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF12" - numero: 3 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 100 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 9000 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 400 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 900 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item6" - unidadMedida: "NIU" - cantidad: 6 - precio: 0 - precioConImpuestos: false - precioReferencia: 600 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 3600 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 3600 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF12-5" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 100 - importeSinImpuestos: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF12-3 - 2019-12-24 - PEN - - FF12-5 - 01 - - - - - FF12-5 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - 9000.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 100.00 - 100.00 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 6 - 6 - 3600.00 - - - 600.00 - 02 - - - - 0.00 - - 3600.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura1Con7Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura1Con7Items.yaml deleted file mode 100644 index ff1001ea..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura1Con7Items.yaml +++ /dev/null @@ -1,536 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF13" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 252.00 - gratuitoBaseImponible: 14000 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "11" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "12" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "13" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item6" - unidadMedida: "NIU" - cantidad: 6 - precio: 0 - precioConImpuestos: false - precioReferencia: 600 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 3600 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 3600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item7" - unidadMedida: "NIU" - cantidad: 7 - precio: 0 - precioConImpuestos: false - precioReferencia: 700 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 4900 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 4900 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF13-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 14000.00 - 252.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 18.00 - - S - 18.00 - 11 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 72.00 - - S - 18.00 - 12 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 162.00 - - S - 18.00 - 13 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 6 - 6 - 3600.00 - - - 600.00 - 02 - - - - 0.00 - - 3600.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 7 - 7 - 4900.00 - - - 700.00 - 02 - - - - 0.00 - - 4900.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura2Con2Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura2Con2Items.yaml deleted file mode 100644 index 4c6f27e9..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura2Con2Items.yaml +++ /dev/null @@ -1,271 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF13" - numero: 2 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 90.00 - gratuitoBaseImponible: 500 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "11" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "12" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF13-2 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 500.00 - 90.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 18.00 - - S - 18.00 - 11 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 72.00 - - S - 18.00 - 12 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura3Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura3Con5Items.yaml deleted file mode 100644 index aa706635..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura3Con5Items.yaml +++ /dev/null @@ -1,430 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF13" - numero: 3 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 252.00 - gratuitoBaseImponible: 5500 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "11" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "12" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "13" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 0 - precioConImpuestos: false - precioReferencia: 500 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 2500 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF13-3 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 5500.00 - 252.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 18.00 - - S - 18.00 - 11 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 72.00 - - S - 18.00 - 12 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 162.00 - - S - 18.00 - 13 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 5 - 2500.00 - - - 500.00 - 02 - - - - 0.00 - - 2500.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura4Con4Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura4Con4Items.yaml deleted file mode 100644 index e7a0fd59..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura4Con4Items.yaml +++ /dev/null @@ -1,377 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF13" - numero: 4 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 252.00 - gratuitoBaseImponible: 3000 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "11" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "12" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "13" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 0 - precioConImpuestos: false - precioReferencia: 400 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 1600 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF13-4 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 3000.00 - 252.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 18.00 - - S - 18.00 - 11 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 72.00 - - S - 18.00 - 12 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 162.00 - - S - 18.00 - 13 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 4 - 4 - 1600.00 - - - 400.00 - 02 - - - - 0.00 - - 1600.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura5Con3Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura5Con3Items.yaml deleted file mode 100644 index e786b849..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group3Test/factura5Con3Items.yaml +++ /dev/null @@ -1,324 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF13" - numero: 5 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 252.00 - gratuitoBaseImponible: 1400 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "11" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 200 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "12" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "13" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF13-5 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 1400.00 - 252.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 18.00 - - S - 18.00 - 11 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 2 - 2 - 400.00 - - - 200.00 - 02 - - - - 0.00 - - 400.00 - 72.00 - - S - 18.00 - 12 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 162.00 - - S - 18.00 - 13 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura1Con2Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura1Con2Items.yaml deleted file mode 100644 index b568b680..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura1Con2Items.yaml +++ /dev/null @@ -1,282 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF14" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 90.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 90.000000000000 - gravadoBaseImponible: 500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 490.00 - importeSinImpuestos: 500 - importeConImpuestos: 590.00 - anticipos: 0 - descuentos: 100 - anticipos: [] - descuentos: - - tipoDescuento: "03" - factor: 1 - monto: 100 - montoBase: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF14-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - false - 03 - 1.00 - 100.00 - 100.00 - - - 90.00 - - 500.00 - 90.00 - - S - - 1000 - IGV - VAT - - - - - - 500.00 - 590.00 - 100 - 0 - 490.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura2Con2Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura2Con2Items.yaml deleted file mode 100644 index 4504277d..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura2Con2Items.yaml +++ /dev/null @@ -1,282 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF14" - numero: 2 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 90.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 90.000000000000 - gravadoBaseImponible: 500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 490.00 - importeSinImpuestos: 500 - importeConImpuestos: 590.00 - anticipos: 0 - descuentos: 100 - anticipos: [] - descuentos: - - tipoDescuento: "03" - factor: 1 - monto: 100 - montoBase: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF14-2 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - false - 03 - 1.00 - 100.00 - 100.00 - - - 90.00 - - 500.00 - 90.00 - - S - - 1000 - IGV - VAT - - - - - - 500.00 - 590.00 - 100 - 0 - 490.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura3Con4Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura3Con4Items.yaml deleted file mode 100644 index a6085cb3..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura3Con4Items.yaml +++ /dev/null @@ -1,388 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF14" - numero: 3 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 540.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 540.000000000000 - gravadoBaseImponible: 3000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 472.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 288.00 - igvBaseImponible: 1600 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 288.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 3440.00 - importeSinImpuestos: 3000 - importeConImpuestos: 3540.00 - anticipos: 0 - descuentos: 100 - anticipos: [] - descuentos: - - tipoDescuento: "03" - factor: 1 - monto: 100 - montoBase: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF14-3 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - false - 03 - 1.00 - 100.00 - 100.00 - - - 540.00 - - 3000.00 - 540.00 - - S - - 1000 - IGV - VAT - - - - - - 3000.00 - 3540.00 - 100 - 0 - 3440.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 472.00 - 01 - - - - 288.00 - - 1600.00 - 288.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura4Con3Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura4Con3Items.yaml deleted file mode 100644 index 4dd13c9d..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura4Con3Items.yaml +++ /dev/null @@ -1,347 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF14" - numero: 4 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 90.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 90.000000000000 - gravadoBaseImponible: 500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 162.00 - gratuitoBaseImponible: 900 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 0 - precioConImpuestos: false - precioReferencia: 300 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "13" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 490.00 - importeSinImpuestos: 500 - importeConImpuestos: 590.00 - anticipos: 0 - descuentos: 100 - anticipos: [] - descuentos: - - tipoDescuento: "03" - factor: 1 - monto: 100 - montoBase: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF14-4 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - false - 03 - 1.00 - 100.00 - 100.00 - - - 90.00 - - 500.00 - 90.00 - - S - - 1000 - IGV - VAT - - - - - 900.00 - 162.00 - - S - - 9996 - GRA - FRE - - - - - - 500.00 - 590.00 - 100 - 0 - 490.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 300.00 - 02 - - - - 0.00 - - 900.00 - 162.00 - - S - 18.00 - 13 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura5Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura5Con5Items.yaml deleted file mode 100644 index 7faf8448..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/factura5Con5Items.yaml +++ /dev/null @@ -1,441 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF14" - numero: 5 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 990.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 990.000000000000 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 472.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 288.00 - igvBaseImponible: 1600 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 288.00 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 590.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 450.00 - igvBaseImponible: 2500 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 450.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 6390.00 - importeSinImpuestos: 5500 - importeConImpuestos: 6490.00 - anticipos: 0 - descuentos: 100 - anticipos: [] - descuentos: - - tipoDescuento: "03" - factor: 1 - monto: 100 - montoBase: 100 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF14-5 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - false - 03 - 1.00 - 100.00 - 100.00 - - - 990.00 - - 5500.00 - 990.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 6490.00 - 100 - 0 - 6390.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 472.00 - 01 - - - - 288.00 - - 1600.00 - 288.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 590.00 - 01 - - - - 450.00 - - 2500.00 - 450.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura2.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura2.yaml deleted file mode 100644 index b4a579a6..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura2.yaml +++ /dev/null @@ -1,268 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF14" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 90.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 90.00 - gravadoBaseImponible: 500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF14-2" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 590.00 - importeSinImpuestos: 500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF14-1 - 2019-12-24 - PEN - - FF14-2 - 01 - - - - - FF14-2 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 90.00 - - 500.00 - 90.00 - - S - - 1000 - IGV - VAT - - - - - - 500.00 - 590.00 - 590.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura3.yaml deleted file mode 100644 index 7fb1400e..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura3.yaml +++ /dev/null @@ -1,321 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF14" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 252.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 252.00 - gravadoBaseImponible: 1400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF14-3" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 1652.00 - importeSinImpuestos: 1400 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF14-1 - 2019-12-24 - PEN - - FF14-3 - 01 - - - - - FF14-3 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 252.00 - - 1400.00 - 252.00 - - S - - 1000 - IGV - VAT - - - - - - 1400.00 - 1652.00 - 1652.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura5.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura5.yaml deleted file mode 100644 index 52246821..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeCreditoDeFactura5.yaml +++ /dev/null @@ -1,427 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF14" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 990.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 990.00 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 472.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 288.00 - igvBaseImponible: 1600 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 288.00 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 590.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 450.00 - igvBaseImponible: 2500 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 450.00 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF14-5" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 6490.00 - importeSinImpuestos: 5500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF14-1 - 2019-12-24 - PEN - - FF14-5 - 01 - - - - - FF14-5 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 990.00 - - 5500.00 - 990.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 6490.00 - 6490.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 472.00 - 01 - - - - 288.00 - - 1600.00 - 288.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 590.00 - 01 - - - - 450.00 - - 2500.00 - 450.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura2.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura2.yaml deleted file mode 100644 index 85e43e37..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura2.yaml +++ /dev/null @@ -1,268 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF14" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 90.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 90.00 - gravadoBaseImponible: 500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF14-2" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 590.00 - importeSinImpuestos: 500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF14-1 - 2019-12-24 - PEN - - FF14-2 - 01 - - - - - FF14-2 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 90.00 - - 500.00 - 90.00 - - S - - 1000 - IGV - VAT - - - - - - 500.00 - 590.00 - 590.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura3.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura3.yaml deleted file mode 100644 index c0b4ff6b..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura3.yaml +++ /dev/null @@ -1,321 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF14" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 252.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 252.00 - gravadoBaseImponible: 1400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF14-3" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 1652.00 - importeSinImpuestos: 1400 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF14-1 - 2019-12-24 - PEN - - FF14-3 - 01 - - - - - FF14-3 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 252.00 - - 1400.00 - 252.00 - - S - - 1000 - IGV - VAT - - - - - - 1400.00 - 1652.00 - 1652.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura5.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura5.yaml deleted file mode 100644 index 18619f58..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group4Test/notaDeDebitoDeFactura5.yaml +++ /dev/null @@ -1,427 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF14" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 990.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 990.00 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 472.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 288.00 - igvBaseImponible: 1600 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 288.00 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 590.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 450.00 - igvBaseImponible: 2500 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 450.00 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF14-5" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 6490.00 - importeSinImpuestos: 5500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF14-1 - 2019-12-24 - PEN - - FF14-5 - 01 - - - - - FF14-5 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 990.00 - - 5500.00 - 990.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 6490.00 - 6490.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 472.00 - 01 - - - - 288.00 - - 1600.00 - 288.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 590.00 - 01 - - - - 450.00 - - 2500.00 - 450.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/factura1Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/factura1Con5Items.yaml deleted file mode 100644 index 6bafbaec..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/factura1Con5Items.yaml +++ /dev/null @@ -1,506 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF30" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 1639.0000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 1089.0000000000000 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 550.0 - iscBaseImponible: 5500 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 129.800 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 19.800 - igvBaseImponible: 110.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 10.0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 29.800 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 259.600 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 79.200 - igvBaseImponible: 440.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 40.0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 119.200 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 389.400 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 178.200 - igvBaseImponible: 990.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 90.0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 268.200 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 519.200 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 316.800 - igvBaseImponible: 1760.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 160.0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 476.800 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 649.000 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 495.000 - igvBaseImponible: 2750.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 250.0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 745.000 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 7139.000 - importeSinImpuestos: 5500 - importeConImpuestos: 7139.000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF30-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 1639.00 - - 5500.00 - 550.00 - - - 2000 - ISC - EXC - - - - - 5500.00 - 1089.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 7139.00 - 0 - 0 - 7139.00 - - - 1 - 1 - 100.00 - - - 129.80 - 01 - - - - 29.80 - - 100.00 - 10.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 110.00 - 19.80 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 259.60 - 01 - - - - 119.20 - - 400.00 - 40.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 440.00 - 79.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 389.40 - 01 - - - - 268.20 - - 900.00 - 90.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 990.00 - 178.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 519.20 - 01 - - - - 476.80 - - 1600.00 - 160.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 1760.00 - 316.80 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 649.00 - 01 - - - - 745.00 - - 2500.00 - 250.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 2750.00 - 495.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeCreditoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeCreditoDeFactura1.yaml deleted file mode 100644 index 0f862b9c..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeCreditoDeFactura1.yaml +++ /dev/null @@ -1,503 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF30" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 1639.000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 1089.000 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 550.0 - iscBaseImponible: 5500 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 129.800 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 19.800 - igvBaseImponible: 110.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 10.0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 29.800 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 259.600 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 79.200 - igvBaseImponible: 440.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 40.0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 119.200 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 389.400 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 178.200 - igvBaseImponible: 990.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 90.0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 268.200 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 519.200 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 316.800 - igvBaseImponible: 1760.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 160.0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 476.800 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 649.000 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 495.000 - igvBaseImponible: 2750.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 250.0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 745.000 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF30-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 7139.000 - importeSinImpuestos: 5500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF30-1 - 2019-12-24 - PEN - - FF30-1 - 01 - - - - - FF30-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 1639.00 - - 5500.00 - 550.00 - - - 2000 - ISC - EXC - - - - - 5500.00 - 1089.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 7139.00 - 7139.00 - - - 1 - 1 - 100.00 - - - 129.80 - 01 - - - - 29.80 - - 100.00 - 10.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 110.00 - 19.80 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 259.60 - 01 - - - - 119.20 - - 400.00 - 40.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 440.00 - 79.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 389.40 - 01 - - - - 268.20 - - 900.00 - 90.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 990.00 - 178.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 519.20 - 01 - - - - 476.80 - - 1600.00 - 160.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 1760.00 - 316.80 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 649.00 - 01 - - - - 745.00 - - 2500.00 - 250.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 2750.00 - 495.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeDebitoDeFactura2.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeDebitoDeFactura2.yaml deleted file mode 100644 index cf2d06a4..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group5Test/notaDeDebitoDeFactura2.yaml +++ /dev/null @@ -1,503 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF30" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 1639.000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 1089.000 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 550.0 - iscBaseImponible: 5500 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 129.800 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 19.800 - igvBaseImponible: 110.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 10.0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 29.800 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 259.600 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 79.200 - igvBaseImponible: 440.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 40.0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 119.200 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 389.400 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 178.200 - igvBaseImponible: 990.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 90.0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 268.200 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 519.200 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 316.800 - igvBaseImponible: 1760.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 160.0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 476.800 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 649.000 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 495.000 - igvBaseImponible: 2750.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 250.0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 745.000 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF30-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 7139.000 - importeSinImpuestos: 5500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF30-1 - 2019-12-24 - PEN - - FF30-1 - 01 - - - - - FF30-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 1639.00 - - 5500.00 - 550.00 - - - 2000 - ISC - EXC - - - - - 5500.00 - 1089.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 7139.00 - 7139.00 - - - 1 - 1 - 100.00 - - - 129.80 - 01 - - - - 29.80 - - 100.00 - 10.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 110.00 - 19.80 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 259.60 - 01 - - - - 119.20 - - 400.00 - 40.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 440.00 - 79.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 389.40 - 01 - - - - 268.20 - - 900.00 - 90.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 990.00 - 178.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 519.20 - 01 - - - - 476.80 - - 1600.00 - 160.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 1760.00 - 316.80 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 649.00 - 01 - - - - 745.00 - - 2500.00 - 250.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 2750.00 - 495.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/factura1Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/factura1Con5Items.yaml deleted file mode 100644 index 7df99d6d..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/factura1Con5Items.yaml +++ /dev/null @@ -1,449 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: - "2000": "COMPROBANTE DE PERCEPCION" - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF40" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 990.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 990.000000000000 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 472.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 288.00 - igvBaseImponible: 1600 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 288.00 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 590.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 450.00 - igvBaseImponible: 2500 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 450.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "2001" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 6490.00 - importeSinImpuestos: 5500 - importeConImpuestos: 6490.00 - anticipos: 0 - descuentos: 0 - percepcion: - tipo: "51" - montoBase: 5500 - porcentaje: 0.02 - monto: 110.00 - montoTotal: 5610.00 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF40-1 - 2019-12-24 - 01 - - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - Percepcion - 5610.00 - - - FormaPago - Contado - - - true - 51 - 0.02 - 110.00 - 5500.00 - - - 990.00 - - 5500.00 - 990.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 6490.00 - 0 - 0 - 6490.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 472.00 - 01 - - - - 288.00 - - 1600.00 - 288.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 590.00 - 01 - - - - 450.00 - - 2500.00 - 450.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeCreditoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeCreditoDeFactura1.yaml deleted file mode 100644 index d82bed47..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeCreditoDeFactura1.yaml +++ /dev/null @@ -1,427 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF40" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 990.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 990.00 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 472.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 288.00 - igvBaseImponible: 1600 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 288.00 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 590.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 450.00 - igvBaseImponible: 2500 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 450.00 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF40-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 6490.00 - importeSinImpuestos: 5500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF40-1 - 2019-12-24 - PEN - - FF40-1 - 01 - - - - - FF40-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 990.00 - - 5500.00 - 990.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 6490.00 - 6490.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 472.00 - 01 - - - - 288.00 - - 1600.00 - 288.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 590.00 - 01 - - - - 450.00 - - 2500.00 - 450.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeDebitoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeDebitoDeFactura1.yaml deleted file mode 100644 index 11c54235..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group6Test/notaDeDebitoDeFactura1.yaml +++ /dev/null @@ -1,427 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF40" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 990.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 990.00 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 72.00 - igvBaseImponible: 400 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 72.00 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 354.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 162.00 - igvBaseImponible: 900 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 162.00 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 472.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 288.00 - igvBaseImponible: 1600 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 288.00 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 590.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 450.00 - igvBaseImponible: 2500 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 450.00 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF40-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 6490.00 - importeSinImpuestos: 5500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF40-1 - 2019-12-24 - PEN - - FF40-1 - 01 - - - - - FF40-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 990.00 - - 5500.00 - 990.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 6490.00 - 6490.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 236.00 - 01 - - - - 72.00 - - 400.00 - 72.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 354.00 - 01 - - - - 162.00 - - 900.00 - 162.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 472.00 - 01 - - - - 288.00 - - 1600.00 - 288.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 590.00 - 01 - - - - 450.00 - - 2500.00 - 450.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/factura1Con5Items.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/factura1Con5Items.yaml deleted file mode 100644 index 684f9e81..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/factura1Con5Items.yaml +++ /dev/null @@ -1,506 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "USD" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF50" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 1639.0000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 1089.0000000000000 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 550.0 - iscBaseImponible: 5500 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 129.800 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 19.800 - igvBaseImponible: 110.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 10.0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 29.800 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 259.600 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 79.200 - igvBaseImponible: 440.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 40.0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 119.200 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 389.400 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 178.200 - igvBaseImponible: 990.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 90.0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 268.200 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 519.200 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 316.800 - igvBaseImponible: 1760.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 160.0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 476.800 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 649.000 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 495.000 - igvBaseImponible: 2750.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 250.0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 745.000 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 7139.000 - importeSinImpuestos: 5500 - importeConImpuestos: 7139.000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - FF50-1 - 2019-12-24 - 01 - USD - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 1639.00 - - 5500.00 - 550.00 - - - 2000 - ISC - EXC - - - - - 5500.00 - 1089.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 7139.00 - 0 - 0 - 7139.00 - - - 1 - 1 - 100.00 - - - 129.80 - 01 - - - - 29.80 - - 100.00 - 10.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 110.00 - 19.80 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 259.60 - 01 - - - - 119.20 - - 400.00 - 40.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 440.00 - 79.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 389.40 - 01 - - - - 268.20 - - 900.00 - 90.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 990.00 - 178.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 519.20 - 01 - - - - 476.80 - - 1600.00 - 160.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 1760.00 - 316.80 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 649.00 - 01 - - - - 745.00 - - 2500.00 - 250.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 2750.00 - 495.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeCreditoDeFactura1.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeCreditoDeFactura1.yaml deleted file mode 100644 index 6acd09b5..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeCreditoDeFactura1.yaml +++ /dev/null @@ -1,503 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "USD" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF50" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 1639.000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 1089.000 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 550.0 - iscBaseImponible: 5500 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 129.800 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 19.800 - igvBaseImponible: 110.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 10.0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 29.800 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 259.600 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 79.200 - igvBaseImponible: 440.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 40.0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 119.200 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 389.400 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 178.200 - igvBaseImponible: 990.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 90.0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 268.200 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 519.200 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 316.800 - igvBaseImponible: 1760.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 160.0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 476.800 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 649.000 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 495.000 - igvBaseImponible: 2750.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 250.0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 745.000 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "FF50-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 7139.000 - importeSinImpuestos: 5500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF50-1 - 2019-12-24 - USD - - FF50-1 - 01 - - - - - FF50-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 1639.00 - - 5500.00 - 550.00 - - - 2000 - ISC - EXC - - - - - 5500.00 - 1089.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 7139.00 - 7139.00 - - - 1 - 1 - 100.00 - - - 129.80 - 01 - - - - 29.80 - - 100.00 - 10.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 110.00 - 19.80 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 259.60 - 01 - - - - 119.20 - - 400.00 - 40.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 440.00 - 79.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 389.40 - 01 - - - - 268.20 - - 900.00 - 90.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 990.00 - 178.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 519.20 - 01 - - - - 476.80 - - 1600.00 - 160.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 1760.00 - 316.80 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 649.00 - 01 - - - - 745.00 - - 2500.00 - 250.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 2750.00 - 495.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeDebitoDeFactura2.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeDebitoDeFactura2.yaml deleted file mode 100644 index ea06822e..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/homologacion/Group7Test/notaDeDebitoDeFactura2.yaml +++ /dev/null @@ -1,503 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "USD" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FF50" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 1639.000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 1089.000 - gravadoBaseImponible: 5500 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 550.0 - iscBaseImponible: 5500 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 129.800 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 19.800 - igvBaseImponible: 110.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 10.0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 29.800 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 200 - precioConImpuestos: false - precioReferencia: 259.600 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 79.200 - igvBaseImponible: 440.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 40.0 - iscBaseImponible: 400 - iscTipo: "01" - totalImpuestos: 119.200 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 3 - precio: 300 - precioConImpuestos: false - precioReferencia: 389.400 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 178.200 - igvBaseImponible: 990.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 90.0 - iscBaseImponible: 900 - iscTipo: "01" - totalImpuestos: 268.200 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 4 - precio: 400 - precioConImpuestos: false - precioReferencia: 519.200 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 316.800 - igvBaseImponible: 1760.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 160.0 - iscBaseImponible: 1600 - iscTipo: "01" - totalImpuestos: 476.800 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 5 - precio: 500 - precioConImpuestos: false - precioReferencia: 649.000 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 495.000 - igvBaseImponible: 2750.0 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.1 - isc: 250.0 - iscBaseImponible: 2500 - iscTipo: "01" - totalImpuestos: 745.000 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "FF50-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "Homologacion" - totalImporte: - importe: 7139.000 - importeSinImpuestos: 5500 -snapshot: | - - - - - - - - 2.1 - 2.0 - FF50-1 - 2019-12-24 - USD - - FF50-1 - 01 - - - - - FF50-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 1639.00 - - 5500.00 - 550.00 - - - 2000 - ISC - EXC - - - - - 5500.00 - 1089.00 - - S - - 1000 - IGV - VAT - - - - - - 5500.00 - 7139.00 - 7139.00 - - - 1 - 1 - 100.00 - - - 129.80 - 01 - - - - 29.80 - - 100.00 - 10.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 110.00 - 19.80 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 400.00 - - - 259.60 - 01 - - - - 119.20 - - 400.00 - 40.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 440.00 - 79.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - - 3 - 3 - 900.00 - - - 389.40 - 01 - - - - 268.20 - - 900.00 - 90.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 990.00 - 178.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 300.00 - - - - 4 - 4 - 1600.00 - - - 519.20 - 01 - - - - 476.80 - - 1600.00 - 160.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 1760.00 - 316.80 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 400.00 - - - - 5 - 5 - 2500.00 - - - 649.00 - 01 - - - - 745.00 - - 2500.00 - 250.00 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 2750.00 - 495.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 500.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_aplicacionAlMontoFijo.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_aplicacionAlMontoFijo.yaml deleted file mode 100644 index b525a9c6..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_aplicacionAlMontoFijo.yaml +++ /dev/null @@ -1,292 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FC01" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 119.2000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 79.2000 - gravadoBaseImponible: 400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 40.00 - iscBaseImponible: 200 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 141.6000 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 43.2000 - igvBaseImponible: 240.00 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.20 - isc: 40.00 - iscBaseImponible: 200 - iscTipo: "02" - totalImpuestos: 83.2000 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "F001-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "mi sustento" - totalImporte: - importe: 519.2000 - importeSinImpuestos: 400 -snapshot: | - - - - - - - - 2.1 - 2.0 - FC01-1 - 2019-12-24 - PEN - - F001-1 - 01 - - - - - F001-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 119.20 - - 200.00 - 40.00 - - - 2000 - ISC - EXC - - - - - 400.00 - 79.20 - - S - - 1000 - IGV - VAT - - - - - - 400.00 - 519.20 - 519.20 - - - 1 - 2 - 200.00 - - - 141.60 - 01 - - - - 83.20 - - 200.00 - 40.00 - - 20.00 - 02 - - 2000 - ISC - EXC - - - - - 240.00 - 43.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaAlValor.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaAlValor.yaml deleted file mode 100644 index eaae393e..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaAlValor.yaml +++ /dev/null @@ -1,292 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FC01" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 112.1200 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 78.1200 - gravadoBaseImponible: 400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 34.00 - iscBaseImponible: 200 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 138.0600 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 42.1200 - igvBaseImponible: 234.00 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.17 - isc: 34.00 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 76.1200 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "F001-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "mi sustento" - totalImporte: - importe: 512.1200 - importeSinImpuestos: 400 -snapshot: | - - - - - - - - 2.1 - 2.0 - FC01-1 - 2019-12-24 - PEN - - F001-1 - 01 - - - - - F001-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 112.12 - - 200.00 - 34.00 - - - 2000 - ISC - EXC - - - - - 400.00 - 78.12 - - S - - 1000 - IGV - VAT - - - - - - 400.00 - 512.12 - 512.12 - - - 1 - 2 - 200.00 - - - 138.06 - 01 - - - - 76.12 - - 200.00 - 34.00 - - 17.00 - 01 - - 2000 - ISC - EXC - - - - - 234.00 - 42.12 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml deleted file mode 100644 index 5fe6b4f4..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml +++ /dev/null @@ -1,292 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FC01" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 95.6000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 75.6000 - gravadoBaseImponible: 400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 20.00 - iscBaseImponible: 200 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 129.8000 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 39.6000 - igvBaseImponible: 220.00 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.10 - isc: 20.00 - iscBaseImponible: 200 - iscTipo: "02" - totalImpuestos: 59.6000 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "F001-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "mi sustento" - totalImporte: - importe: 495.6000 - importeSinImpuestos: 400 -snapshot: | - - - - - - - - 2.1 - 2.0 - FC01-1 - 2019-12-24 - PEN - - F001-1 - 01 - - - - - F001-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 95.60 - - 200.00 - 20.00 - - - 2000 - ISC - EXC - - - - - 400.00 - 75.60 - - S - - 1000 - IGV - VAT - - - - - - 400.00 - 495.60 - 495.60 - - - 1 - 2 - 200.00 - - - 129.80 - 01 - - - - 59.60 - - 200.00 - 20.00 - - 10.00 - 02 - - 2000 - ISC - EXC - - - - - 220.00 - 39.60 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest/ordenDeCompra.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest/ordenDeCompra.yaml deleted file mode 100644 index b9a628c8..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteOrdenDeCompraTest/ordenDeCompra.yaml +++ /dev/null @@ -1,272 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FC01" - numero: 1 - ordenDeCompra: "123456" - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 360.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 360.00 - gravadoBaseImponible: 2000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "F001-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "mi sustento" - totalImporte: - importe: 2360.00 - importeSinImpuestos: 2000 -snapshot: | - - - - - - - - 2.1 - 2.0 - FC01-1 - 2019-12-24 - PEN - - F001-1 - 01 - - - - 123456 - - - - F001-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 360.00 - - 2000.00 - 360.00 - - S - - 1000 - IGV - VAT - - - - - - 2000.00 - 2360.00 - 2360.00 - - - 1 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteTest/MinData_RUC.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteTest/MinData_RUC.yaml deleted file mode 100644 index 57a3572e..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/creditnote/CreditNoteTest/MinData_RUC.yaml +++ /dev/null @@ -1,268 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "CreditNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FC01" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 360.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 360.00 - gravadoBaseImponible: 2000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - guias: [] - documentosRelacionados: [] - tipoNota: "01" - comprobanteAfectadoSerieNumero: "F001-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "mi sustento" - totalImporte: - importe: 2360.00 - importeSinImpuestos: 2000 -snapshot: | - - - - - - - - 2.1 - 2.0 - FC01-1 - 2019-12-24 - PEN - - F001-1 - 01 - - - - - F001-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 360.00 - - 2000.00 - 360.00 - - S - - 1000 - IGV - VAT - - - - - - 2000.00 - 2360.00 - 2360.00 - - - 1 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/debitnote/DebitNoteTest/MinData_RUC.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/debitnote/DebitNoteTest/MinData_RUC.yaml deleted file mode 100644 index c75e52a8..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/debitnote/DebitNoteTest/MinData_RUC.yaml +++ /dev/null @@ -1,268 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DebitNote" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "FD01" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 360.00 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 360.00 - gravadoBaseImponible: 2000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - guias: [] - documentosRelacionados: [] - tipoNota: "02" - comprobanteAfectadoSerieNumero: "F001-1" - comprobanteAfectadoTipo: "01" - sustentoDescripcion: "mi sustento" - totalImporte: - importe: 2360.00 - importeSinImpuestos: 2000 -snapshot: | - - - - - - - - 2.1 - 2.0 - FD01-1 - 2019-12-24 - PEN - - F001-1 - 01 - - - - - F001-1 - 01 - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - 360.00 - - 2000.00 - 360.00 - - S - - 1000 - IGV - VAT - - - - - - 2000.00 - 2360.00 - 2360.00 - - - 1 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/despatchadvice/DespatchAdviceTest/minData.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/despatchadvice/DespatchAdviceTest/minData.yaml deleted file mode 100644 index 3e01f956..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/despatchadvice/DespatchAdviceTest/minData.yaml +++ /dev/null @@ -1,144 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "DespatchAdvice" -input: - serie: "T001" - numero: 1 - fechaEmision: "2019-12-24" - tipoComprobante: "09" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - remitente: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - destinatario: - tipoDocumentoIdentidad: "1" - numeroDocumentoIdentidad: "12345678" - nombre: "mi cliente" - envio: - tipoTraslado: "18" - pesoTotal: 1 - pesoTotalUnidadMedida: "KG" - transbordoProgramado: false - tipoModalidadTraslado: "02" - fechaTraslado: "2019-12-24" - partida: - ubigeo: "010101" - direccion: "DireccionOrigen" - destino: - ubigeo: "020202" - direccion: "DireccionDestino" - detalles: - - unidadMedida: "KG" - cantidad: 0.5 - codigo: "123456" -snapshot: | - - - - - - - - 2.1 - 2.0 - T001-1 - 2019-12-24 - 09 - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - 12345678912 - - - 12345678912 - - - - - - - - - - 12345678 - - - - - - - - 1 - 18 - 1.000 - false - - 02 - - 2019-12-24 - - - - - 020202 - - DireccionDestino - - - - - 010101 - DireccionOrigen - - - - 1 - 0.5 - - 1 - - - - - 123456 - - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceAnticiposTest/minAnticipos.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceAnticiposTest/minAnticipos.yaml deleted file mode 100644 index 4f4c7d99..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceAnticiposTest/minAnticipos.yaml +++ /dev/null @@ -1,296 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 54.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 54.000000000000 - gravadoBaseImponible: 300 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 372.00 - importeSinImpuestos: 400 - importeConImpuestos: 472.00 - anticipos: 100 - descuentos: 0 - anticipos: - - tipo: "04" - comprobanteSerieNumero: "F001-2" - comprobanteTipo: "02" - monto: 100 - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - F001-2 - 02 - 1 - - - 12345678912 - - - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 1 - 100 - - - false - 04 - 1 - 100 - 100 - - - 54.00 - - 300.00 - 54.00 - - S - - 1000 - IGV - VAT - - - - - - 400.00 - 472.00 - 0 - 100 - 372.00 - - - 1 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal.yaml deleted file mode 100644 index 6d0b34fa..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal.yaml +++ /dev/null @@ -1,229 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 18.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 18.000000000000 - gravadoBaseImponible: 100 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 68.00 - importeSinImpuestos: 100 - importeConImpuestos: 118.00 - anticipos: 0 - descuentos: 50 - anticipos: [] - descuentos: - - tipoDescuento: "03" - factor: 1 - monto: 50 - montoBase: 50 -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - false - 03 - 1.00 - 50.00 - 50.00 - - - 18.00 - - 100.00 - 18.00 - - S - - 1000 - IGV - VAT - - - - - - 100.00 - 118.00 - 50 - 0 - 68.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo02.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo02.yaml deleted file mode 100644 index f725f9cd..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo02.yaml +++ /dev/null @@ -1,229 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 9.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 9.000000000000 - gravadoBaseImponible: 50 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 59.00 - importeSinImpuestos: 50 - importeConImpuestos: 59.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: - - tipoDescuento: "02" - factor: 1 - monto: 50 - montoBase: 50 -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - false - 02 - 1.00 - 50.00 - 50.00 - - - 9.00 - - 50.00 - 9.00 - - S - - 1000 - IGV - VAT - - - - - - 50.00 - 59.00 - 0 - 0 - 59.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo03.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo03.yaml deleted file mode 100644 index 6d0b34fa..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDescuentosTest/descuentoGlobal_tipo03.yaml +++ /dev/null @@ -1,229 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 18.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 18.000000000000 - gravadoBaseImponible: 100 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 68.00 - importeSinImpuestos: 100 - importeConImpuestos: 118.00 - anticipos: 0 - descuentos: 50 - anticipos: [] - descuentos: - - tipoDescuento: "03" - factor: 1 - monto: 50 - montoBase: 50 -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - false - 03 - 1.00 - 50.00 - 50.00 - - - 18.00 - - 100.00 - 18.00 - - S - - 1000 - IGV - VAT - - - - - - 100.00 - 118.00 - 50 - 0 - 68.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDetraccionTest/detraccion.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDetraccionTest/detraccion.yaml deleted file mode 100644 index 7a58b185..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDetraccionTest/detraccion.yaml +++ /dev/null @@ -1,239 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: - "2006": "OPERACION SUJETA A DETRACCION" - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 144.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 144.000000000000 - gravadoBaseImponible: 800 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 4 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 144.00 - igvBaseImponible: 800 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 800 - iscTipo: "01" - totalImpuestos: 144.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "1001" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 944.00 - importeSinImpuestos: 800 - importeConImpuestos: 944.00 - anticipos: 0 - descuentos: 0 - detraccion: - medioDePago: "001" - cuentaBancaria: "0004-3342343243" - tipoBienDetraido: "014" - porcentaje: 0.04 - monto: 37.76 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - Detraccion - 001 - - 0004-3342343243 - - - - Detraccion - 014 - 4.00 - 37.76 - - - FormaPago - Contado - - - 144.00 - - 800.00 - 144.00 - - S - - 1000 - IGV - VAT - - - - - - 800.00 - 944.00 - 0 - 0 - 944.00 - - - 1 - 4 - 800.00 - - - 236.00 - 01 - - - - 144.00 - - 800.00 - 144.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaFull.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaFull.yaml deleted file mode 100644 index cda778fb..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaFull.yaml +++ /dev/null @@ -1,300 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: - "2005": "VENTA REALIZADA POR EMISOR ITINERANTE" - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 72.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 72.000000000000 - gravadoBaseImponible: 400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 472.00 - importeSinImpuestos: 400 - importeConImpuestos: 472.00 - anticipos: 0 - descuentos: 0 - direccionEntrega: - ubigeo: "050101" - codigoLocal: "0101" - urbanizacion: "000000" - departamento: "Ayacucho" - provincia: "Huamanga" - distrito: "Jesus Nazareno" - direccion: "Jr. Las piedras 123" - codigoPais: "PE" - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - - - 050101 - 0101 - 000000 - Huamanga - Ayacucho - Jesus Nazareno - - - - - PE - - - - - - FormaPago - Contado - - - 72.00 - - 400.00 - 72.00 - - S - - 1000 - IGV - VAT - - - - - - 400.00 - 472.00 - 0 - 0 - 472.00 - - - 1 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaMin.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaMin.yaml deleted file mode 100644 index 997b7e3c..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDireccionEntregaTest/direccionEntregaMin.yaml +++ /dev/null @@ -1,284 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: - "2005": "VENTA REALIZADA POR EMISOR ITINERANTE" - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 72.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 72.000000000000 - gravadoBaseImponible: 400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 472.00 - importeSinImpuestos: 400 - importeConImpuestos: 472.00 - anticipos: 0 - descuentos: 0 - direccionEntrega: - direccion: "Jr. las flores 123" - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - - - - - - - - - - FormaPago - Contado - - - 72.00 - - 400.00 - 72.00 - - S - - 1000 - IGV - VAT - - - - - - 400.00 - 472.00 - 0 - 0 - 472.00 - - - 1 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest/documentoRelacionado.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest/documentoRelacionado.yaml deleted file mode 100644 index a5c82fff..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceDocumentoRelacionadoTest/documentoRelacionado.yaml +++ /dev/null @@ -1,281 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - ordenDeCompra: "123456" - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 72.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 72.000000000000 - gravadoBaseImponible: 400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - guias: [] - documentosRelacionados: - - tipoDocumento: "09" - serieNumero: "B111-1" - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 472.00 - importeSinImpuestos: 400 - importeConImpuestos: 472.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 123456 - - - B111-1 - 09 - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 72.00 - - 400.00 - 72.00 - - S - - 1000 - IGV - VAT - - - - - - 400.00 - 472.00 - 0 - 0 - 472.00 - - - 1 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFechaVencimientoTest/conFechaVencimiento.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFechaVencimientoTest/conFechaVencimiento.yaml deleted file mode 100644 index b6a411f2..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFechaVencimientoTest/conFechaVencimiento.yaml +++ /dev/null @@ -1,273 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 360.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 360.000000000000 - gravadoBaseImponible: 2000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - guias: [] - documentosRelacionados: [] - fechaVencimiento: "2022-01-01" - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 2360.00 - importeSinImpuestos: 2000 - importeConImpuestos: 2360.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 2022-01-01 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 360.00 - - 2000.00 - 360.00 - - S - - 1000 - IGV - VAT - - - - - - 2000.00 - 2360.00 - 0 - 0 - 2360.00 - - - 1 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/conFormaPago.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/conFormaPago.yaml deleted file mode 100644 index c02cbdf5..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/conFormaPago.yaml +++ /dev/null @@ -1,288 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 360.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 360.000000000000 - gravadoBaseImponible: 2000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Credito" - total: 30 - cuotas: - - importe: 10 - fechaPago: "2022-01-20" - - importe: 20 - fechaPago: "2022-02-20" - totalImporte: - importe: 2360.00 - importeSinImpuestos: 2000 - importeConImpuestos: 2360.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Credito - 30.00 - - - FormaPago - Cuota001 - 10.00 - 2022-01-20 - - - FormaPago - Cuota002 - 20.00 - 2022-02-20 - - - 360.00 - - 2000.00 - 360.00 - - S - - 1000 - IGV - VAT - - - - - - 2000.00 - 2360.00 - 0 - 0 - 2360.00 - - - 1 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/sinFormaPago.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/sinFormaPago.yaml deleted file mode 100644 index 78bd8f05..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceFormaPagoTest/sinFormaPago.yaml +++ /dev/null @@ -1,271 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 360.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 360.000000000000 - gravadoBaseImponible: 2000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 2360.00 - importeSinImpuestos: 2000 - importeConImpuestos: 2360.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 360.00 - - 2000.00 - 360.00 - - S - - 1000 - IGV - VAT - - - - - - 2000.00 - 2360.00 - 0 - 0 - 2360.00 - - - 1 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceGuiasTest/guiaSerieT.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceGuiasTest/guiaSerieT.yaml deleted file mode 100644 index a3a522aa..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceGuiasTest/guiaSerieT.yaml +++ /dev/null @@ -1,277 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 72.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 72.000000000000 - gravadoBaseImponible: 400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - guias: - - serieNumero: "T001-1" - tipoDocumento: "09" - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 472.00 - importeSinImpuestos: 400 - importeConImpuestos: 472.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - T001-1 - 09 - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 72.00 - - 400.00 - 72.00 - - S - - 1000 - IGV - VAT - - - - - - 400.00 - 472.00 - 0 - 0 - 472.00 - - - 1 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_aplicacionAlMontoFijo.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_aplicacionAlMontoFijo.yaml deleted file mode 100644 index 52e3a4f7..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_aplicacionAlMontoFijo.yaml +++ /dev/null @@ -1,295 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 119.20000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 79.20000000000000 - gravadoBaseImponible: 400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 40.00 - iscBaseImponible: 200 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 141.6000 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 43.2000 - igvBaseImponible: 240.00 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.20 - isc: 40.00 - iscBaseImponible: 200 - iscTipo: "02" - totalImpuestos: 83.2000 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 519.2000 - importeSinImpuestos: 400 - importeConImpuestos: 519.2000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 119.20 - - 200.00 - 40.00 - - - 2000 - ISC - EXC - - - - - 400.00 - 79.20 - - S - - 1000 - IGV - VAT - - - - - - 400.00 - 519.20 - 0 - 0 - 519.20 - - - 1 - 2 - 200.00 - - - 141.60 - 01 - - - - 83.20 - - 200.00 - 40.00 - - 20.00 - 02 - - 2000 - ISC - EXC - - - - - 240.00 - 43.20 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_mixedTipoIgv.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_mixedTipoIgv.yaml deleted file mode 100644 index 0ee5a02e..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_mixedTipoIgv.yaml +++ /dev/null @@ -1,519 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 36.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 36.000000000000 - gravadoBaseImponible: 200 - inafectoImporte: 0 - inafectoBaseImponible: 200 - exoneradoImporte: 0 - exoneradoBaseImponible: 200 - gratuitoImporte: 36.00 - gratuitoBaseImponible: 600 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "11" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item3" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 200 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item4" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 200 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item5" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 200 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 0 - - descripcion: "Item6" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 200 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 636.00 - importeSinImpuestos: 600 - importeConImpuestos: 636.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 36.00 - - 200.00 - 36.00 - - S - - 1000 - IGV - VAT - - - - - 200.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - 200.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - 600.00 - 36.00 - - S - - 9996 - GRA - FRE - - - - - - 600.00 - 636.00 - 0 - 0 - 636.00 - - - 1 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 100.00 - 02 - - - - 0.00 - - 200.00 - 36.00 - - S - 18.00 - 11 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 3 - 2 - 200.00 - - - 100.00 - 01 - - - - 0.00 - - 200.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - - 4 - 2 - 200.00 - - - 100.00 - 02 - - - - 0.00 - - 200.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - - 5 - 2 - 200.00 - - - 100.00 - 01 - - - - 0.00 - - 200.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - - 6 - 2 - 200.00 - - - 100.00 - 02 - - - - 0.00 - - 200.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_precioConImpuestos.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_precioConImpuestos.yaml deleted file mode 100644 index f41d5a24..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_precioConImpuestos.yaml +++ /dev/null @@ -1,342 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 76.520000000000000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 42.120000000000000000000000 - gravadoBaseImponible: 200.0000000000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 36.00 - gratuitoBaseImponible: 200 - icbImporte: 0.8 - iscImporte: 34.000000000000 - iscBaseImponible: 200.0000000000 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100.0000000000 - precioConImpuestos: true - precioReferencia: 138.06 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 42.12000000000000 - igvBaseImponible: 234.000000000000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0.4 - icbAplica: true - tasaIsc: 0.17 - isc: 34.000000000000 - iscBaseImponible: 200.0000000000 - iscTipo: "01" - totalImpuestos: 76.52000000000000 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "11" - tasaIcb: 0.2 - icb: 0.4 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 0.4 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 276.92000000000000 - importeSinImpuestos: 200.0000000000 - importeConImpuestos: 276.92000000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 76.52 - - 200.00 - 34.00 - - - 2000 - ISC - EXC - - - - - 200.00 - 42.12 - - S - - 1000 - IGV - VAT - - - - - 200.00 - 36.00 - - S - - 9996 - GRA - FRE - - - - - 0.80 - - S - - 7152 - ICBPER - OTH - - - - - - 200.00 - 276.92 - 0 - 0 - 276.92 - - - 1 - 2 - 200.00 - - - 138.06 - 01 - - - - 76.52 - - 200.00 - 34.00 - - 17.00 - 01 - - 2000 - ISC - EXC - - - - - 234.00 - 42.12 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - 0.40 - 2 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 100.00 - 02 - - - - 0.40 - - 200.00 - 36.00 - - S - 18.00 - 11 - - 9996 - GRA - FRE - - - - - 0.40 - 2 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaAlValor.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaAlValor.yaml deleted file mode 100644 index 3f404aae..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaAlValor.yaml +++ /dev/null @@ -1,295 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 112.12000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 78.12000000000000 - gravadoBaseImponible: 400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 34.00 - iscBaseImponible: 200 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 138.0600 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 42.1200 - igvBaseImponible: 234.00 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.17 - isc: 34.00 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 76.1200 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 512.1200 - importeSinImpuestos: 400 - importeConImpuestos: 512.1200 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 112.12 - - 200.00 - 34.00 - - - 2000 - ISC - EXC - - - - - 400.00 - 78.12 - - S - - 1000 - IGV - VAT - - - - - - 400.00 - 512.12 - 0 - 0 - 512.12 - - - 1 - 2 - 200.00 - - - 138.06 - 01 - - - - 76.12 - - 200.00 - 34.00 - - 17.00 - 01 - - 2000 - ISC - EXC - - - - - 234.00 - 42.12 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml deleted file mode 100644 index 971d8aaa..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIscTest/isc_sistemaDePreciosDeVentalAlPublico.yaml +++ /dev/null @@ -1,295 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 95.60000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 75.60000000000000 - gravadoBaseImponible: 400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 20.00 - iscBaseImponible: 200 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 129.8000 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 39.6000 - igvBaseImponible: 220.00 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0.10 - isc: 20.00 - iscBaseImponible: 200 - iscTipo: "02" - totalImpuestos: 59.6000 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 495.6000 - importeSinImpuestos: 400 - importeConImpuestos: 495.6000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 95.60 - - 200.00 - 20.00 - - - 2000 - ISC - EXC - - - - - 400.00 - 75.60 - - S - - 1000 - IGV - VAT - - - - - - 400.00 - 495.60 - 0 - 0 - 495.60 - - - 1 - 2 - 200.00 - - - 129.80 - 01 - - - - 59.60 - - 200.00 - 20.00 - - 10.00 - 02 - - 2000 - ISC - EXC - - - - - 220.00 - 39.60 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-ICB.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-ICB.yaml deleted file mode 100644 index d914ad0a..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-ICB.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Project OpenUBL S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Project OpenUBL S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 14.02400000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 12.02400000000000 - gravadoBaseImponible: 66.80 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 2.0 - iscImporte: 0.00 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 6.68 - precioConImpuestos: false - precioReferencia: 7.8824 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 12.0240 - igvBaseImponible: 66.80 - igvTipo: "10" - tasaIcb: 0.2 - icb: 2.0 - icbAplica: true - tasaIsc: 0 - isc: 0.00 - iscBaseImponible: 66.80 - iscTipo: "01" - totalImpuestos: 14.0240 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 80.8240 - importeSinImpuestos: 66.80 - importeConImpuestos: 80.8240 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 14.02 - - 66.80 - 12.02 - - S - - 1000 - IGV - VAT - - - - - 2.00 - - S - - 7152 - ICBPER - OTH - - - - - - 66.80 - 80.82 - 0 - 0 - 80.82 - - - 1 - 10 - 66.80 - - - 7.88 - 01 - - - - 14.02 - - 66.80 - 12.02 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - 2.00 - 10 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 6.68 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-conImpuestos-ICB.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-conImpuestos-ICB.yaml deleted file mode 100644 index 04372d4d..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario-conImpuestos-ICB.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Project OpenUBL S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Project OpenUBL S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 14.0203389830600000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 12.0203389830600000000000 - gravadoBaseImponible: 66.7796610170 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 2.0 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 6.6779661017 - precioConImpuestos: true - precioReferencia: 7.88 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 12.020338983060 - igvBaseImponible: 66.7796610170 - igvTipo: "10" - tasaIcb: 0.2 - icb: 2.0 - icbAplica: true - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 66.7796610170 - iscTipo: "01" - totalImpuestos: 14.020338983060 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 80.800000000060 - importeSinImpuestos: 66.7796610170 - importeConImpuestos: 80.800000000060 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 14.02 - - 66.78 - 12.02 - - S - - 1000 - IGV - VAT - - - - - 2.00 - - S - - 7152 - ICBPER - OTH - - - - - - 66.78 - 80.80 - 0 - 0 - 80.80 - - - 1 - 10 - 66.78 - - - 7.88 - 01 - - - - 14.02 - - 66.78 - 12.02 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - 2.00 - 10 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 6.68 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario.yaml deleted file mode 100644 index 9a917bad..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitario.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Project OpenUBL S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Project OpenUBL S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 12.02400000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 12.02400000000000 - gravadoBaseImponible: 66.80 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0.00 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 6.68 - precioConImpuestos: false - precioReferencia: 7.8824 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 12.0240 - igvBaseImponible: 66.80 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0.00 - iscBaseImponible: 66.80 - iscTipo: "01" - totalImpuestos: 12.0240 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 78.8240 - importeSinImpuestos: 66.80 - importeConImpuestos: 78.8240 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 12.02 - - 66.80 - 12.02 - - S - - 1000 - IGV - VAT - - - - - - 66.80 - 78.82 - 0 - 0 - 78.82 - - - 1 - 10 - 66.80 - - - 7.88 - 01 - - - - 12.02 - - 66.80 - 12.02 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 6.68 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitarioConImpuestos.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitarioConImpuestos.yaml deleted file mode 100644 index 0269df5f..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceIssue30Test/with-precioUnitarioConImpuestos.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Project OpenUBL S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Project OpenUBL S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 12.0203389830600000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 12.0203389830600000000000 - gravadoBaseImponible: 66.7796610170 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 6.6779661017 - precioConImpuestos: true - precioReferencia: 7.88 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 12.020338983060 - igvBaseImponible: 66.7796610170 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 66.7796610170 - iscTipo: "01" - totalImpuestos: 12.020338983060 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 78.800000000060 - importeSinImpuestos: 66.7796610170 - importeConImpuestos: 78.800000000060 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 12.02 - - 66.78 - 12.02 - - S - - 1000 - IGV - VAT - - - - - - 66.78 - 78.80 - 0 - 0 - 78.80 - - - 1 - 10 - 66.78 - - - 7.88 - 01 - - - - 12.02 - - 66.78 - 12.02 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 6.68 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceMoneda/customMoneda.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceMoneda/customMoneda.yaml deleted file mode 100644 index bcf12215..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceMoneda/customMoneda.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "USD" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 18.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 18.000000000000 - gravadoBaseImponible: 100 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 118.00 - importeSinImpuestos: 100 - importeConImpuestos: 118.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - USD - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 18.00 - - 100.00 - 18.00 - - S - - 1000 - IGV - VAT - - - - - - 100.00 - 118.00 - 0 - 0 - 118.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceOrdeDeCompraTest/ordenDeCompra.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceOrdeDeCompraTest/ordenDeCompra.yaml deleted file mode 100644 index 5df73b9a..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceOrdeDeCompraTest/ordenDeCompra.yaml +++ /dev/null @@ -1,275 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - ordenDeCompra: "123456" - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 72.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 72.000000000000 - gravadoBaseImponible: 400 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 2 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 36.00 - igvBaseImponible: 200 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 200 - iscTipo: "01" - totalImpuestos: 36.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 472.00 - importeSinImpuestos: 400 - importeConImpuestos: 472.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 123456 - - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 72.00 - - 400.00 - 72.00 - - S - - 1000 - IGV - VAT - - - - - - 400.00 - 472.00 - 0 - 0 - 472.00 - - - 1 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 2 - 200.00 - - - 118.00 - 01 - - - - 36.00 - - 200.00 - 36.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoicePercepcionTest/percepcion.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoicePercepcionTest/percepcion.yaml deleted file mode 100644 index 7d372f8b..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoicePercepcionTest/percepcion.yaml +++ /dev/null @@ -1,237 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: - "2000": "COMPROBANTE DE PERCEPCION" - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 144.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 144.000000000000 - gravadoBaseImponible: 800 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 4 - precio: 200 - precioConImpuestos: false - precioReferencia: 236.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 144.00 - igvBaseImponible: 800 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 800 - iscTipo: "01" - totalImpuestos: 144.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "2001" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 944.00 - importeSinImpuestos: 800 - importeConImpuestos: 944.00 - anticipos: 0 - descuentos: 0 - percepcion: - tipo: "51" - montoBase: 800 - porcentaje: 0.02 - monto: 16.00 - montoTotal: 816.00 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - Percepcion - 816.00 - - - FormaPago - Contado - - - true - 51 - 0.02 - 16.00 - 800.00 - - - 144.00 - - 800.00 - 144.00 - - S - - 1000 - IGV - VAT - - - - - - 800.00 - 944.00 - 0 - 0 - 944.00 - - - 1 - 4 - 800.00 - - - 236.00 - 01 - - - - 144.00 - - 800.00 - 144.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 200.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customClienteDireccionAndContacto.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customClienteDireccionAndContacto.yaml deleted file mode 100644 index c576e168..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customClienteDireccionAndContacto.yaml +++ /dev/null @@ -1,301 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - direccion: - ubigeo: "050101" - codigoLocal: "0101" - urbanizacion: "000000" - departamento: "Ayacucho" - provincia: "Huamanga" - distrito: "Jesus Nazareno" - direccion: "Jr. Las piedras 123" - codigoPais: "PE" - contacto: - telefono: "+123456789" - email: "carlos@gmail.com" - totalImpuestos: - total: 360.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 360.000000000000 - gravadoBaseImponible: 2000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 2360.00 - importeSinImpuestos: 2000 - importeConImpuestos: 2360.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - 050101 - 0101 - 000000 - Huamanga - Ayacucho - Jesus Nazareno - - - - - PE - - - - - +123456789 - carlos@gmail.com - - - - - FormaPago - Contado - - - 360.00 - - 2000.00 - 360.00 - - S - - 1000 - IGV - VAT - - - - - - 2000.00 - 2360.00 - 0 - 0 - 2360.00 - - - 1 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customCodigoLocal.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customCodigoLocal.yaml deleted file mode 100644 index 2bc755b9..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customCodigoLocal.yaml +++ /dev/null @@ -1,275 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - direccion: "Jr. las flores 123" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 424.800000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 424.800000000000 - gravadoBaseImponible: 2360 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 118 - precioConImpuestos: false - precioReferencia: 139.24 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 212.40 - igvBaseImponible: 1180 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1180 - iscTipo: "01" - totalImpuestos: 212.40 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 10 - precio: 118 - precioConImpuestos: false - precioReferencia: 139.24 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 212.40 - igvBaseImponible: 1180 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1180 - iscTipo: "01" - totalImpuestos: 212.40 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 2784.80 - importeSinImpuestos: 2360 - importeConImpuestos: 2784.80 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 424.80 - - 2360.00 - 424.80 - - S - - 1000 - IGV - VAT - - - - - - 2360.00 - 2784.80 - 0 - 0 - 2784.80 - - - 1 - 10 - 1180.00 - - - 139.24 - 01 - - - - 212.40 - - 1180.00 - 212.40 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 118.00 - - - - 2 - 10 - 1180.00 - - - 139.24 - 01 - - - - 212.40 - - 1180.00 - 212.40 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 118.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFechaEmision.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFechaEmision.yaml deleted file mode 100644 index c1daf91e..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFechaEmision.yaml +++ /dev/null @@ -1,273 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-01-06" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - horaEmision: "00:00:00" - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 360.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 360.000000000000 - gravadoBaseImponible: 2000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 2360.00 - importeSinImpuestos: 2000 - importeConImpuestos: 2360.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-01-06 - 00:00:00 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 360.00 - - 2000.00 - 360.00 - - S - - 1000 - IGV - VAT - - - - - - 2000.00 - 2360.00 - 0 - 0 - 2360.00 - - - 1 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFirmante.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFirmante.yaml deleted file mode 100644 index 9a37a1bb..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customFirmante.yaml +++ /dev/null @@ -1,271 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "000000000000" - razonSocial: "Wolsnut4 S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 360.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 360.000000000000 - gravadoBaseImponible: 2000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 2360.00 - importeSinImpuestos: 2000 - importeConImpuestos: 2360.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 000000000000 - - - 000000000000 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 360.00 - - 2000.00 - 360.00 - - S - - 1000 - IGV - VAT - - - - - - 2000.00 - 2360.00 - 0 - 0 - 2360.00 - - - 1 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customProveedorDireccionAndContacto.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customProveedorDireccionAndContacto.yaml deleted file mode 100644 index 18738714..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customProveedorDireccionAndContacto.yaml +++ /dev/null @@ -1,296 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - ubigeo: "050101" - codigoLocal: "0101" - urbanizacion: "000000" - departamento: "Ayacucho" - provincia: "Huamanga" - distrito: "Jesus Nazareno" - direccion: "Jr. Las piedras 123" - codigoPais: "PE" - contacto: - telefono: "+123456789" - email: "carlos@gmail.com" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 360.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 360.000000000000 - gravadoBaseImponible: 2000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 2360.00 - importeSinImpuestos: 2000 - importeConImpuestos: 2360.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 050101 - 0101 - 000000 - Huamanga - Ayacucho - Jesus Nazareno - - - - - PE - - - - - +123456789 - carlos@gmail.com - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 360.00 - - 2000.00 - 360.00 - - S - - 1000 - IGV - VAT - - - - - - 2000.00 - 2360.00 - 0 - 0 - 2360.00 - - - 1 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customUnidadMedida.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customUnidadMedida.yaml deleted file mode 100644 index bb55a425..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/customUnidadMedida.yaml +++ /dev/null @@ -1,271 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 360.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 360.000000000000 - gravadoBaseImponible: 2000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "KGM" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - - descripcion: "Item2" - unidadMedida: "KGM" - cantidad: 10 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.00 - igvBaseImponible: 1000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 1000 - iscTipo: "01" - totalImpuestos: 180.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 2360.00 - importeSinImpuestos: 2000 - importeConImpuestos: 2360.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 360.00 - - 2000.00 - 360.00 - - S - - 1000 - IGV - VAT - - - - - - 2000.00 - 2360.00 - 0 - 0 - 2360.00 - - - 1 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - - 2 - 10 - 1000.00 - - - 118.00 - 01 - - - - 180.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/icb.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/icb.yaml deleted file mode 100644 index 8f3ebb9d..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTest/icb.yaml +++ /dev/null @@ -1,306 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 364.0000000000000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 360.0000000000000000000000 - gravadoBaseImponible: 2000.0000000000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 4.0 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 10 - precio: 100.0000000000 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.000000000000 - igvBaseImponible: 1000.0000000000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 2.0 - icbAplica: true - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 1000.0000000000 - iscTipo: "01" - totalImpuestos: 182.000000000000 - - descripcion: "Item2" - unidadMedida: "NIU" - cantidad: 10 - precio: 100.0000000000 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 180.000000000000 - igvBaseImponible: 1000.0000000000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 2.0 - icbAplica: true - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 1000.0000000000 - iscTipo: "01" - totalImpuestos: 182.000000000000 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 2364.000000000000 - importeSinImpuestos: 2000.0000000000 - importeConImpuestos: 2364.000000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 364.00 - - 2000.00 - 360.00 - - S - - 1000 - IGV - VAT - - - - - 4.00 - - S - - 7152 - ICBPER - OTH - - - - - - 2000.00 - 2364.00 - 0 - 0 - 2364.00 - - - 1 - 10 - 1000.00 - - - 118.00 - 01 - - - - 182.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - 2.00 - 10 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 100.00 - - - - 2 - 10 - 1000.00 - - - 118.00 - 01 - - - - 182.00 - - 1000.00 - 180.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - 2.00 - 10 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_OPERACION_ONEROSA.yaml deleted file mode 100644 index 73d03684..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_OPERACION_ONEROSA.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0E-10 - exoneradoBaseImponible: 118.0000000000 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 118.0000000000 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0E-10 - igvBaseImponible: 118.0000000000 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 118.0000000000 - iscTipo: "01" - totalImpuestos: 0E-10 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 118.0000000000 - importeSinImpuestos: 118.0000000000 - importeConImpuestos: 118.0000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - - 118.00 - 118.00 - 0 - 0 - 118.00 - - - 1 - 1 - 118.00 - - - 118.00 - 01 - - - - 0.00 - - 118.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 118.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_TRANSFERENCIA_GRATUITA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_TRANSFERENCIA_GRATUITA.yaml deleted file mode 100644 index c6fa8a98..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXONERADO_TRANSFERENCIA_GRATUITA.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXPORTACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXPORTACION.yaml deleted file mode 100644 index 828861a9..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_EXPORTACION.yaml +++ /dev/null @@ -1,217 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0E-10 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0E-10 - exportacionBaseImponible: 118.0000000000 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 118.0000000000 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0E-10 - igvBaseImponible: 118.0000000000 - igvTipo: "40" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 118.0000000000 - iscTipo: "01" - totalImpuestos: 0E-10 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 118.0000000000 - importeSinImpuestos: 118.0000000000 - importeConImpuestos: 118.0000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0 - - - 9995 - EXP - FRE - - - - - - 118.00 - 118.00 - 0 - 0 - 118.00 - - - 1 - 1 - 118.00 - - - 118.00 - 01 - - - - 0.00 - - 118.00 - 0.00 - - S - 0.00 - 40 - - 9995 - EXP - FRE - - - - - - - - - 118.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_BONIFICACIONES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_BONIFICACIONES.yaml deleted file mode 100644 index c1f7d115..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_BONIFICACIONES.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 21.24 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 21.24 - igvBaseImponible: 118 - igvTipo: "15" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 21.24 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 21.24 - - S - 18.00 - 15 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_IVAP.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_IVAP.yaml deleted file mode 100644 index 441277e2..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_IVAP.yaml +++ /dev/null @@ -1,220 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: - "2007": "Leyenda: Operacion sujeta a IVAP" - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 4.538461538460 - ivapImporte: 4.538461538460 - ivapBaseImponible: 113.4615384615 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 113.4615384615 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "01" - tasaIgv: 0.04 - igv: 4.538461538460 - igvBaseImponible: 113.4615384615 - igvTipo: "17" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 113.4615384615 - iscTipo: "01" - totalImpuestos: 4.538461538460 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 117.999999999960 - importeSinImpuestos: 113.4615384615 - importeConImpuestos: 117.999999999960 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 4.54 - - 113.46 - 4.54 - - S - - 1016 - IVAP - VAT - - - - - - 113.46 - 118.00 - 0 - 0 - 118.00 - - - 1 - 1 - 113.46 - - - 118.00 - 01 - - - - 4.54 - - 113.46 - 4.54 - - S - 4.00 - 17 - - 1016 - IVAP - VAT - - - - - - - - - 113.46 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_OPERACION_ONEROSA.yaml deleted file mode 100644 index 849b8099..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_OPERACION_ONEROSA.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 18.0000000000000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 18.0000000000000000000000 - gravadoBaseImponible: 100.0000000000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100.0000000000 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.000000000000 - igvBaseImponible: 100.0000000000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 100.0000000000 - iscTipo: "01" - totalImpuestos: 18.000000000000 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 118.000000000000 - importeSinImpuestos: 100.0000000000 - importeConImpuestos: 118.000000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 18.00 - - 100.00 - 18.00 - - S - - 1000 - IGV - VAT - - - - - - 100.00 - 118.00 - 0 - 0 - 118.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO.yaml deleted file mode 100644 index 0496d0b2..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 21.24 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 21.24 - igvBaseImponible: 118 - igvTipo: "13" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 21.24 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 21.24 - - S - 18.00 - 13 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_DONACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_DONACION.yaml deleted file mode 100644 index 851120bc..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_DONACION.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 21.24 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 21.24 - igvBaseImponible: 118 - igvTipo: "12" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 21.24 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 21.24 - - S - 18.00 - 12 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml deleted file mode 100644 index e0e89613..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 21.24 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 21.24 - igvBaseImponible: 118 - igvTipo: "16" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 21.24 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 21.24 - - S - 18.00 - 16 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PREMIO.yaml deleted file mode 100644 index 80aaa816..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PREMIO.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 21.24 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 21.24 - igvBaseImponible: 118 - igvTipo: "11" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 21.24 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 21.24 - - S - 18.00 - 11 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml deleted file mode 100644 index dfd6ac95..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 21.24 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 21.24 - igvBaseImponible: 118 - igvTipo: "14" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 21.24 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 21.24 - - S - 18.00 - 14 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_OPERACION_ONEROSA.yaml deleted file mode 100644 index e3c88809..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_OPERACION_ONEROSA.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0E-10 - inafectoBaseImponible: 118.0000000000 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 118.0000000000 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0E-10 - igvBaseImponible: 118.0000000000 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 118.0000000000 - iscTipo: "01" - totalImpuestos: 0E-10 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 118.0000000000 - importeSinImpuestos: 118.0000000000 - importeConImpuestos: 118.0000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - - 118.00 - 118.00 - 0 - 0 - 118.00 - - - 1 - 1 - 118.00 - - - 118.00 - 01 - - - - 0.00 - - 118.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 118.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO.yaml deleted file mode 100644 index 157158b6..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_BONIFICACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_BONIFICACION.yaml deleted file mode 100644 index b38c038c..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_BONIFICACION.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml deleted file mode 100644 index 8744794a..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml deleted file mode 100644 index 648aa3b8..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PREMIO.yaml deleted file mode 100644 index f9b9a5c5..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PREMIO.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml deleted file mode 100644 index 7440b082..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "36" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.00 - - 118.00 - 0.00 - - S - 0.00 - 36 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_OPERACION_ONEROSA.yaml deleted file mode 100644 index f09ec0cd..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_OPERACION_ONEROSA.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0E-10 - exoneradoBaseImponible: 118.0000000000 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0.2 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 118.0000000000 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0E-10 - igvBaseImponible: 118.0000000000 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 118.0000000000 - iscTipo: "01" - totalImpuestos: 0.2000000000 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 118.2000000000 - importeSinImpuestos: 118.0000000000 - importeConImpuestos: 118.2000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 118.00 - 118.20 - 0 - 0 - 118.20 - - - 1 - 1 - 118.00 - - - 118.00 - 01 - - - - 0.20 - - 118.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 118.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_TRANSFERENCIA_GRATUITA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_TRANSFERENCIA_GRATUITA.yaml deleted file mode 100644 index 09f92f82..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXONERADO_TRANSFERENCIA_GRATUITA.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXPORTACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXPORTACION.yaml deleted file mode 100644 index 432c64e3..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_EXPORTACION.yaml +++ /dev/null @@ -1,240 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0.2000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0E-10 - exportacionBaseImponible: 118.0000000000 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0.2 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 118.0000000000 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0E-10 - igvBaseImponible: 118.0000000000 - igvTipo: "40" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 118.0000000000 - iscTipo: "01" - totalImpuestos: 0.2000000000 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 118.2000000000 - importeSinImpuestos: 118.0000000000 - importeConImpuestos: 118.2000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.20 - - 118.00 - 0 - - - 9995 - EXP - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 118.00 - 118.20 - 0 - 0 - 118.20 - - - 1 - 1 - 118.00 - - - 118.00 - 01 - - - - 0.20 - - 118.00 - 0.00 - - S - 0.00 - 40 - - 9995 - EXP - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 118.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_BONIFICACIONES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_BONIFICACIONES.yaml deleted file mode 100644 index 23c40990..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_BONIFICACIONES.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 21.24 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 21.24 - igvBaseImponible: 118 - igvTipo: "15" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 21.24 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 21.24 - - S - 18.00 - 15 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_IVAP.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_IVAP.yaml deleted file mode 100644 index 73e09f54..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_IVAP.yaml +++ /dev/null @@ -1,243 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: - "2007": "Leyenda: Operacion sujeta a IVAP" - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 4.738461538460 - ivapImporte: 4.538461538460 - ivapBaseImponible: 113.4615384615 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0.2 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 113.4615384615 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "01" - tasaIgv: 0.04 - igv: 4.538461538460 - igvBaseImponible: 113.4615384615 - igvTipo: "17" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 113.4615384615 - iscTipo: "01" - totalImpuestos: 4.738461538460 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 118.199999999960 - importeSinImpuestos: 113.4615384615 - importeConImpuestos: 118.199999999960 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 4.74 - - 113.46 - 4.54 - - S - - 1016 - IVAP - VAT - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 113.46 - 118.20 - 0 - 0 - 118.20 - - - 1 - 1 - 113.46 - - - 118.00 - 01 - - - - 4.74 - - 113.46 - 4.54 - - S - 4.00 - 17 - - 1016 - IVAP - VAT - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 113.46 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_OPERACION_ONEROSA.yaml deleted file mode 100644 index b94de02e..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_OPERACION_ONEROSA.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 18.2000000000000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 18.0000000000000000000000 - gravadoBaseImponible: 100.0000000000 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0.2 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100.0000000000 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.000000000000 - igvBaseImponible: 100.0000000000 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 100.0000000000 - iscTipo: "01" - totalImpuestos: 18.200000000000 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 118.200000000000 - importeSinImpuestos: 100.0000000000 - importeConImpuestos: 118.200000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 18.20 - - 100.00 - 18.00 - - S - - 1000 - IGV - VAT - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 100.00 - 118.20 - 0 - 0 - 118.20 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.20 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO.yaml deleted file mode 100644 index 66257d62..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 21.24 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 21.24 - igvBaseImponible: 118 - igvTipo: "13" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 21.24 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 21.24 - - S - 18.00 - 13 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_DONACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_DONACION.yaml deleted file mode 100644 index c479ff05..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_DONACION.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 21.24 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 21.24 - igvBaseImponible: 118 - igvTipo: "12" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 21.24 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 21.24 - - S - 18.00 - 12 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml deleted file mode 100644 index 5c3810bb..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 21.24 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 21.24 - igvBaseImponible: 118 - igvTipo: "16" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 21.24 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 21.24 - - S - 18.00 - 16 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PREMIO.yaml deleted file mode 100644 index f765afd8..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PREMIO.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 21.24 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 21.24 - igvBaseImponible: 118 - igvTipo: "11" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 21.24 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 21.24 - - S - 18.00 - 11 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml deleted file mode 100644 index 3979d2d3..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 21.24 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 21.24 - igvBaseImponible: 118 - igvTipo: "14" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 21.24 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 21.24 - - S - 18.00 - 14 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_OPERACION_ONEROSA.yaml deleted file mode 100644 index 8cb091c2..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_OPERACION_ONEROSA.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0E-10 - inafectoBaseImponible: 118.0000000000 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0.2 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 118.0000000000 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0E-10 - igvBaseImponible: 118.0000000000 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 118.0000000000 - iscTipo: "01" - totalImpuestos: 0.2000000000 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 118.2000000000 - importeSinImpuestos: 118.0000000000 - importeConImpuestos: 118.2000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 118.00 - 118.20 - 0 - 0 - 118.20 - - - 1 - 1 - 118.00 - - - 118.00 - 01 - - - - 0.20 - - 118.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 118.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO.yaml deleted file mode 100644 index 21c648c9..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_BONIFICACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_BONIFICACION.yaml deleted file mode 100644 index c87927d9..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_BONIFICACION.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml deleted file mode 100644 index 5bbdb3cd..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml deleted file mode 100644 index eb4e6adc..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PREMIO.yaml deleted file mode 100644 index 02c7b8b1..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PREMIO.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml deleted file mode 100644 index 448327fe..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 118 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 118 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 118 - igvTipo: "36" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 118 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 118.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 118.00 - - - 118.00 - 02 - - - - 0.20 - - 118.00 - 0.00 - - S - 0.00 - 36 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_OPERACION_ONEROSA.yaml deleted file mode 100644 index 13e81576..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_OPERACION_ONEROSA.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0E-10 - exoneradoBaseImponible: 100.0000000000 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0.2 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100.0000000000 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0E-10 - igvBaseImponible: 100.0000000000 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 100.0000000000 - iscTipo: "01" - totalImpuestos: 0.2000000000 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.2000000000 - importeSinImpuestos: 100.0000000000 - importeConImpuestos: 100.2000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 100.00 - 100.20 - 0 - 0 - 100.20 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.20 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_TRANSFERENCIA_GRATUITA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_TRANSFERENCIA_GRATUITA.yaml deleted file mode 100644 index d349abb4..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXONERADO_TRANSFERENCIA_GRATUITA.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXPORTACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXPORTACION.yaml deleted file mode 100644 index 4f18fdda..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_EXPORTACION.yaml +++ /dev/null @@ -1,240 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0.2000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0E-10 - exportacionBaseImponible: 100.0000000000 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0.2 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100.0000000000 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0E-10 - igvBaseImponible: 100.0000000000 - igvTipo: "40" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 100.0000000000 - iscTipo: "01" - totalImpuestos: 0.2000000000 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.2000000000 - importeSinImpuestos: 100.0000000000 - importeConImpuestos: 100.2000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.20 - - 100.00 - 0 - - - 9995 - EXP - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 100.00 - 100.20 - 0 - 0 - 100.20 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.20 - - 100.00 - 0.00 - - S - 0.00 - 40 - - 9995 - EXP - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_BONIFICACIONES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_BONIFICACIONES.yaml deleted file mode 100644 index 2a76f6fe..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_BONIFICACIONES.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 18.00 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "15" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 18.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 18.00 - - S - 18.00 - 15 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_OPERACION_ONEROSA.yaml deleted file mode 100644 index e0290672..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_OPERACION_ONEROSA.yaml +++ /dev/null @@ -1,265 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 23.158397534689200000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 15.254237288149200000000000 - gravadoBaseImponible: 77.0416024654 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0.2 - iscImporte: 7.704160246540 - iscBaseImponible: 77.0416024654 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 77.0416024654 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 15.25423728814920 - igvBaseImponible: 84.745762711940 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0.10 - isc: 7.704160246540 - iscBaseImponible: 77.0416024654 - iscTipo: "01" - totalImpuestos: 23.15839753468920 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.20000000008920 - importeSinImpuestos: 77.0416024654 - importeConImpuestos: 100.20000000008920 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 23.16 - - 77.04 - 7.70 - - - 2000 - ISC - EXC - - - - - 77.04 - 15.25 - - S - - 1000 - IGV - VAT - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 77.04 - 100.20 - 0 - 0 - 100.20 - - - 1 - 1 - 77.04 - - - 100.00 - 01 - - - - 23.16 - - 77.04 - 7.70 - - 10.00 - 01 - - 2000 - ISC - EXC - - - - - 84.75 - 15.25 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 77.04 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO.yaml deleted file mode 100644 index af12a15f..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 18.00 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "13" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 18.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 18.00 - - S - 18.00 - 13 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_DONACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_DONACION.yaml deleted file mode 100644 index 92a66e96..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_DONACION.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 18.00 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "12" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 18.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 18.00 - - S - 18.00 - 12 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml deleted file mode 100644 index 44d20517..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 18.00 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "16" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 18.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 18.00 - - S - 18.00 - 16 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PREMIO.yaml deleted file mode 100644 index 532c3686..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PREMIO.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 18.00 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "11" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 18.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 18.00 - - S - 18.00 - 11 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml deleted file mode 100644 index 1e13190f..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 18.00 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "14" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 18.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 18.00 - - S - 18.00 - 14 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_OPERACION_ONEROSA.yaml deleted file mode 100644 index c1536a6c..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_OPERACION_ONEROSA.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0E-10 - inafectoBaseImponible: 100.0000000000 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0.2 - iscImporte: 0E-10 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100.0000000000 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0E-10 - igvBaseImponible: 100.0000000000 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0E-10 - iscBaseImponible: 100.0000000000 - iscTipo: "01" - totalImpuestos: 0.2000000000 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.2000000000 - importeSinImpuestos: 100.0000000000 - importeConImpuestos: 100.2000000000 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 100.00 - 100.20 - 0 - 0 - 100.20 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.20 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO.yaml deleted file mode 100644 index 0c5e639a..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_BONIFICACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_BONIFICACION.yaml deleted file mode 100644 index 112cfa63..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_BONIFICACION.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml deleted file mode 100644 index 54d83352..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml deleted file mode 100644 index 756bd00d..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PREMIO.yaml deleted file mode 100644 index c457802f..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PREMIO.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml deleted file mode 100644 index 1e17d810..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pr_icb_isc_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml +++ /dev/null @@ -1,241 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0.2 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: true - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "36" - tasaIcb: 0.2 - icb: 0.2 - icbAplica: true - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0.2 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.20 - importeSinImpuestos: 0 - importeConImpuestos: 0.20 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - 0.20 - - S - - 7152 - ICBPER - OTH - - - - - - 0.00 - 0.20 - 0 - 0 - 0.20 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.20 - - 100.00 - 0.00 - - S - 0.00 - 36 - - 9996 - GRA - FRE - - - - - 0.20 - 1 - - 0.20 - - 7152 - ICBPER - OTH - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_OPERACION_ONEROSA.yaml deleted file mode 100644 index 513c0d29..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_OPERACION_ONEROSA.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 100 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "20" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9997 - EXO - VAT - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 20 - - 9997 - EXO - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_TRANSFERENCIA_GRATUITA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_TRANSFERENCIA_GRATUITA.yaml deleted file mode 100644 index b9d5a63f..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXONERADO_TRANSFERENCIA_GRATUITA.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "21" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 21 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXPORTACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXPORTACION.yaml deleted file mode 100644 index 67310887..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_EXPORTACION.yaml +++ /dev/null @@ -1,217 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 100 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "40" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0 - - - 9995 - EXP - FRE - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 40 - - 9995 - EXP - FRE - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_BONIFICACIONES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_BONIFICACIONES.yaml deleted file mode 100644 index f7a28771..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_BONIFICACIONES.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 18.00 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "15" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 18.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 18.00 - - S - 18.00 - 15 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_IVAP.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_IVAP.yaml deleted file mode 100644 index 269d51a5..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_IVAP.yaml +++ /dev/null @@ -1,220 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: - "2007": "Leyenda: Operacion sujeta a IVAP" - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 4.00 - ivapImporte: 4.00 - ivapBaseImponible: 100 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 104.00 - precioReferenciaTipo: "01" - tasaIgv: 0.04 - igv: 4.00 - igvBaseImponible: 100 - igvTipo: "17" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 4.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 104.00 - importeSinImpuestos: 100 - importeConImpuestos: 104.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 4.00 - - 100.00 - 4.00 - - S - - 1016 - IVAP - VAT - - - - - - 100.00 - 104.00 - 0 - 0 - 104.00 - - - 1 - 1 - 100.00 - - - 104.00 - 01 - - - - 4.00 - - 100.00 - 4.00 - - S - 4.00 - 17 - - 1016 - IVAP - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_OPERACION_ONEROSA.yaml deleted file mode 100644 index b12f4be9..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_OPERACION_ONEROSA.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 18.000000000000 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 18.000000000000 - gravadoBaseImponible: 100 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 118.00 - precioReferenciaTipo: "01" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "10" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 18.00 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 118.00 - importeSinImpuestos: 100 - importeConImpuestos: 118.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 18.00 - - 100.00 - 18.00 - - S - - 1000 - IGV - VAT - - - - - - 100.00 - 118.00 - 0 - 0 - 118.00 - - - 1 - 1 - 100.00 - - - 118.00 - 01 - - - - 18.00 - - 100.00 - 18.00 - - S - 18.00 - 10 - - 1000 - IGV - VAT - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO.yaml deleted file mode 100644 index cea21533..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 18.00 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "13" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 18.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 18.00 - - S - 18.00 - 13 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_DONACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_DONACION.yaml deleted file mode 100644 index cb3e7203..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_DONACION.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 18.00 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "12" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 18.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 18.00 - - S - 18.00 - 12 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml deleted file mode 100644 index 68ca9b74..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_ENTREGA_A_TRABAJADORES.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 18.00 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "16" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 18.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 18.00 - - S - 18.00 - 16 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PREMIO.yaml deleted file mode 100644 index 33547794..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PREMIO.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 18.00 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "11" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 18.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 18.00 - - S - 18.00 - 11 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml deleted file mode 100644 index 027b4ac9..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_GRAVADO_RETIRO_POR_PUBLICIDAD.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 18.00 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0.18 - igv: 18.00 - igvBaseImponible: 100 - igvTipo: "14" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 18.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 18.00 - - S - 18.00 - 14 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_OPERACION_ONEROSA.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_OPERACION_ONEROSA.yaml deleted file mode 100644 index 2a1a502b..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_OPERACION_ONEROSA.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 100 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 0 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 100 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "01" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "30" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 100.00 - importeSinImpuestos: 100 - importeConImpuestos: 100.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9998 - INA - FRE - - - - - - 100.00 - 100.00 - 0 - 0 - 100.00 - - - 1 - 1 - 100.00 - - - 100.00 - 01 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 30 - - 9998 - INA - FRE - - - - - - - - - 100.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO.yaml deleted file mode 100644 index 6e38b027..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "32" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 32 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_BONIFICACION.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_BONIFICACION.yaml deleted file mode 100644 index ae6453db..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_BONIFICACION.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "31" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 31 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml deleted file mode 100644 index 3b114c2a..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_CONVENIO_COLECTIVO.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "34" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 34 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml deleted file mode 100644 index 5ea510c2..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_MUESTRAS_MEDICAS.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "33" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 33 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PREMIO.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PREMIO.yaml deleted file mode 100644 index 70663ddc..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PREMIO.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "35" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 35 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml deleted file mode 100644 index fabae503..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/invoice/InvoiceTipoIgvTest/invoice_pu_INAFECTO_RETIRO_POR_PUBLICIDAD.yaml +++ /dev/null @@ -1,218 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Invoice" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - direccion: - codigoLocal: "0000" - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - leyendas: {} - tasaIvap: 0.04 - tasaIgv: 0.18 - tasaIcb: 0.2 - serie: "F001" - numero: 1 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - totalImpuestos: - total: 0 - ivapImporte: 0 - ivapBaseImponible: 0 - exportacionImporte: 0 - exportacionBaseImponible: 0 - gravadoImporte: 0 - gravadoBaseImponible: 0 - inafectoImporte: 0 - inafectoBaseImponible: 0 - exoneradoImporte: 0 - exoneradoBaseImponible: 0 - gratuitoImporte: 0 - gratuitoBaseImponible: 100 - icbImporte: 0 - iscImporte: 0 - iscBaseImponible: 0 - detalles: - - descripcion: "Item1" - unidadMedida: "NIU" - cantidad: 1 - precio: 0 - precioConImpuestos: false - precioReferencia: 100 - precioReferenciaTipo: "02" - tasaIgv: 0 - igv: 0 - igvBaseImponible: 100 - igvTipo: "36" - tasaIcb: 0.2 - icb: 0 - icbAplica: false - tasaIsc: 0 - isc: 0 - iscBaseImponible: 100 - iscTipo: "01" - totalImpuestos: 0 - guias: [] - documentosRelacionados: [] - tipoComprobante: "01" - tipoOperacion: "0101" - formaDePago: - tipo: "Contado" - total: 0 - cuotas: [] - totalImporte: - importe: 0.00 - importeSinImpuestos: 0 - importeConImpuestos: 0.00 - anticipos: 0 - descuentos: 0 - anticipos: [] - descuentos: [] -snapshot: | - - - - - - - - 2.1 - 2.0 - F001-1 - 2019-12-24 - 01 - PEN - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - - - 12345678912 - - - - - 0000 - - - - - - - - 12121212121 - - - - - - - - FormaPago - Contado - - - 0.00 - - 100.00 - 0.00 - - S - - 9996 - GRA - FRE - - - - - - 0.00 - 0.00 - 0 - 0 - 0.00 - - - 1 - 1 - 100.00 - - - 100.00 - 02 - - - - 0.00 - - 100.00 - 0.00 - - S - 0.00 - 36 - - 9996 - GRA - FRE - - - - - - - - - 0.00 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/perception/PerceptionTest/perception_simple.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/perception/PerceptionTest/perception_simple.yaml deleted file mode 100644 index 185f86ec..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/perception/PerceptionTest/perception_simple.yaml +++ /dev/null @@ -1,121 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Perception" -input: - moneda: "PEN" - fechaEmision: "2022-01-31" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - numero: 1 - tipoRegimenPorcentaje: 2 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - operacion: - numeroOperacion: 1 - fechaOperacion: "2022-01-31" - importeOperacion: 100 - comprobante: - moneda: "PEN" - tipoComprobante: "01" - serieNumero: "F001-1" - fechaEmision: "2022-01-31" - importeTotal: 200 - serie: "P001" - tipoRegimen: "01" - importeTotalPercibido: 10 - importeTotalCobrado: 210 -snapshot: | - - - - - - - - 2.0 - 1.0 - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - P001-1 - 2022-01-31 - - - 12345678912 - - - - - - - - 12121212121 - - - - - - 01 - 2 - 10 - 210 - - F001-1 - 2022-01-31 - 200 - - 1 - 100 - 2022-01-31 - - - 10 - 2022-01-31 - 210 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/retention/RetentionTest/retention_simple.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/retention/RetentionTest/retention_simple.yaml deleted file mode 100644 index ae3b6d52..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/retention/RetentionTest/retention_simple.yaml +++ /dev/null @@ -1,121 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "Retention" -input: - moneda: "PEN" - fechaEmision: "2022-01-31" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - numero: 1 - tipoRegimenPorcentaje: 3 - cliente: - tipoDocumentoIdentidad: "6" - numeroDocumentoIdentidad: "12121212121" - nombre: "Carlos Feria" - operacion: - numeroOperacion: 1 - fechaOperacion: "2022-01-31" - importeOperacion: 100 - comprobante: - moneda: "PEN" - tipoComprobante: "01" - serieNumero: "F001-1" - fechaEmision: "2022-01-31" - importeTotal: 210 - serie: "R001" - tipoRegimen: "01" - importeTotalRetenido: 10 - importeTotalPagado: 200 -snapshot: | - - - - - - - - 2.0 - 1.0 - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - R001-1 - 2022-01-31 - - - 12345678912 - - - - - - - - 12121212121 - - - - - - 01 - 3 - 10 - 200 - - F001-1 - 2022-01-31 - 210 - - 1 - 100 - 2022-01-31 - - - 10 - 2022-01-31 - 200 - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/summarydocuments/SummaryDocumentsTest/summaryDocuments.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/summarydocuments/SummaryDocumentsTest/summaryDocuments.yaml deleted file mode 100644 index b7f3f477..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/summarydocuments/SummaryDocumentsTest/summaryDocuments.yaml +++ /dev/null @@ -1,190 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "SummaryDocuments" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - numero: 1 - fechaEmisionComprobantes: "2019-12-22" - comprobantes: - - tipoOperacion: "1" - comprobante: - moneda: "PEN" - tipoComprobante: "03" - serieNumero: "B001-1" - cliente: - tipoDocumentoIdentidad: "1" - numeroDocumentoIdentidad: "12345678" - nombre: "Carlos Feria" - valorVenta: - importeTotal: 120 - gravado: 120 - impuestos: - igv: 18 - icb: 2 - - tipoOperacion: "1" - comprobante: - moneda: "PEN" - tipoComprobante: "07" - serieNumero: "BC02-2" - cliente: - tipoDocumentoIdentidad: "1" - numeroDocumentoIdentidad: "12345678" - nombre: "Carlos Feria" - valorVenta: - importeTotal: 118 - gravado: 118 - impuestos: - igv: 18 - comprobanteAfectado: - tipoComprobante: "03" - serieNumero: "B002-2" -snapshot: | - - - - - - - - 2.0 - 1.1 - RC-20191224-1 - 2019-12-22 - 2019-12-24 - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - 12345678912 - 6 - - - - - - - - 1 - 03 - B001-1 - - 12345678 - 1 - - - 1 - - 120 - - 120 - 01 - - - 18 - - 18 - - - 1000 - IGV - VAT - - - - - - 2 - - 2 - - - 7152 - ICBPER - OTH - - - - - - - 2 - 07 - BC02-2 - - 12345678 - 1 - - - - B002-2 - 03 - - - - 1 - - 118 - - 118 - 01 - - - 18 - - 18 - - - 1000 - IGV - VAT - - - - - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument.yaml deleted file mode 100644 index 0afdc1cd..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument.yaml +++ /dev/null @@ -1,98 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "VoidedDocuments" -input: - moneda: "PEN" - fechaEmision: "2022-01-31" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - numero: 1 - fechaEmisionComprobantes: "2022-01-29" - comprobantes: - - serie: "F001" - numero: 1 - tipoComprobante: "01" - descripcionSustento: "Mi sustento1" - - serie: "F001" - numero: 2 - tipoComprobante: "01" - descripcionSustento: "Mi sustento2" -snapshot: | - - - - - - - - 2.0 - 1.0 - RA-20220131-1 - 2022-01-29 - 2022-01-31 - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - 12345678912 - 6 - - - - - - - - 1 - 01 - F001 - 1 - Mi sustento1 - - - 2 - 01 - F001 - 2 - Mi sustento2 - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedFechaEmision.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedFechaEmision.yaml deleted file mode 100644 index 9f66d6a3..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedFechaEmision.yaml +++ /dev/null @@ -1,98 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "VoidedDocuments" -input: - moneda: "PEN" - fechaEmision: "2019-12-24" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - numero: 1 - fechaEmisionComprobantes: "2019-12-22" - comprobantes: - - serie: "F001" - numero: 1 - tipoComprobante: "01" - descripcionSustento: "Mi sustento1" - - serie: "F001" - numero: 2 - tipoComprobante: "01" - descripcionSustento: "Mi sustento2" -snapshot: | - - - - - - - - 2.0 - 1.0 - RA-20191224-1 - 2019-12-22 - 2019-12-24 - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - 12345678912 - 6 - - - - - - - - 1 - 01 - F001 - 1 - Mi sustento1 - - - 2 - 01 - F001 - 2 - Mi sustento2 - - diff --git a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedTipoComprobante.yaml b/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedTipoComprobante.yaml deleted file mode 100644 index 0afdc1cd..00000000 --- a/quarkus-extension/integration-tests/src/test/resources/e2e/renderer/voideddocument/VoidedDocumentsTest/voidedDocument_autoGeneratedTipoComprobante.yaml +++ /dev/null @@ -1,98 +0,0 @@ -# -# Copyright 2019 Project OpenUBL, Inc. and/or its affiliates -# and other contributors as indicated by the @author tags. -# -# Licensed under the Apache License - 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# https://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - ---- -kind: "VoidedDocuments" -input: - moneda: "PEN" - fechaEmision: "2022-01-31" - proveedor: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - firmante: - ruc: "12345678912" - razonSocial: "Softgreen S.A.C." - numero: 1 - fechaEmisionComprobantes: "2022-01-29" - comprobantes: - - serie: "F001" - numero: 1 - tipoComprobante: "01" - descripcionSustento: "Mi sustento1" - - serie: "F001" - numero: 2 - tipoComprobante: "01" - descripcionSustento: "Mi sustento2" -snapshot: | - - - - - - - - 2.0 - 1.0 - RA-20220131-1 - 2022-01-29 - 2022-01-31 - - 12345678912 - - - 12345678912 - - - - - - - - #PROJECT-OPENUBL-SIGN - - - - - 12345678912 - 6 - - - - - - - - 1 - 01 - F001 - 1 - Mi sustento1 - - - 2 - 01 - F001 - 2 - Mi sustento2 - - From 3f64488ab9440fcf4d73a30042d766578dddff32 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:40:12 +0200 Subject: [PATCH 18/19] Remove local config --- .../openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java b/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java index b2788066..b8a35b22 100644 --- a/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java +++ b/quarkus-extension/integration-tests/src/main/java/io/github/project/openubl/quarkus/xbuilder/it/QuarkusXbuilderResource.java @@ -113,9 +113,6 @@ public String createInvoiceXml(String xml) throws IOException, JAXBException { try (StringReader reader = new StringReader(xml)) { XMLInvoice xmlPojo = (XMLInvoice) unmarshaller.unmarshal(new InputSource(reader)); Invoice inputFromXml = invoiceMapper.map(xmlPojo); - - Files.writeString(Paths.get("/home/cferiavi/Downloads/carlos1"), xmlPojo.toString()); - return template.data(inputFromXml).render(); } catch (JAXBException e) { throw new RuntimeException(e); From 9bf292b1ba8f2ec21281949d08ebad36d9e4d000 Mon Sep 17 00:00:00 2001 From: carlosthe19916 <2582866+carlosthe19916@users.noreply.github.com> Date: Sun, 2 Apr 2023 20:43:09 +0200 Subject: [PATCH 19/19] Fix tests --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 359376b8..511b7a0d 100644 --- a/pom.xml +++ b/pom.xml @@ -194,6 +194,7 @@ src/test/resources/** src/main/resources/** .github/** + **/*.yaml