object srvComisiones: TsrvComisiones OldCreateOrder = True RequiresSession = True SessionManager = dmServer.SessionManager AcquireConnection = True ServiceSchema = schComisiones ServiceAdapter = DABINAdapter Left = 1112 Top = 198 Height = 300 Width = 300 object schComisiones: TDASchema ConnectionManager = dmServer.ConnectionManager DataDictionary = dmServer.DataDictionary Diagrams = dmServer.DADiagrams Datasets = < item Params = <> Statements = < item Connection = 'IBX' SQL = 'select VEN.NOMBRE as VENDEDOR, COM.COMISION as PORCENTAJE, 0 as ' + 'COMISION'#10'from CONTACTOS VEN, CONTACTOSCATEGORIAS CAT, COMISIONES' + ' COM'#10'where CAT.CODIGOCONTACTO = VEN.CODIGO'#10'and COM.CODIGOCONTACT' + 'O = VEN.CODIGO' StatementType = stSQL ColumnMappings = < item DatasetField = 'VENDEDOR' TableField = 'VENDEDOR' end item DatasetField = 'PORCENTAJE' TableField = 'PORCENTAJE' end item DatasetField = 'COMISION' TableField = 'COMISION' end> end> Name = 'VENDEDORESCOMISION' Fields = < item Name = 'VENDEDOR' DataType = datString Size = 100 BlobType = dabtUnknown DisplayWidth = 0 DisplayLabel = 'Vendedor' ReadOnly = True Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end item Name = 'PORCENTAJE' DataType = datFloat BlobType = dabtUnknown DefaultValue = '0' DisplayWidth = 0 DisplayLabel = 'Porcentaje' ReadOnly = True Alignment = taRightJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end item Name = 'COMISION' DataType = datFloat BlobType = dabtUnknown LogChanges = False DefaultValue = '0' DisplayWidth = 0 DisplayLabel = 'Comisi'#243'n' Alignment = taRightJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end> BusinessRulesClient.ScriptLanguage = rslPascalScript BusinessRulesServer.ScriptLanguage = rslPascalScript end item Params = < item Name = 'CODIGOCONTACTO' DataType = datInteger BlobType = dabtUnknown Value = '' ParamType = daptInput end> Statements = < item Connection = 'IBX' TargetTable = 'COMISIONES' SQL = 'SELECT '#10' COMISION'#10' FROM'#10' COMISIONES'#10'WHERE CODIGOCONTACTO ' + '= :CODIGOCONTACTO' StatementType = stSQL ColumnMappings = < item DatasetField = 'COMISION' TableField = 'COMISION' end> end> Name = 'COMISIONES' Fields = < item Name = 'COMISION' DataType = datFloat BlobType = dabtUnknown LogChanges = False DisplayWidth = 0 Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end> BusinessRulesClient.ScriptLanguage = rslPascalScript BusinessRulesServer.ScriptLanguage = rslPascalScript end item Params = < item Name = 'FECHAINI' BlobType = dabtUnknown Value = '' ParamType = daptInput end item Name = 'FECHAFIN' BlobType = dabtUnknown Value = '' ParamType = daptInput end> Statements = < item Connection = 'IBX' SQL = 'SELECT'#10' 1 as SELECCION, PAGOS.CODIGOEMPRESA, PAGOS.CODIGO, PA' + 'GOS.CODIGOCONTACTO,'#10' CONTACTOS.NOMBRE, PAGOS.FECHAPAGO, PAGOS' + '.IMPORTE, PAGOS.FORMAPAGO,'#10' PAGOS.DESCRIPCION, V_TIPOS_PAGO.T' + 'IPO,'#10' CONTACTOSCATEGORIAS.CODIGOCATEGORIA, CATEGORIAS.DESCRIP' + 'CION as CATEGORIA'#10#10'FROM PAGOS'#10'LEFT JOIN CONTACTOS ON (PAGOS.CODI' + 'GOCONTACTO = CONTACTOS.CODIGO)'#10'LEFT JOIN CONTACTOSCATEGORIAS ON ' + '(CONTACTOS.CODIGO = CONTACTOSCATEGORIAS.CODIGOCONTACTO)'#10'LEFT JOI' + 'N CATEGORIAS ON (CONTACTOSCATEGORIAS.CODIGOCATEGORIA = CATEGORIA' + 'S.CODIGO)'#10'LEFT JOIN V_TIPOS_PAGO ON (V_TIPOS_PAGO.CODIGO = PAGOS' + '.CODIGO)'#10#10'WHERE CONTACTOSCATEGORIAS.CODIGOCATEGORIA = 1'#10'AND PAGO' + 'S.FECHAPAGO between :FECHAINI and :FECHAFIN'#10'ORDER BY PAGOS.FECHA' + 'PAGO DESC' StatementType = stSQL ColumnMappings = < item DatasetField = 'SELECCION' TableField = 'SELECCION' end item DatasetField = 'CODIGOEMPRESA' TableField = 'CODIGOEMPRESA' end item DatasetField = 'CODIGO' TableField = 'CODIGO' end item DatasetField = 'CODIGOCONTACTO' TableField = 'CODIGOCONTACTO' end item DatasetField = 'NOMBRE' TableField = 'NOMBRE' end item DatasetField = 'FECHAPAGO' TableField = 'FECHAPAGO' end item DatasetField = 'IMPORTE' TableField = 'IMPORTE' end item DatasetField = 'FORMAPAGO' TableField = 'FORMAPAGO' end item DatasetField = 'DESCRIPCION' TableField = 'DESCRIPCION' end item DatasetField = 'CODIGOCATEGORIA' TableField = 'CODIGOCATEGORIA' end item DatasetField = 'CATEGORIA' TableField = 'CATEGORIA' end> end> Name = 'COBROSCOMISION' Fields = < item Name = 'SELECCION' DataType = datInteger BlobType = dabtUnknown DisplayWidth = 0 Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end item Name = 'CODIGOEMPRESA' DataType = datInteger BlobType = dabtUnknown DisplayWidth = 0 Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end item Name = 'CODIGO' DataType = datInteger BlobType = dabtUnknown DisplayWidth = 0 Alignment = taLeftJustify InPrimaryKey = True Calculated = False Lookup = False LookupCache = False end item Name = 'CODIGOCONTACTO' DataType = datInteger BlobType = dabtUnknown DisplayWidth = 0 Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end item Name = 'NOMBRE' DataType = datString Size = 100 BlobType = dabtUnknown DisplayWidth = 0 ReadOnly = True Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end item Name = 'FECHAPAGO' DataType = datDateTime BlobType = dabtUnknown DisplayWidth = 0 ReadOnly = True Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end item Name = 'IMPORTE' DataType = datFloat BlobType = dabtUnknown DisplayWidth = 0 ReadOnly = True Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end item Name = 'FORMAPAGO' DataType = datString Size = 50 BlobType = dabtUnknown DisplayWidth = 0 Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end item Name = 'DESCRIPCION' DataType = datString Size = 2000 BlobType = dabtUnknown DisplayWidth = 0 Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end item Name = 'TIPO' DataType = datString Size = 6 BlobType = dabtUnknown DisplayWidth = 0 Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end item Name = 'CODIGOCATEGORIA' DataType = datInteger BlobType = dabtUnknown DisplayWidth = 0 Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end item Name = 'CATEGORIA' DataType = datString Size = 100 BlobType = dabtUnknown DisplayWidth = 0 Alignment = taLeftJustify InPrimaryKey = False Calculated = False Lookup = False LookupCache = False end> BusinessRulesClient.ScriptLanguage = rslPascalScript BusinessRulesServer.ScriptLanguage = rslPascalScript end> Commands = < item Params = < item Name = 'CODIGOCONTACTO' DataType = datInteger BlobType = dabtUnknown Value = '' ParamType = daptInput end item Name = 'COMISION' DataType = datFloat BlobType = dabtUnknown Value = '' ParamType = daptInput end> Statements = < item Connection = 'IBX' TargetTable = 'COMISIONES' SQL = 'INSERT'#10' INTO COMISIONES'#10' (CODIGOCONTACTO, COMISION)'#10' VALUES' + #10' (:CODIGOCONTACTO, :COMISION)' StatementType = stSQL ColumnMappings = <> end> Name = 'Insert_COMISIONES' end item Params = < item Name = 'CODIGOCONTACTO' DataType = datInteger BlobType = dabtUnknown Value = '' ParamType = daptInput end> Statements = < item Connection = 'IBX' TargetTable = 'COMISIONES' SQL = 'DELETE '#10' FROM'#10' COMISIONES'#10' WHERE'#10' (CODIGOCONTACTO = :COD' + 'IGOCONTACTO)' StatementType = stSQL ColumnMappings = <> end> Name = 'Delete_COMISIONES' end item Params = < item Name = 'COMISION' DataType = datFloat BlobType = dabtUnknown Value = '' ParamType = daptInput end item Name = 'CODIGOCONTACTO' DataType = datInteger BlobType = dabtUnknown Value = '' ParamType = daptInput end> Statements = < item Connection = 'IBX' TargetTable = 'COMISIONES' SQL = 'UPDATE COMISIONES'#10' SET '#10' COMISION = :COMISION'#10' WHERE'#10' (C' + 'ODIGOCONTACTO = :CODIGOCONTACTO)' StatementType = stSQL ColumnMappings = <> end> Name = 'Update_COMISIONES' end> RelationShips = <> UpdateRules = <> Left = 32 Top = 24 end object DABINAdapter: TDABINAdapter Left = 32 Top = 80 end end