on 06-03-2011 7:05 PM
Compañeros Foristas, les expongo un detalle que me paso en una factura de anticipo.
Se realiza una Factura de Anticipo de cliente, despues se cancela por nota de credito, y hasta ahi todo bien.
Voy a Factura de Cliente e intento buscar el anticipo y no lo muestra.
pero al momento que realizo la siguiente consulta, me aparece como abierto.
SELECT T0.[DocNum], T0.[DocDate], T0.[CardCode], T0.[CardName] FROM ODPI T0 WHERE T0.[DpmStatus] = 'O'
como podria hacer para cambiarle el estatus a cerrado
Salu2.
Hola Jorge:
Prueba con la siguiente consulta:
SELECT T0.[DocEntry], T0.[DocNum], T0.[ObjType], T0.[Posted], T0.[FolioPref], T0.[FolioNum],
T0.[CardCode], T0.[CardName], T0.[NumAtCard], T0.[DocDate], T0.[DocDueDate], T0.[CancelDate],
T0.[DocTotal], T0.[DpmAppl] + T0.[DpmAppVat], T0.[DocTotalSy], T0.[DpmApplSc] + T0.[DpmAppVatS],
T0.[DocTotalFC], T0.[DpmApplFc] + T0.[DpmAppVatF], T0.[VatSum], T0.[DpmAppVat], T0.[VatSumSy],
T0.[DpmAppVatS], T0.[VatSumFC], T0.[DpmAppVatF], T0.[DocCur], T0.[DocEntry], T0.[Installmnt],
T0.[TaxDate], T0.[TransId], T0.[DocEntry], T0.[DocEntry], T0.[DocEntry], T1.[LineType], T0.[RoundDif],
T0.[RoundDifSy], T0.[RoundDifFC], T1.[DpApplGrs], T1.[DpApplGrsS], T1.[DpApplGrsF]
FROM [dbo].[ODPI] T0
LEFT OUTER JOIN [dbo].[DPI15] T1 ON T1.[DocEntry] = T0.[DocEntry]
WHERE T0.[CANCELED] = ('N ') AND T0.[DpmStatus] = ('O ') AND T0.[DpmDrawn] = ('N ') AND
T0.[PaidSum] <> (0.000000) AND (T0.[Posted] = ('Y ') OR (T0.[Posted] = ('N ') AND
T0.[DocStatus] = ('C ') ))
Slds,
Oscar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hola,
Es que el campo del status es T0.[DocStatus] y no T0.DpmStatus
Saludos,
Tere
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 | |
4 | |
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.