Skip to Content

Cordial Saludo:

Comparto informe de anticipos de clientes por medio de pago.

SELECT T2.[LicTradNum], T0.[CardName], T0.[DocDate], T0.[DocNum], /*T0.[PayNoDoc], T0.[Canceled],T0.[BpAct],*/

CASE WHEN T0.[CashSum]>0 THEN T0.[CashSum] END AS EFECTIVO,

CASE WHEN (T0.[CreditSum]>0 AND  T1.[CreditCard] NOT IN (4, 6, 8)) THEN T0.[CreditSum] END AS “TARJETA CREDITO”,

CASE WHEN (T0.[CreditSum]>0 AND  T1.[CreditCard] IN (4, 6, 8)) THEN T0.[CreditSum] END AS “TARJETA DEBITO”,

CASE WHEN T0.[CheckSum]>0 THEN T0.[CheckSum] END AS “CHEQUE”,

CASE WHEN T0.[TrsfrSum]>0 THEN T0.[TrsfrSum] END AS “TRANSFERENCIA”,

T0.[DocTotal] AS TOTAL

FROM ORCT T0

LEFT JOIN RCT3 T1 ON T0.DocEntry = T1.DocNum

INNER JOIN OCRD T2 ON T0.[CardCode]=T2.[CardCode]

WHERE T0.[PayNoDoc]=’Y’

and T0.[Canceled]=’N’

and T0.[BpAct]=’28050501′

and T0.[DocDate] Between [%0] and  [%1]

A espera de sus comentarios e inquietudes.

To report this post you need to login first.

2 Comments

You must be Logged on to comment or reply to a post.

Leave a Reply