-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #139 from fyntex/develop
Release v0.11.0
- Loading branch information
Showing
13 changed files
with
194 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[bumpversion] | ||
current_version = 0.10.1 | ||
current_version = 0.11.0 | ||
commit = True | ||
tag = True | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# GitHub Dependabot Configuration | ||
# | ||
# Documentation: | ||
# https://docs.github.com/en/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: pip | ||
directory: / | ||
schedule: | ||
interval: daily | ||
time: "08:30" | ||
timezone: America/Santiago | ||
open-pull-requests-limit: 3 | ||
labels: | ||
- dependencies |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,4 +5,4 @@ | |
""" | ||
|
||
|
||
__version__ = '0.10.1' | ||
__version__ = '0.11.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
""" | ||
SII RTC/RPETC | ||
============= | ||
Concepts and acronyms used interchangeably: | ||
* "Registro Transferencia de Crédito" (RTC) | ||
* "Registro Público Electrónico de Transferencia de Crédito" (RPETC) | ||
* "Registro Electrónico de Cesión de Créditos" | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import enum | ||
from typing import FrozenSet | ||
|
||
from cl_sii.dte.constants import TipoDteEnum | ||
|
||
|
||
# The collection of "tipo DTE" for which it is possible to "ceder" a "DTE". | ||
# They are defined in a document and also an XML schema. | ||
# - Document "Formato Archivo Electrónico de Cesión (AEC)" | ||
# (http://www.sii.cl/factura_electronica/cesion.pdf) are: | ||
# > Sólo códigos 33, 34, 46 y 43 | ||
# - XML element 'CesionDefType/DocumentoCesion/IdDTE/TipoDTE' | ||
# - description: "Tipo de DTE" | ||
# - XML type: 'SiiDte:DTEFacturasType' | ||
# - source: | ||
# https://github.com/fyntex/lib-cl-sii-python/blob/7e1c4b52/cl_sii/data/ref/factura_electronica/schemas-xml/Cesion_v10.xsd#L38-L42 | ||
# - XML type 'SiiDte:DTEFacturasType' in official schema 'SiiTypes_v10.xsd' | ||
# - source: | ||
# https://github.com/fyntex/lib-cl-sii-python/blob/7e1c4b52/cl_sii/data/ref/factura_electronica/schemas-xml/SiiTypes_v10.xsd#L100-L126 | ||
TIPO_DTE_CEDIBLES: FrozenSet[TipoDteEnum] = frozenset({ | ||
TipoDteEnum.FACTURA_ELECTRONICA, | ||
TipoDteEnum.FACTURA_NO_AFECTA_O_EXENTA_ELECTRONICA, | ||
TipoDteEnum.FACTURA_COMPRA_ELECTRONICA, | ||
TipoDteEnum.LIQUIDACION_FACTURA_ELECTRONICA, | ||
}) | ||
|
||
|
||
@enum.unique | ||
class RolContribuyenteEnCesion(enum.Enum): | ||
|
||
""" | ||
"Rol" of "contribuyente" in a "cesion". | ||
""" | ||
|
||
CEDENTE = 'CEDENTE' | ||
"""Cesiones en las que el contribuyente ha sido cedente i.e. ha cedido""" | ||
|
||
CESIONARIO = 'CESIONARIO' | ||
"""Cesiones en las que el contribuyente ha sido cesionario i.e. le han cedido""" | ||
|
||
DEUDOR = 'DEUDOR' | ||
"""Cesiones de DTEs en que el contribuyente es el deudor.""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import unittest | ||
|
||
from cl_sii.rtc.constants import TIPO_DTE_CEDIBLES | ||
|
||
|
||
class TipoDteCediblesTest(unittest.TestCase): | ||
|
||
# For 'TIPO_DTE_CEDIBLES' | ||
|
||
def test_all_are_factura(self) -> None: | ||
for element in TIPO_DTE_CEDIBLES: | ||
self.assertTrue(element.is_factura) | ||
|
||
# TODO: implement test that check that the values correspond to those defined in | ||
# XML type 'SiiDte:DTEFacturasType' in official schema 'SiiTypes_v10.xsd'. |