Varela_PuntosVenta/Source/Modulos/VentasTerminadas/Servidor/srvVentasTerminadas_Impl.dfm
2008-05-06 17:55:55 +00:00

471 lines
14 KiB
Plaintext

object srvVentasTerminadas: TsrvVentasTerminadas
OldCreateOrder = True
SessionManager = dmServer.SessionManager
AcquireConnection = True
ServiceSchema = schVentasTerminadas
ServiceAdapter = DABINAdapter
OnAfterProcessTransactionAction = pptaNone
ExportedDataTables = <>
CacheElements = <>
Options = [rsoProcessDeltasWithoutUpdateRules]
Height = 297
Width = 298
object schVentasTerminadas: TDASchema
ConnectionManager = dmServer.ConnectionManager
DataDictionary = dmServer.DataDictionary
Diagrams = dmServer.DADiagrams
Datasets = <
item
Params = <
item
Name = 'fechaini'
DataType = datString
Size = 10
Value = ''
ParamType = daptInput
end
item
Name = 'fechafin'
DataType = datString
Size = 10
Value = ''
ParamType = daptInput
end
item
Name = 'coleccion'
DataType = datString
Size = 10
Value = ''
ParamType = daptInput
end>
Statements = <
item
Connection = 'GFT_VARELA'
SQL =
'begin'#10' declare @fechaini varchar(10)'#10' declare @fechafin ' +
'varchar(10)'#10' declare @coleccion varchar(10)'#10' declare @sq' +
'l varchar(8000)'#10#10' set @fechaini = :fechaini'#10' set @fechaf' +
'in = :fechafin'#10' set @coleccion = :coleccion'#10#10' if @colecc' +
'ion = '#39'%'#39#10' select @sql = '#39'SELECT DIA, SUM(VALTOT) AS TOTAL' +
' FROM RDX_V_VENTASTERMINADAS WHERE FECHA BETWEEN CONVERT(DATETIM' +
'E, '#39#39#39' + @FECHAINI + '#39#39#39', 103) AND CONVERT(DATETIME, '#39#39#39' + @FECH' +
'AFIN + '#39#39#39', 103) GROUP BY DIA'#39#10' else'#10' select @sql = '#39'S' +
'ELECT DIA, SUM(VALTOT) AS TOTAL FROM RDX_V_VENTASTERMINADAS WHER' +
'E FECHA BETWEEN CONVERT(DATETIME, '#39#39#39' + @FECHAINI + '#39#39#39', 103) AN' +
'D CONVERT(DATETIME, '#39#39#39' + @FECHAFIN + '#39#39#39', 103) AND COLECCION LI' +
'KE '#39#39#39' + @COLECCION + '#39#39#39' GROUP BY DIA'#39#10#10' EXECUTE crosstab @' +
'sql,'#10' '#39'SUM(VALTOT)'#39','#10' '#39'CENTRO'#39','#10' ' +
' '#39'RDX_V_VENTASTERMINADAS'#39#10'end'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'VentasTerminadasCrossTab'
Fields = <>
end
item
Params = <
item
Name = 'FECHAINI'
Value = '02/02/2008'
ParamType = daptInput
end
item
Name = 'FECHAFIN'
Value = '03/03/2008'
ParamType = daptInput
end>
Statements = <
item
Connection = 'GFT_VARELA'
TargetTable = 'RDX_V_VENTASTERMINADAS'
SQL =
'SELECT '#10' NUMINF, CLAVE1, CLAVE2, CLAVE3, FECHA, DIA, DIASEMAN' +
'A, '#10' MES, ANO, CENTRO, VENDEDOR, NUMTALON, CODIGO, PRODUCTO,'#10 +
' GRUPOPRODUCTO, TIPOPRODUCTO, COLECCION, COLOR,'#10' TALLA, TA' +
'LLA36, TALLA38, TALLA40, TALLA42, TALLA44, TALLA46,'#10' TALLA48,' +
' VTATERMDEV, VTAFINALRESC, VENTAS, DEVOLUCIONES, TOTAL,'#10' VALT' +
'ERMDEV, VALFINALRESC, VALVEN, VALDEV, VALTOT'#10' FROM'#10' RDX_V_VE' +
'NTASTERMINADAS'#10' WHERE FECHA BETWEEN :FECHAINI AND :FECHAFIN'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'NUMINF'
TableField = 'NUMINF'
end
item
DatasetField = 'CLAVE1'
TableField = 'CLAVE1'
end
item
DatasetField = 'CLAVE2'
TableField = 'CLAVE2'
end
item
DatasetField = 'CLAVE3'
TableField = 'CLAVE3'
end
item
DatasetField = 'FECHA'
TableField = 'FECHA'
end
item
DatasetField = 'DIA'
TableField = 'DIA'
end
item
DatasetField = 'DIASEMANA'
TableField = 'DIASEMANA'
end
item
DatasetField = 'MES'
TableField = 'MES'
end
item
DatasetField = 'ANO'
TableField = 'ANO'
end
item
DatasetField = 'CENTRO'
TableField = 'CENTRO'
end
item
DatasetField = 'VENDEDOR'
TableField = 'VENDEDOR'
end
item
DatasetField = 'NUMTALON'
TableField = 'NUMTALON'
end
item
DatasetField = 'CODIGO'
TableField = 'CODIGO'
end
item
DatasetField = 'PRODUCTO'
TableField = 'PRODUCTO'
end
item
DatasetField = 'GRUPOPRODUCTO'
TableField = 'GRUPOPRODUCTO'
end
item
DatasetField = 'TIPOPRODUCTO'
TableField = 'TIPOPRODUCTO'
end
item
DatasetField = 'COLECCION'
TableField = 'COLECCION'
end
item
DatasetField = 'COLOR'
TableField = 'COLOR'
end
item
DatasetField = 'TALLA'
TableField = 'TALLA'
end
item
DatasetField = 'TALLA38'
TableField = 'TALLA38'
end
item
DatasetField = 'TALLA40'
TableField = 'TALLA40'
end
item
DatasetField = 'TALLA42'
TableField = 'TALLA42'
end
item
DatasetField = 'TALLA44'
TableField = 'TALLA44'
end
item
DatasetField = 'TALLA46'
TableField = 'TALLA46'
end
item
DatasetField = 'TALLA48'
TableField = 'TALLA48'
end
item
DatasetField = 'VTATERMDEV'
TableField = 'VTATERMDEV'
end
item
DatasetField = 'VTAFINALRESC'
TableField = 'VTAFINALRESC'
end
item
DatasetField = 'VENTAS'
TableField = 'VENTAS'
end
item
DatasetField = 'DEVOLUCIONES'
TableField = 'DEVOLUCIONES'
end
item
DatasetField = 'TOTAL'
TableField = 'TOTAL'
end
item
DatasetField = 'VALTERMDEV'
TableField = 'VALTERMDEV'
end
item
DatasetField = 'VALFINALRESC'
TableField = 'VALFINALRESC'
end
item
DatasetField = 'VALVEN'
TableField = 'VALVEN'
end
item
DatasetField = 'VALDEV'
TableField = 'VALDEV'
end
item
DatasetField = 'VALTOT'
TableField = 'VALTOT'
end
item
DatasetField = 'TALLA36'
TableField = 'TALLA36'
end>
end>
Name = 'VentasTerminadas'
Fields = <
item
Name = 'NUMINF'
DataType = datString
Size = 35
InPrimaryKey = True
end
item
Name = 'CLAVE1'
DataType = datDecimal
InPrimaryKey = True
end
item
Name = 'CLAVE2'
DataType = datInteger
InPrimaryKey = True
end
item
Name = 'CLAVE3'
DataType = datInteger
InPrimaryKey = True
end
item
Name = 'FECHA'
DataType = datDateTime
DisplayLabel = 'Fecha'
end
item
Name = 'DIA'
DataType = datInteger
DisplayLabel = 'D'#237'a'
end
item
Name = 'DIASEMANA'
DataType = datWideString
Size = 30
DisplayLabel = 'D'#237'a de la semana'
end
item
Name = 'MES'
DataType = datWideString
Size = 30
DisplayLabel = 'Mes'
end
item
Name = 'ANO'
DataType = datInteger
DisplayLabel = 'A'#241'o'
end
item
Name = 'CENTRO'
DataType = datString
Size = 25
DisplayLabel = 'Centro'
end
item
Name = 'VENDEDOR'
DataType = datString
Size = 66
DisplayLabel = 'Vendedor'
end
item
Name = 'NUMTALON'
DataType = datString
Size = 35
end
item
Name = 'CODIGO'
DataType = datString
Size = 12
DisplayLabel = 'C'#243'digo producto'
end
item
Name = 'PRODUCTO'
DataType = datString
Size = 40
DisplayLabel = 'Producto'
end
item
Name = 'GRUPOPRODUCTO'
DataType = datString
Size = 25
DisplayLabel = 'Grupo'
end
item
Name = 'TIPOPRODUCTO'
DataType = datString
Size = 25
DisplayLabel = 'Tipo'
end
item
Name = 'COLECCION'
DataType = datString
Size = 6
DisplayLabel = 'Colecci'#243'n'
end
item
Name = 'COLOR'
DataType = datString
Size = 10
DisplayLabel = 'Color'
end
item
Name = 'TALLA'
DataType = datString
Size = 8
DisplayLabel = 'Talla'
Alignment = taRightJustify
end
item
Name = 'TALLA36'
DataType = datDecimal
DisplayLabel = '36'
Alignment = taRightJustify
end
item
Name = 'TALLA38'
DataType = datDecimal
DisplayLabel = '38'
Alignment = taRightJustify
end
item
Name = 'TALLA40'
DataType = datDecimal
DisplayLabel = '40'
Alignment = taRightJustify
end
item
Name = 'TALLA42'
DataType = datDecimal
DisplayLabel = '42'
Alignment = taRightJustify
end
item
Name = 'TALLA44'
DataType = datDecimal
DisplayLabel = '44'
Alignment = taRightJustify
end
item
Name = 'TALLA46'
DataType = datDecimal
DisplayLabel = '46'
Alignment = taRightJustify
end
item
Name = 'TALLA48'
DataType = datDecimal
DisplayLabel = '48'
Alignment = taRightJustify
end
item
Name = 'VTATERMDEV'
DataType = datDecimal
DisplayLabel = 'Vta.Term/Dev'
Alignment = taRightJustify
end
item
Name = 'VTAFINALRESC'
DataType = datDecimal
DisplayLabel = 'Vta.Final/Resc'
Alignment = taRightJustify
end
item
Name = 'VENTAS'
DataType = datDecimal
DisplayLabel = 'Ventas'
Alignment = taRightJustify
end
item
Name = 'DEVOLUCIONES'
DataType = datDecimal
DisplayLabel = 'Devoluciones'
Alignment = taRightJustify
end
item
Name = 'TOTAL'
DataType = datDecimal
DisplayLabel = 'Total ventas'
Alignment = taRightJustify
end
item
Name = 'VALTERMDEV'
DataType = datCurrency
DecimalPrecision = 2
DisplayLabel = 'Val.Term/Dev'
Alignment = taRightJustify
end
item
Name = 'VALFINALRESC'
DataType = datCurrency
DecimalPrecision = 2
LogChanges = False
DisplayLabel = 'Val.Final/Resc'
ReadOnly = True
Alignment = taRightJustify
ServerCalculated = True
end
item
Name = 'VALVEN'
DataType = datCurrency
DecimalPrecision = 2
DisplayLabel = 'Imp. ventas'
Alignment = taRightJustify
end
item
Name = 'VALDEV'
DataType = datCurrency
DecimalPrecision = 2
DisplayLabel = 'Imp. devoluciones'
Alignment = taRightJustify
end
item
Name = 'VALTOT'
DataType = datCurrency
DecimalPrecision = 2
DisplayLabel = 'Imp. Total'
Alignment = taRightJustify
end>
end>
JoinDataTables = <>
UnionDataTables = <>
Commands = <>
RelationShips = <>
UpdateRules = <>
Version = 0
Left = 56
Top = 32
end
object DABINAdapter: TDABINAdapter
Left = 56
Top = 96
end
end