se adiciona NIE069 y NIE070
FossilOrigin-Name: e907e9c9bd118f8a86ca5a27ce283b2d5a4fedcf55f8a850b588480cbf793a79
This commit is contained in:
		| @@ -275,6 +275,7 @@ class FachoXML: | ||||
|         """ | ||||
|         xpath = self._path_xpath_for(xpath) | ||||
|         elem = self.get_element(xpath) | ||||
|  | ||||
|         for k, v in attrs.items(): | ||||
|             self.builder.set_attribute(elem, k, v) | ||||
|         return self | ||||
|   | ||||
| @@ -12,3 +12,4 @@ from .fe import DianZIP | ||||
| from .fe import AMBIENTE_PRUEBAS | ||||
| from .fe import AMBIENTE_PRODUCCION | ||||
| from . import form_xml | ||||
| from . import nomina | ||||
|   | ||||
							
								
								
									
										22
									
								
								tests/test_nomina.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								tests/test_nomina.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,22 @@ | ||||
| #!/usr/bin/env python | ||||
| # -*- coding: utf-8 -*- | ||||
| # This file is part of facho.  The COPYRIGHT file at the top level of | ||||
| # this repository contains the full copyright notices and license terms. | ||||
|  | ||||
| """Tests for `facho` package.""" | ||||
|  | ||||
| import pytest | ||||
|  | ||||
| from facho import fe | ||||
|  | ||||
| def test_adicionar_devengado_Basico(): | ||||
|     nomina = fe.nomina.DIANNominaIndividual() | ||||
|  | ||||
|     nomina.adicionar_devengado(fe.nomina.DevengadoBasico( | ||||
|         dias_trabajados = 30, | ||||
|         sueldo_trabajado = fe.nomina.Amount(1_000_000) | ||||
|     )) | ||||
|  | ||||
|     xml = nomina.toFachoXML() | ||||
|     assert xml.get_element_attribute('/fe:NominaIndividual/Devengados/Basico', 'DiasTrabajados') == '30' | ||||
|     assert xml.get_element_attribute('/fe:NominaIndividual/Devengados/Basico', 'SueldoTrabajado') == '1000000.0' | ||||
		Reference in New Issue
	
	Block a user