on 06-11-2015 12:58 AM
HOLA FORO BUEN DIA,
NECESITO LEER EL NUMERO DE PEDIDO AL MOMENTO PREVIO DE CREAR UNA FACTURA PARA REALIZAR UNA COMPARACION
SE QUE EN COMENTARIOS LO COLOCA PERO SOLO HASTA CREARSE LA FACTURA ARROJA EL CONTENIDO DE COMENTARIOS EN DONDE VIENE ADJUNTO EL NUMERO DE PEDIDO.
SALUDOS
Buen día
Prueba este query como busqueda formateada
if (select $[$38.43.0])='17'
begin
select top 1 DocNum from ORDR where DocEntry= $[$38.45.0]
end if (select $[$38.43.0])='15'
begin
if (select top 1 BaseType from DLN1 where DocEntry=$[$38.45.0])='17'
begin
select top 1 DocNum from ORDR where DocEntry=(select top 1 BaseEntry from DLN1 where DocEntry=$[$38.45.0])
end
end
else
select 0
Saludos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
En las filas del documento podrás ver una columna que te única el número de documento origen. Si la factura proviene de un pedido, te mostrará el número de pedido, ya sea durante la captura y también después de registrar el documento. La cosa es navegar haca las columnas de la derecha y si no la observas la muestras desde Parametrizaciones De formulario. La columna se llama "Referencia base". La columna "Tipo base" te informará el tipo de documento origen, p ej Pesido o Cotización.
Tu pregunta no es muy clara, ya que no defines como necesitas el resultado:
si lo quieres para una impresión o en un campo de usuario con ayuda de una búsqueda formateada lo consigues (ver respuesta de Felipe). Si lo quieres ver en una columna y que el usuario pueda ver en la misma factura te puedes apoyar en mi respuesta.
Saludos,
JC.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
103 | |
12 | |
11 | |
6 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.