Ajustando RegimenFiscal

facho/fe/data/dian/codelist/RegimenFiscal-2.1.custom.gc: nueva lista
facho/fe/form.py (Responsability): nueva clase

FossilOrigin-Name: fde15d01925fe3f58ca79e4eaf5bee18d98a459a8ffa929cca2f176734fdd569
This commit is contained in:
2020-09-05 23:15:43 +00:00
parent eb01812bac
commit ac770e4545
3 changed files with 79 additions and 8 deletions

View File

@@ -0,0 +1,50 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- DIAN Genericode listas de valores:: Ultima modificación 18-02-2019 - evb-->
<gc:CodeList xmlns:gc="http://docs.oasis-open.org/codelist/ns/genericode/1.0/">
<Identification>
<ShortName>RegimenFiscal</ShortName>
<LongName xml:lang="es">Regimen Fiscal</LongName>
<Version>1</Version>
<CanonicalUri>urn:dian:names:especificacion:ubl:listacodigos:gc:RegimenFiscal</CanonicalUri>
<CanonicalVersionUri>urn:dian:names:especificacion:ubl:listacodigos:gc:RegimenFiscal</CanonicalVersionUri>
<LocationUri>http://dian.gov.co/ubl/os-ubl-2.0/cl/gc/default/RegimenFiscal.gc</LocationUri>
<Agency>
<LongName xml:lang="es">DIAN (Dirección de Impuestos y Aduanas Nacionales)</LongName>
<Identifier>195</Identifier>
</Agency>
</Identification>
<ColumnSet>
<Column Id="code" Use="required">
<ShortName>Code</ShortName>
<LongName xml:lang="es">Codigo Comun</LongName>
<Data Type="normalizedString"/>
</Column>
<Column Id="name" Use="required">
<ShortName>Name</ShortName>
<LongName xml:lang="es">Nombre</LongName>
<Data Type="string"/>
</Column>
<Key Id="codeKey">
<ShortName>CodeKey</ShortName>
<ColumnRef Ref="code"/>
</Key>
</ColumnSet>
<SimpleCodeList>
<Row>
<Value ColumnRef="code">
<SimpleValue>48</SimpleValue>
</Value>
<Value ColumnRef="name">
<SimpleValue>responsable del impuesto sobre las ventas IVA</SimpleValue>
</Value>
</Row>
<Row>
<Value ColumnRef="code">
<SimpleValue>49</SimpleValue>
</Value>
<Value ColumnRef="name">
<SimpleValue>No responsable de IVA</SimpleValue>
</Value>
</Row>
</SimpleCodeList>
</gc:CodeList>

View File

@@ -49,6 +49,8 @@ class CodeList:
def __getitem__(self, key):
return self.rows[str(key)]
def __contains__(self, key):
return key in self.rows
def by_name(self, name):
for k, v in self.rows.items():
@@ -69,7 +71,8 @@ __all__ = ['TipoOrganizacion',
'TipoAmbiente',
'TipoDocumento',
'CodigoPrecioReferencia',
'MediosPago']
'MediosPago',
'RegimenFiscal']
def path_for_codelist(name):
return os.path.join(DATA_DIR, name)
@@ -81,3 +84,4 @@ TipoAmbiente = CodeList(path_for_codelist('TipoAmbiente-2.1.gc'), 'code', 'name'
TipoDocumento = CodeList(path_for_codelist('TipoDocumento-2.1.gc'), 'code', 'name')
CodigoPrecioReferencia = CodeList(path_for_codelist('CodigoPrecioReferencia-2.1.gc'), 'code', 'name')
MediosPago = CodeList(path_for_codelist('MediosPago-2.1.gc'), 'code', 'name')
RegimenFiscal = CodeList(path_for_codelist('RegimenFiscal-2.1.custom.gc'), 'code', 'name')