on 05-22-2014 6:47 PM
Hola buen día
Alguien ha sacado la fecha del ultimo pago que se le ha hecho a una factura? ( Si realizan pagos parciales)
Tengo problemas con las ligas hice una query pero solo me saca la liga del primer pago y lo que necesito es estar actualizando la fecha del ultimo pago que se ha generado a una factura. Alguien tiene idea de como pordría hacerlo?
Muchas gracias!
Saludos!
Muchas gracias lo que pasa era que el pago se estaba generando mal y en lugar de ligar a la factura se ligaba al registro de la factura por eso no me salia el segundo pago :S jeje.
SELECT top 1 t0.DocDate FROM OVPM T0
LEFT JOIN VPM2 T1 ON T0.DocEntry = T1.DocNum
LEFT JOIN OPCH T2 ON T1.DocEntry = T2.DocEntry
WHERE T2.[DocNum] = 84721
order by t0.DocEntry desc
asi quedo la query Saludos!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Para facturas de clientes puedes basarte en este
Select top 1 t0.DocEntry, t1.CardName, t0.SumApplied, t1.DocDate
From RCT2 t0 inner join ORCT t1 on t0.DocNum = t1.DocEntry
Where t0.DocEntry ='79' /* aqui cambia el numero de factura por la que requieras */
Order by t1.DocDate desc
Saludos !
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola Yazmin
Podria porfavor compartir el Query generado para sobre ese hacer los cambios
Saludos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
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.