se adiciona faltantes obligatorios en InformacionGeneral
FossilOrigin-Name: 2dad4c3725349ce55968669763d7321d3e5dbecec951f9d01f2193b3bd4ab528
This commit is contained in:
		
							
								
								
									
										36
									
								
								facho/fe/data/dian/codelist/PeriodoNomina-2.1.gc
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								facho/fe/data/dian/codelist/PeriodoNomina-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.5.1 | ||||
| --> | ||||
| <gc:CodeList xmlns:gc="http://docs.oasis-open.org/codelist/ns/genericode/1.0/"> | ||||
| 	<Identification> | ||||
| 		<ShortName>PeriodoNomina</ShortName> | ||||
| 		<LongName xml:lang="es">Periodos Nomina</LongName> | ||||
| 		<Version>1</Version> | ||||
| 	</Identification> | ||||
| 	<ColumnSet> | ||||
| 		<Column Id="code" Use="required"> | ||||
| 			<ShortName>Code</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="code"> | ||||
| 				<SimpleValue>1</SimpleValue> | ||||
| 			</Value> | ||||
| 			<Value ColumnRef="name"> | ||||
| 				<SimpleValue>Semanal</SimpleValue> | ||||
| 			</Value> | ||||
| 		</Row> | ||||
|         </SimpleCodeList> | ||||
| </gc:CodeList> | ||||
| @@ -99,3 +99,5 @@ UnidadesMedida = CodeList(path_for_codelist('UnidadesMedida-2.1.gc'), 'code', 'n | ||||
| TipoTrabajador = CodeList(path_for_codelist('TipoTrabajador-2.1.gc'), 'code', 'name') | ||||
| SubTipoTrabajador = CodeList(path_for_codelist('SubTipoTrabajador-2.1.gc'), 'code', 'name') | ||||
| TipoContrato = CodeList(path_for_codelist('TipoContrato-2.1.gc'), 'code', 'name') | ||||
| PeriodoNomina = CodeList(path_for_codelist('PeriodoNomina-2.1.gc'), 'code', 'name') | ||||
| TipoMoneda = CodeList(path_for_codelist('TipoMoneda-2.1.gc'), 'code', 'name') | ||||
|   | ||||
| @@ -33,6 +33,27 @@ class NumeroSecuencia: | ||||
|         fragment.set_attributes('./NumeroSecuenciaXML', | ||||
|                                 Numero = self.numero) | ||||
|          | ||||
|  | ||||
| @dataclass | ||||
| class PeriodoNomina: | ||||
|     code: str | ||||
|     name: str = '' | ||||
|  | ||||
|     def __post_init__(self): | ||||
|         if self.code not in codelist.PeriodoNomina: | ||||
|             raise ValueError("code [%s] not found" % (self.code)) | ||||
|         self.name = codelist.PeriodoNomina[self.code]['name'] | ||||
|  | ||||
| @dataclass | ||||
| class TipoMoneda: | ||||
|     code: str | ||||
|     name: str = '' | ||||
|  | ||||
|     def __post_init__(self): | ||||
|         if self.code not in codelist.TipoMoneda: | ||||
|             raise ValueError("code [%s] not found" % (self.code)) | ||||
|         self.name = codelist.TipoMoneda[self.code]['name'] | ||||
|  | ||||
| @dataclass | ||||
| class InformacionGeneral: | ||||
|     class TIPO_AMBIENTE: | ||||
| @@ -48,6 +69,8 @@ class InformacionGeneral: | ||||
|  | ||||
|     fecha_generacion: str | ||||
|     hora_generacion: str | ||||
|     periodo_nomina: PeriodoNomina | ||||
|     tipo_moneda: TipoMoneda | ||||
|     tipo_ambiente: TIPO_AMBIENTE | ||||
|     software_pin: str | ||||
|  | ||||
| @@ -69,6 +92,10 @@ class InformacionGeneral: | ||||
|                                 FechaGen = self.fecha_generacion, | ||||
|                                 # NIE027 | ||||
|                                 HoraGen = self.hora_generacion, | ||||
|                                 # NIE029 | ||||
|                                 PeriodoNomina = self.periodo_nomina.code, | ||||
|                                 # NIE030 | ||||
|                                 TipoMoneda = self.tipo_moneda.code | ||||
|                                 # TODO(bit4bit) resto... | ||||
|                                 # ..... | ||||
|                                 ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user