on 03-01-2014 4:09 PM
Estimados amigos
el reto que tengo es el siguiente
desde una oferta de venta se cotizan 10 items, el documento pasa a ser dos ordenes de venta (o 3 o solo 1) y luego entrega y factura,
pero de los 10 items solo se llegaron a vender una parte, digamos 7
como hago una consulta que de esos 3 items que no se vendieron?
en la qut1 estan los 10 items y los que no se vendieron no tienen el target y obviamente en la rdr1 solo hay 7 items
gracias
Buenas
Revisa el campo OenQty en la QUT1, es la cantidad pendiente de la linea.
Saludos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Estimado Felipe
esta bien
te aclaro un poco mas el problema
en este documento el 2388
se cotizaron 6 items
se pasaron 5 a orden de venta
(con el not in de la rdr1 filtro los que no estan en las dos transacciones )
pero tengo dos problemas
1 en la orden de venta se la creo con 5 items, pero posteriormente el usuario borro 1, asi que solo vendio 4.. ( con mi consulta encontre esa diferencia )
2 hay muchas ofertas que no pasaron a orden y aun estan abiertas .....
si hago esta consulta me devuelve tambien esas ofertas.. y solo quieren aquellas que se vendieron parcialmente
te adjunto mi consulta
select T0.OpenQty,Quantity,* from QUT1 T0
--where LineStatus='O' and targetype ='-1',targetentry is null
where
T0.DocEntry='2388'
and
t0.ItemCode not in (select t1.ItemCode from RDR1 t1 where t1.BaseEntry=t0.DocEntry)
User | Count |
---|---|
108 | |
12 | |
11 | |
6 | |
5 | |
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.