se adicionan archivos faltantes
FossilOrigin-Name: 32b80e8ede4097e4596f01ad450f5b45afa379d5ae6cb9f293eb96aa0e1d2fbb
This commit is contained in:
parent
fb88d56652
commit
aa3e14de95
36
facho/fe/data/dian/codelist/Idioma-2.1.gc
Normal file
36
facho/fe/data/dian/codelist/Idioma-2.1.gc
Normal file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
creado por facho, la dian tiene oficial?
|
||||
poblar usando anexo tecnico 5.3.1
|
||||
-->
|
||||
<gc:CodeList xmlns:gc="http://docs.oasis-open.org/codelist/ns/genericode/1.0/">
|
||||
<Identification>
|
||||
<ShortName>Idioma</ShortName>
|
||||
<LongName xml:lang="es">Idioma</LongName>
|
||||
<Version>1</Version>
|
||||
</Identification>
|
||||
<ColumnSet>
|
||||
<Column Id="iso-639-1" Use="required">
|
||||
<ShortName>ISO 639 1</ShortName>
|
||||
<Data Type="normalizedString"/>
|
||||
</Column>
|
||||
<Column Id="name" Use="required">
|
||||
<ShortName>Nombre</ShortName>
|
||||
<Data Type="normalizedString"/>
|
||||
</Column>
|
||||
<Key Id="codeKey">
|
||||
<ShortName>CodeKey</ShortName>
|
||||
<ColumnRef Ref="code"/>
|
||||
</Key>
|
||||
</ColumnSet>
|
||||
<SimpleCodeList>
|
||||
<Row>
|
||||
<Value ColumnRef="iso-639-1">
|
||||
<SimpleValue>es</SimpleValue>
|
||||
</Value>
|
||||
<Value ColumnRef="name">
|
||||
<SimpleValue>Español, castellano</SimpleValue>
|
||||
</Value>
|
||||
</Row>
|
||||
</SimpleCodeList>
|
||||
</gc:CodeList>
|
24
facho/fe/nomina/lugar.py
Normal file
24
facho/fe/nomina/lugar.py
Normal file
@ -0,0 +1,24 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
from .pais import Pais
|
||||
from .departamento import Departamento
|
||||
from .municipio import Municipio
|
||||
from facho.fe.data.dian import codelist
|
||||
|
||||
@dataclass
|
||||
class Lugar:
|
||||
pais: Pais
|
||||
departamento: Departamento
|
||||
municipio: Municipio
|
||||
idioma: str = 'es'
|
||||
|
||||
def __post_init__(self):
|
||||
if self.idioma not in codelist.IdiomaISO6391:
|
||||
raise ValueError("idioma [%s] not found" % (self.code))
|
||||
codelist.IdiomaISO6391[self.idioma]['iso-639-1']
|
||||
|
||||
def apply(self, fragment, root):
|
||||
fragment.set_attributes(root,
|
||||
Pais=self.pais.code,
|
||||
DepartamentoEstado=self.departamento.code,
|
||||
MunicipioCiudad=self.municipio.code)
|
Loading…
Reference in New Issue
Block a user