@@ -314,8 +314,19 @@ def Consultar(self, id_persona):
314314 self .actividades = [act ["idActividad" ] for act in actividades ]
315315 cat_mt = data_mt .get ("categoriaMonotributo" , {})
316316 self .analizar_datos (cat_mt )
317+ self .impuestos_detallados = impuestos
318+
317319 return not self .errores
320+
321+ @inicializar_y_capturar_excepciones
322+ def ObtenerCampoImpuesto (self , id_impuesto , campo ):
323+ "Devuelve el detalle de un campo del impuesto"
324+ for impuesto in self .impuestos_detallados :
325+ id_imp = impuesto .get ("idImpuesto" , "" )
326+ if id_impuesto == id_imp :
327+ return impuesto .get (campo , "" )
318328
329+ return ""
319330
320331def main ():
321332 "Función principal de pruebas (obtener CAE)"
@@ -415,7 +426,7 @@ def main():
415426 try :
416427
417428 if "--prueba" in sys .argv :
418- id_persona = "20000000516 "
429+ id_persona = "20201731594 "
419430 else :
420431 id_persona = len (sys .argv ) > 1 and sys .argv [1 ] or "20267565393"
421432
@@ -443,6 +454,14 @@ def main():
443454 print ("MT" , padron .monotributo , padron .actividad_monotributo )
444455 print ("Empleador" , padron .empleador )
445456
457+ #Agrego Impuestos Detallados
458+ for id_impuesto in padron .impuestos :
459+ print ("Id Impuesto: " , id_impuesto )
460+ print ("Descripcion Impuesto: " , padron .ObtenerCampoImpuesto (id_impuesto , "descripcion" ))
461+ print ("Motivo: " , padron .ObtenerCampoImpuesto (id_impuesto , "motivo" ))
462+ print ("Estado Impuesto: " , padron .ObtenerCampoImpuesto (id_impuesto , "estadoImpuesto" ))
463+ print ("Periodo: " , padron .ObtenerCampoImpuesto (id_impuesto , "periodo" ))
464+
446465 if padron .Excepcion :
447466 print ("Excepcion:" , padron .Excepcion )
448467 # ver padron.errores para el detalle
0 commit comments