on 06-03-2016 9:18 PM
Select
T0.U_Area,
T0.DocNum CodPedido,
case T0.DocStatus when 'C' then 'Cerrado' when 'O' then 'Abierto' end Estado,
T0.DocDate FechaPedido,
T0.CardName,
T0.GrosProfit TotalAntDescuento,
T0.VatSum,
T0.TotalExpns Propina,
T0.DocTotal,
T0.PaidToDate,
TX.SlpName Ejecutiva,T3.DocNum,
T3.DocNum Facturacion,
T3.NumAtCard Referencia,
T3.DocDate FechaFac,
T3.CardName Cliente,
T3.U_Nombre FacANombreDe,
isnull(T3.GrosProfit,0) AntDesc,
isnull(T3.VatSum,0) Impuesto,
isnull(T3.TotalExpns,0) Propina,
isnull(T3.DocTotal,0) TotalFac,
isnull(T3.DocTotal,0) - isnull(T3.PaidToDate,0) Saldo,
TY.SlpName EjecFac,
T3.ReceiptNum NoPago,
Case
WHEN ISNULL(T3.ReceiptNum,0) = 0 then 0
ELSE isnull(T3.PaidToDate,0)
END montoPagado
--isnull(T3.PaidToDate,0) montoPagadoT
from ORDR T0
left join RDR1 T1 ON T0.DocEntry = T1.DocEntry
Left join OSLP TX ON T0.SlpCode = TX.SlpCode
Left join INV1 T2 ON T0.DocNum = T2.BaseRef and T0.DocEntry = T2.BaseEntry
Left join OINV T3 ON T3.DocEntry = T2.DocEntry
Left join OSLP TY ON TY.SlpCode = T3.SlpCode
Where T0.U_Area = '01' AND T0.[DocDate] >=[%1] and T0.[DocDate] <=[%2]
group by T0.U_Area,T0.DocNum,T0.DocStatus,T0.DocDate,
T0.CardName,T0.GrosProfit,T0.VatSum,T0.TotalExpns,T0.DocTotal,
T0.PaidToDate,TX.SlpName,T3.DocNum,T3.NumAtCard,T3.DocDate,T3.CardName,
T3.U_Nombre,T3.GrosProfit,T3.VatSum,T3.TotalExpns,
T3.DocTotal,T3.PaidToDate,TY.SlpName,T3.ReceiptNum
Hola Alma,
La línea 6 de tu resultado no muestra flecha ni número de documento porque según tu consulta, debería mostrar el número de documento de venta (T3.DocNum) y aún no se ha generado la factura para ésta orden.
Slds.
Sarah R.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gracias Gerardo,
Saludos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Saludos Alma.
Cuando consideres pertinente, no olvides cerrar tu discusión:
Gracias Gerardo.
ya hice tu recomendación pero solo me aparece el enlace del Docentry, el campo numero de documento no me enlaza.aparece como inactivo siempre
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola Alma.
De hecho lo "normal" es que la flecha de enlace la contenga el DocEntry y esto tiene justificación, el DocEntry es UNICO, no así el DocNum y sobre todo en el caso de la tabla OINV donde puedes tener dos DocNum similares, recuerda que en esta tabla se almacena tanto Facturas como Notas de Cargo y es muy probable que tengas el mismo DocNum en ambos documentos.
Mi recomendación, si necesitas la flecha de enlace, trabaja con el DocEntry.
Veo que eres nueva en la comunidad, te recomiendo dar lectura al siguiente documento:
http://scn.sap.com/community/spanish/blog/2016/01/12/porque-se-debe-de-cerrar-una-discusi%C3%B3n
A que te refieres con "deshabilitada", ¿Le das clic y no te redirige al documento?
Al lado de ese campo agrega el DocEntry (T3.DocEntry) Y verifica que funcione.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
98 | |
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.