Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8526

Re: Nombre de IC desaparece en Pago recibido

$
0
0

El problema te dá por que PLD sólo te liga la primera factura que esté siendo afectada, imagino.

 

Siendo así, Recomendaría que mejor crees el formato desde Crystal Reports. Lo planteo así por que los formatos PLD suelen estar limitados para el tema de edición y  en base al planteamiento inicial, muy probablemente vas a tener más de un escenario.

 

Adjunto un código de ejemplo (Así se sefiniría la consulta del reporte crystal) sólo hay que asegurarse de crear un parámetro llamado DocKey@ que es el que usa SAP para mandar la clave del documento en pantalla al Reporteador.

 

Anexo código

 

declare @num float

declare @mon VARCHAR(10)

declare @LETRAS varchar(200)

 

SET @num=(select case t0.doccurr when 'MXP' then t0.doctotal else t0.doctotalfc end from orct t0 where t0.docentry={?Dockey@})

SET @mon=(select case t0.doccurr when 'MXP' then 'PESOS' else 'DOLARES' end from orct t0 where t0.docentry={?Dockey@})

execute sp_Num2Let @num,@mon,@LETRAS output

 

SELECT T0.[DocNum], T0.[DocCurr], T0.[DocRate], T0.[DocDate],T1.[SumApplied], T1.[vatApplied], T1.[WtAppld], T0.[NoDocSum], T0.[PayMth],t4.*,@letras,

CASE  when isnull(T0.CheckSum,0)!=0 then 'CHEQUE'

WHEN  isnull(T0.TrsfrSum,0)!=0 then 'TRANSFERENCIA'

WHEN isnull(T0.CashSum,0)!=0 then 'EFECTIVO' END AS PAGO

 

 

FROM ORCT T0  INNER JOIN RCT2 T1 ON T0.DocEntry = T1.DocNum inner join  (SELECT top 1 T3.[CardCode], T3.[CardName], T1.[Street], T1.[U_BXP_EXTNUM], T1.[Block], T1.[County], T1.[ZipCode], T1.[Country], T1.[State],

T3.[LicTradNum] FROM OCRD T3  INNER JOIN CRD1 T1 ON T3.CardCode = T1.CardCode

INNER JOIN OSLP T2 ON T3.SlpCode = T2.SlpCode where t3.cardcode=(select t5.cardcode from orct t5 where t5.docentry={?Dockey@})

) t4 on t4.cardcode=t0.cardcode, OINV T2

WHERE T1.[DocNum]= T0.[DocNum]  and

T1.[DocEntry]=T2.[DocEntry]

and t0.docentry={?Dockey@}


Viewing all articles
Browse latest Browse all 8526

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>