Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
c7adc5a
data.ref: add XML schemas for "Cesion" (RTC)
glarrain Apr 16, 2019
b71f095
Merge pull request #18 from fyndata/feature/data/add-xml-schemas-cesion
glarrain Apr 22, 2019
44ac84c
test_data: fix a filename
glarrain Apr 22, 2019
5814c82
test_data: add real AEC and DTE XML files
glarrain Apr 17, 2019
9a3780b
Merge pull request #19 from fyndata/feature/test_data/real-sii-dte-ae…
glarrain Apr 22, 2019
998f69f
libs.xml_utils: add class aliases
glarrain Apr 16, 2019
f006a73
libs.xml_utils: add `XML_DSIG_NS_MAP`
glarrain Apr 16, 2019
2b4d045
Merge pull request #20 from fyndata/feature/libs/xml_utils/improvements
glarrain Apr 22, 2019
fb87ffa
dte.constants: add features to `TipoDteEnum`
glarrain Apr 18, 2019
0bde60b
dte.parse: fix poor usage of 'lxml'
glarrain Apr 22, 2019
95b1f3e
dte.data_models: remove redundant property
glarrain Apr 21, 2019
3509a34
dte.data_models: implement tests
glarrain Apr 21, 2019
1a3d5e4
dte.data_models: add properties to `DteDataL1`
glarrain Apr 21, 2019
24c0411
dte.parse: improve tests
glarrain Apr 22, 2019
55b9ace
dte.parse: refactor `parse_dte_xml`
glarrain Apr 22, 2019
1445d01
dte.parse: augment `parse_dte_xml`
glarrain Apr 22, 2019
89196d3
dte.data_models: add fields to `DteDataL2`
glarrain Apr 22, 2019
e04e694
Merge pull request #21 from fyndata/feature/dte/many-improvements
glarrain Apr 23, 2019
6fa6e84
test_data.crypto: add real X.509 cert for '*.google.com'
glarrain Apr 23, 2019
c325d0b
tests: add functions to `utils`
glarrain Apr 24, 2019
9a3de55
test_data.sii: add "cleaned" version of a real DTE
glarrain Apr 23, 2019
dcadff9
test_data.sii: add modified versions of a real DTE
glarrain Apr 23, 2019
aac61f6
test_data.sii: add example cert by SII
glarrain Apr 24, 2019
a2ef9f4
test_data.sii: add a cert extracted from a real DTE
glarrain Apr 24, 2019
86b0bff
test_data.sii: add signature-related files for real DTE
glarrain Apr 24, 2019
88a2645
Merge pull request #22 from fyndata/feature/test_data/add-files
glarrain Apr 24, 2019
370417d
requirements: update 'pytz'
glarrain Apr 25, 2019
e6ad9ab
requirements: update 'djangorestframework' (extras)
glarrain Apr 25, 2019
893c13a
requirements: update 'lxml'
glarrain Apr 25, 2019
47f3fae
requirements: add 'cryptography'
glarrain Apr 25, 2019
acbfbba
requirements: add 'pyOpenSSL'
glarrain Apr 25, 2019
4bcdfbf
requirements: add 'signxml'
glarrain Apr 25, 2019
39e5295
requirements: update 'setuptools' (release)
glarrain Apr 25, 2019
3ceb81f
requirements: update dependencies of 'test' requirements
glarrain Apr 25, 2019
8d675be
Merge pull request #24 from fyndata/feature/requirements
glarrain Apr 25, 2019
cde9fe6
libs.xml_utils: fix class alias `XmlElementTree`
glarrain Apr 25, 2019
bb253dd
Merge pull request #25 from fyndata/bugfix/libs/xml_utils/xml-element…
glarrain Apr 25, 2019
1ca2152
test_data.sii: add "cleaned" version of a real DTE
glarrain Apr 25, 2019
2dd91a9
test_data.sii: add a cert extracted from a real DTE
glarrain Apr 25, 2019
e9eb28f
test_data.sii: add XML signature values extracted from real DTEs
glarrain Apr 25, 2019
2f5950c
Merge pull request #26 from fyndata/feature/test_data/add-files
glarrain Apr 25, 2019
99e3782
libs: add module `encoding_utils`
glarrain Apr 24, 2019
f013515
Merge pull request #27 from fyndata/feature/libs/add-encoding_utils
glarrain Apr 25, 2019
4e67218
libs: add module `crypto_utils`
glarrain Apr 10, 2019
56a9470
Merge pull request #28 from fyndata/feature/libs/add-crypto_utils
glarrain Apr 25, 2019
7d8e32b
dte.data_models: modify new fields of `DteDataL2`
glarrain Apr 25, 2019
c5a832f
Merge pull request #29 from fyndata/feature/dte/data_models/change-fi…
glarrain Apr 25, 2019
9df0300
HISTORY: update for new version
glarrain Apr 25, 2019
6eebdb8
Bump version: 0.4.0 → 0.5.0
glarrain Apr 25, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 0.4.0
current_version = 0.5.0
commit = True
tag = True

Expand Down
15 changes: 15 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,21 @@
History
-------

0.5.0 (2019-04-25)
+++++++++++++++++++++++

* (PR #29, 2019-04-25) dte.data_models: modify new fields of `DteDataL2`
* (PR #28, 2019-04-25) libs: add module `crypto_utils`
* (PR #27, 2019-04-25) libs: add module `encoding_utils`
* (PR #26, 2019-04-25) test_data: add files
* (PR #25, 2019-04-25) libs.xml_utils: fix class alias `XmlElementTree`
* (PR #24, 2019-04-25) requirements: add and update packages
* (PR #22, 2019-04-24) test_data: add files
* (PR #21, 2019-04-22) dte: many improvements
* (PR #20, 2019-04-22) libs.xml_utils: misc improvements
* (PR #19, 2019-04-22) test_data: fix and add real SII DTE & AEC XML files
* (PR #18, 2019-04-22) data.ref: add XML schemas for "Cesion" (RTC)

0.4.0 (2019-04-16)
+++++++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion cl_sii/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
"""


__version__ = '0.4.0'
__version__ = '0.5.0'
91 changes: 91 additions & 0 deletions cl_sii/data/ref/factura_electronica/schemas-xml/AEC_v10.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--Ultima modificaci�n : 22 de Junio 2005-->
<xs:schema targetNamespace="http://www.sii.cl/SiiDte" xmlns:SiiDte="http://www.sii.cl/SiiDte" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="Cesion_v10.xsd"/>
<xs:include schemaLocation="DTECedido_v10.xsd"/>
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsignature_v10.xsd"/>
<xs:element name="AEC">
<xs:annotation>
<xs:documentation>Archivo Electronico de Cesion</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="DocumentoAEC">
<xs:annotation>
<xs:documentation>Documento de AEC</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Caratula">
<xs:annotation>
<xs:documentation>Informacion de AEC</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="RutCedente" type="SiiDte:RUTType">
<xs:annotation>
<xs:documentation>RUT que Genera el Archivo de Transferencias</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RutCesionario" type="SiiDte:RUTType">
<xs:annotation>
<xs:documentation>RUT a Quien Va Dirigido el Archivo de Transferencias</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NmbContacto" type="SiiDte:NombreType" minOccurs="0">
<xs:annotation>
<xs:documentation>Persona de Contacto para aclarar dudas</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FonoContacto" type="SiiDte:FonoType" minOccurs="0">
<xs:annotation>
<xs:documentation>Telefono de Contacto</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MailContacto" type="SiiDte:MailType" minOccurs="0">
<xs:annotation>
<xs:documentation>Correo Electronico de Contacto</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TmstFirmaEnvio" type="xs:dateTime">
<xs:annotation>
<xs:documentation>Fecha y Hora de la Firma del Archivo de Transferencias</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:decimal" use="required" fixed="1.0"/>
</xs:complexType>
</xs:element>
<xs:element name="Cesiones">
<xs:annotation>
<xs:documentation>Cesiones</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="SiiDte:DTECedido">
<xs:annotation>
<xs:documentation>Representacion XML y Grafica del DTE Cedido</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="SiiDte:Cesion" maxOccurs="40">
<xs:annotation>
<xs:documentation>Informacion Electronica de Recepcion y Aceptacion del DTE por Parte del Receptor</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="ID" type="xs:ID" use="required"/>
</xs:complexType>
</xs:element>
<xs:element ref="ds:Signature">
<xs:annotation>
<xs:documentation>Firma Digital sobre Transferencia</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:string" use="required" fixed="1.0"/>
</xs:complexType>
</xs:element>
</xs:schema>
230 changes: 230 additions & 0 deletions cl_sii/data/ref/factura_electronica/schemas-xml/Cesion_v10.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!--Ultima Modificacion: 11 Diciembre 2008 -->
<xs:schema targetNamespace="http://www.sii.cl/SiiDte" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SiiDte="http://www.sii.cl/SiiDte" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="SiiTypes_v10.xsd"/>
<xs:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsignature_v10.xsd"/>
<!--
Fecha ultima actualizaci�n : 10-03-05 16:00
-->
<xs:element name="Cesion" type="SiiDte:CesionDefType">
<xs:annotation>
<xs:documentation>Envio de Informacion de Transferencias Electronicas</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="CesionDefType">
<xs:annotation>
<xs:documentation>Documento Tributario Electronico</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="DocumentoCesion">
<xs:complexType>
<xs:sequence>
<xs:element name="SeqCesion">
<xs:annotation>
<xs:documentation>Secuencia de Cesiones (1, 2, 3, ... )</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:positiveInteger">
<xs:totalDigits value="3"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="IdDTE">
<xs:annotation>
<xs:documentation>Identificacion del DTE Cedido</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="TipoDTE" type="SiiDte:DTEFacturasType">
<xs:annotation>
<xs:documentation>Tipo de DTE</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RUTEmisor" type="SiiDte:RUTType">
<xs:annotation>
<xs:documentation>RUT Emisor del DTE</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RUTReceptor" type="SiiDte:RUTType">
<xs:annotation>
<xs:documentation>RUT Receptor del DTE</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Folio" type="SiiDte:FolioType">
<xs:annotation>
<xs:documentation>Folio del DTE</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="FchEmis" type="xs:date">
<xs:annotation>
<xs:documentation>Fecha Emision Contable del DTE (AAAA-MM-DD)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MntTotal" type="SiiDte:MontoType">
<xs:annotation>
<xs:documentation>Monto Total del DTE</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Cedente">
<xs:annotation>
<xs:documentation>Identificacion del Cedente</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="RUT" type="SiiDte:RUTType">
<xs:annotation>
<xs:documentation>RUT del Cedente del DTE</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RazonSocial">
<xs:annotation>
<xs:documentation>Razon Social o Nombre del Cedente</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="SiiDte:RznSocLargaType">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Direccion">
<xs:annotation>
<xs:documentation>Direccion del Cedente</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="SiiDte:DireccType">
<xs:minLength value="5"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="eMail">
<xs:annotation>
<xs:documentation>Correo Electronico del Cedente</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="SiiDte:MailType">
<xs:minLength value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="RUTAutorizado" maxOccurs="3">
<xs:annotation>
<xs:documentation>Lista de Personas Autorizadas por el Cedente a Firmar la Transferencia</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="RUT" type="SiiDte:RUTType">
<xs:annotation>
<xs:documentation>RUT de Persona Autorizada</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Nombre" type="SiiDte:NombreType">
<xs:annotation>
<xs:documentation>Nombre de Persona Autorizada</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="DeclaracionJurada" minOccurs="0">
<xs:annotation>
<xs:documentation>Declaracion Jurada de Disponibilidad de Documentacion No Electronica</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="512"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Cesionario">
<xs:annotation>
<xs:documentation>Identificacion del Cesionario</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="RUT">
<xs:annotation>
<xs:documentation>RUT del Cesionario</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RazonSocial">
<xs:annotation>
<xs:documentation>Razon Social o Nombre del Cesionario</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="SiiDte:RznSocLargaType">
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="Direccion">
<xs:annotation>
<xs:documentation>Direccion del Cesionario</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="SiiDte:DireccType">
<xs:minLength value="5"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="eMail">
<xs:annotation>
<xs:documentation>Correo Electronico del Cesionario</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="SiiDte:MailType">
<xs:minLength value="6"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="MontoCesion" type="SiiDte:MontoType">
<xs:annotation>
<xs:documentation>Monto del Credito Cedido</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="UltimoVencimiento" type="xs:date">
<xs:annotation>
<xs:documentation>Fecha de Ultimo Vencimiento</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="OtrasCondiciones" minOccurs="0">
<xs:annotation>
<xs:documentation>Otras Condiciones de la Cesion</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="512"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="eMailDeudor" type="SiiDte:MailType" minOccurs="0">
<xs:annotation>
<xs:documentation>Correo Electronico del Deudor del DTE</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TmstCesion" type="xs:dateTime">
<xs:annotation>
<xs:documentation>TimeStamp de la Cesion del DTE</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="ID" type="xs:ID" use="required"/>
</xs:complexType>
</xs:element>
<xs:element ref="ds:Signature" maxOccurs="3">
<xs:annotation>
<xs:documentation>Firmas Digitales sobre Cesion</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="version" type="xs:decimal" use="required" fixed="1.0"/>
</xs:complexType>
</xs:schema>
Loading