SELECT COUNT( DISTINCT Pd_Cve_Plantilla_Documento) as Docs FROM Plantilla_Documento WHERE Pd_Cve_Plantilla_Documento IN (SELECT Pd_Cve_Plantilla_Documento FROM Plantilla_Documento_Transaccion WHERE Pdt_Transaccion = 'VN034') SELECT Producto.Pr_Descripcion, Contrato_Consignacion_Venta_Detalle.*, Contrato_Consignacion_Venta.* FROM Contrato_Consignacion_Venta INNER JOIN Contrato_Consignacion_Venta_Detalle ON Contrato_Consignacion_Venta_Detalle.Ccv_Folio = Contrato_Consignacion_Venta.Ccv_Folio INNER JOIN Producto ON Contrato_Consignacion_Venta_Detalle.Pr_Cve_Producto = Producto.Pr_Cve_Producto WHERE Contrato_Consignacion_Venta.Ccv_Folio = '01-0000003' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_FILTRAR_NIVEL_EMPRESA' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_SALIDA_DEVOLUCION_PROVEEDOR' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'GEN_ORDEN_LOTE_AUTOMATICO' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'GEN_LOTE_AUTOMATICO' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_VALIDAR_DISPONIBILIDAD_NEGATIVA' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_VALIDAR_PORCENTAJE_VARIACION' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_CANTIDAD_DEPURACION_INVENTARIO' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_ENTRADA_AJUSTE_COSTO' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_MOVIMIENTO_ACANCELAR_ENFECHA_TRANSACCION' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_VALIDAR_INVENTARIO_MAXIMO' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_MOVIMIENTO_SERIE' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_CANCELAR_ENFECHA_TRANSACCION' SELECT TOP 100 Contrato_Consignacion_Venta.Ccv_Folio AS CLAVE, Ccv_Fecha AS FECHA, Cliente.Cl_Razon_Social AS CLIENTE, Ccv_Almacen_Cliente AS ALMACEN, Contrato_Consignacion_Venta.Es_Cve_Estado AS ESTADO, '' FROM Contrato_Consignacion_Venta INNER JOIN Sucursal ON Contrato_Consignacion_Venta.Sc_Cve_Sucursal = Sucursal.Sc_Cve_Sucursal INNER JOIN Cliente ON Contrato_Consignacion_Venta.Cl_Cve_Cliente = Cliente.Cl_Cve_Cliente WHERE ( Contrato_Consignacion_Venta.Ccv_Folio LIKE '%%' OR Cliente.Cl_Razon_Social LIKE '%%' OR Contrato_Consignacion_Venta.Ccv_Almacen_Cliente LIKE '%%' ) /*Date2 AND Ccv_Fecha BETWEEN #Date1 AND #Date2 */ SELECT SQL FROM EMPRESAS..Consultas WHERE Clave = 'CONTRATO_CONSIGNACION_VENTA' SELECT DISTINCT Texto,ID,Transaccion from Configuracion_Etiqueta where (Transaccion = '' or Transaccion = '%') ORDER BY Transaccion DESC SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'GEN_FORMATO_MONEDA' SELECT FontSize FROM EMPRESAS..Operadores WHERE Operador = 'CONFIG' SELECT 'SI' EXISTE FROM EMPRESAS..sysobjects sysobjects INNER JOIN EMPRESAS..syscolumns syscolumns ON sysobjects.id = syscolumns.id WHERE sysobjects.name = 'Operadores' AND syscolumns.name = 'FontSize' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM EMPRESAS..Configuracion WHERE Cf_Variable = 'GEN_MODO_CONSULTA' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM EMPRESAS..Configuracion WHERE Cf_Variable = 'GEN_Max_RegistrosConsulta' SELECT COUNT( DISTINCT Pd_Cve_Plantilla_Documento) as Docs FROM Plantilla_Documento WHERE Pd_Cve_Plantilla_Documento IN (SELECT Pd_Cve_Plantilla_Documento FROM Plantilla_Documento_Transaccion WHERE Pdt_Transaccion = 'VN034') SELECT Producto.Pr_Descripcion, Contrato_Consignacion_Venta_Detalle.*, Contrato_Consignacion_Venta.* FROM Contrato_Consignacion_Venta INNER JOIN Contrato_Consignacion_Venta_Detalle ON Contrato_Consignacion_Venta_Detalle.Ccv_Folio = Contrato_Consignacion_Venta.Ccv_Folio INNER JOIN Producto ON Contrato_Consignacion_Venta_Detalle.Pr_Cve_Producto = Producto.Pr_Cve_Producto WHERE Contrato_Consignacion_Venta.Ccv_Folio = '01-0000003' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_FILTRAR_NIVEL_EMPRESA' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_SALIDA_DEVOLUCION_PROVEEDOR' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'GEN_ORDEN_LOTE_AUTOMATICO' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'GEN_LOTE_AUTOMATICO' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_VALIDAR_DISPONIBILIDAD_NEGATIVA' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_VALIDAR_PORCENTAJE_VARIACION' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_CANTIDAD_DEPURACION_INVENTARIO' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_ENTRADA_AJUSTE_COSTO' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_MOVIMIENTO_ACANCELAR_ENFECHA_TRANSACCION' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_VALIDAR_INVENTARIO_MAXIMO' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_MOVIMIENTO_SERIE' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_CANCELAR_ENFECHA_TRANSACCION' SELECT Cl_Razon_Social FROM Cliente WHERE Cl_Cve_Cliente = '0000000210' AND Es_Cve_Estado <> 'BA' SELECT Vn_Descripcion FROM Vendedor WHERE Vn_Cve_Vendedor = '0000000006' AND Es_Cve_Estado <> 'BA' SELECT Al_Descripcion FROM Almacen WHERE Sc_Cve_Sucursal = '0001' AND Al_Cve_Almacen = '0001' AND Es_Cve_Estado <> 'BA' SELECT Al_Descripcion FROM Almacen WHERE Sc_Cve_Sucursal = '0001' AND Al_Cve_Almacen = '0001' AND Es_Cve_Estado <> 'BA' SELECT Sc_Descripcion FROM Sucursal WHERE Sc_Cve_Sucursal = '0001' and Es_Cve_Estado <> 'BA' SELECT Mn_Descripcion FROM Moneda WHERE Mn_Cve_Moneda = 'MXN' and Es_Cve_Estado <> 'BA' SELECT COUNT( DISTINCT Pd_Cve_Plantilla_Documento) as Docs FROM Plantilla_Documento WHERE Pd_Cve_Plantilla_Documento IN (SELECT Pd_Cve_Plantilla_Documento FROM Plantilla_Documento_Transaccion WHERE Pdt_Transaccion = 'VN034') SELECT Producto.Pr_Descripcion, Contrato_Consignacion_Venta_Detalle.*, Contrato_Consignacion_Venta.* FROM Contrato_Consignacion_Venta INNER JOIN Contrato_Consignacion_Venta_Detalle ON Contrato_Consignacion_Venta_Detalle.Ccv_Folio = Contrato_Consignacion_Venta.Ccv_Folio INNER JOIN Producto ON Contrato_Consignacion_Venta_Detalle.Pr_Cve_Producto = Producto.Pr_Cve_Producto WHERE Contrato_Consignacion_Venta.Ccv_Folio = '01-0000003' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_FILTRAR_NIVEL_EMPRESA' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_SALIDA_DEVOLUCION_PROVEEDOR' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'GEN_ORDEN_LOTE_AUTOMATICO' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'GEN_LOTE_AUTOMATICO' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_VALIDAR_DISPONIBILIDAD_NEGATIVA' SELECT Cf_Tipo, Cf_Descripcion, Cf_Valor FROM Configuracion WHERE Cf_Variable = 'MOV_VALIDAR_PORCENTAJE_VARIACION'