on 01-17-2014 10:27 PM
Buena tarde estoy tratando de crear una alerta que porga en aviso a ciertos usuarios cuando un pago efectuado a Cuenta a un proveedor ya llevan 3 dias de vencimiento y aun no se ha efectuado el pago, si alguien me puede ayudar a enriquecer o modificar el query que
por el momento llevo, estare agradecido.
saludos cordiales
SELECT CardCode, CardName, DocEntry, DocDate, DocDueDate, DATEDIFF(DAY,DocDueDate,GETDATE())'Dias Atraso', DocTotal
FROM OVPM
WHERE DATEDIFF(DAY,DocDueDate,GETDATE()) >= 3
ORDER BY DocDueDate
Disculpe Armando,
Una consulta: cuando dice "y aun no se ha efectuado el pago" a que se refiere?
Espero sus comentarios para intentar colaborarle.
Atte. Rosa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola Armando,
Le dejo un query para ver si le sirve. Agregue el criterio de que el pago no estuviera cancelado y compara la fecha de contabilización con la fecha del dia de hoy.
SELECT T0.[DocNum]
, T0.[DocDate]
, T0.[CardCode]
, T0.[CardName]
, T0.[DocTotal]
FROM OVPM T0
WHERE T0.[PayNoDoc] = 'Y'
AND T0.[Canceled] = 'N'
AND DATEDIFF (dd, T0.DocDate, GetDate()) = 3
Atte. Rosa
User | Count |
---|---|
94 | |
11 | |
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.