fix: se agrega variable para mostrar mensaje correspondiente a las peticiones y respuestas solicitados por el auditor del frontend.
This commit is contained in:
@@ -667,28 +667,36 @@ def auditar_peticion_respuesta_pedimento_completo(request):
|
||||
pedimento_app = pedimento.pedimento_app
|
||||
tipo_documento_peticion = None
|
||||
tipo_documento_respuesta = None
|
||||
vista = 'desconocido'
|
||||
|
||||
if vista_auditar == 'pc':
|
||||
tipo_documento_peticion = 13
|
||||
tipo_documento_respuesta = 14
|
||||
vista = 'Pedimento Completo'
|
||||
elif vista_auditar == 'rm':
|
||||
tipo_documento_peticion = 15
|
||||
tipo_documento_respuesta = 16
|
||||
vista = 'Remesa'
|
||||
elif vista_auditar == 'pt':
|
||||
tipo_documento_peticion = 17
|
||||
tipo_documento_respuesta = 18
|
||||
vista = 'Partidas'
|
||||
elif vista_auditar == 'cove':
|
||||
tipo_documento_peticion = 19
|
||||
tipo_documento_respuesta = 20
|
||||
vista = 'COVEs'
|
||||
elif vista_auditar == 'edoc':
|
||||
tipo_documento_peticion = 21
|
||||
tipo_documento_respuesta = 22
|
||||
vista = 'Edocuments'
|
||||
elif vista_auditar == 'ac_cove':
|
||||
tipo_documento_peticion = 23
|
||||
tipo_documento_respuesta = 24
|
||||
vista = 'Acuses COVEs'
|
||||
elif vista_auditar == 'ac':
|
||||
tipo_documento_peticion = 25
|
||||
tipo_documento_respuesta = 26
|
||||
vista = 'Acuses'
|
||||
|
||||
if not tipo_documento_peticion and not tipo_documento_respuesta:
|
||||
return Response(
|
||||
@@ -712,7 +720,7 @@ def auditar_peticion_respuesta_pedimento_completo(request):
|
||||
|
||||
if not documentos_peticion and not documentos_respuesta:
|
||||
return Response(
|
||||
{'error': 'Registro de documentos de petición y respuesta de partidas no encontrado'},
|
||||
{'error': f'Registro de documentos de petición y respuesta de {vista} no encontrado(s)'},
|
||||
status=status.HTTP_404_NOT_FOUND
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user