object srvFacturasCliente: TsrvFacturasCliente
  OldCreateOrder = True
  SessionManager = dmServer.SessionManager
  AcquireConnection = True
  ConnectionName = 'IBX'
  ServiceAdapter = DABINAdapter
  Left = 723
  Top = 288
  Height = 490
  Width = 347
  object TDASchema
    ConnectionManager = dmServer.ConnectionManager
    DataDictionary = dmServer.DataDictionary
    Diagrams = dmServer.DADiagrams
    Datasets = <
      item
        Params = <>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FACTURASCLIENTE'
            SQL = 'SELECT * FROM DAR_REFERENCIA_FACTURACLIENTE'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end>
          end>
        Name = 'DarReferenciaFactura'
        Fields = <
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'REFERENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FACTURASCLIENTE'
            SQL = 
              'SELECT '#10'    CODIGO, FECHAALTA, FECHAVENCIMIENTO, USUARIO, FECHAF' +
              'ACTURA, CLASEFACTURA,'#10'    REFERENCIA, PAGADA, BASEIMPONIBLE, IVA' +
              ', IMPORTEIVA, IMPORTETOTAL, DESCUENTO,'#10'    IMPORTEDESCUENTO, OBS' +
              'ERVACIONES, FORMAPAGO, CODIGOCONTACTO, NIFCIF, NOMBRE,'#10'    CALLE' +
              ', PROVINCIA, CODIGOPOSTAL, POBLACION, CODIGOOBRA'#10'  FROM'#10'    FACT' +
              'URASCLIENTE'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'FECHAALTA'
                TableField = 'FECHAALTA'
              end
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end
              item
                DatasetField = 'FECHAFACTURA'
                TableField = 'FECHAFACTURA'
              end
              item
                DatasetField = 'BASEIMPONIBLE'
                TableField = 'BASEIMPONIBLE'
              end
              item
                DatasetField = 'IVA'
                TableField = 'IVA'
              end
              item
                DatasetField = 'IMPORTEIVA'
                TableField = 'IMPORTEIVA'
              end
              item
                DatasetField = 'IMPORTETOTAL'
                TableField = 'IMPORTETOTAL'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'FORMAPAGO'
                TableField = 'FORMAPAGO'
              end
              item
                DatasetField = 'CODIGOCONTACTO'
                TableField = 'CODIGOCONTACTO'
              end
              item
                DatasetField = 'NIFCIF'
                TableField = 'NIFCIF'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'CALLE'
                TableField = 'CALLE'
              end
              item
                DatasetField = 'PROVINCIA'
                TableField = 'PROVINCIA'
              end
              item
                DatasetField = 'CODIGOPOSTAL'
                TableField = 'CODIGOPOSTAL'
              end
              item
                DatasetField = 'POBLACION'
                TableField = 'POBLACION'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'CLASEFACTURA'
                TableField = 'CLASEFACTURA'
              end
              item
                DatasetField = 'PAGADA'
                TableField = 'PAGADA'
              end
              item
                DatasetField = 'CODIGOOBRA'
                TableField = 'CODIGOOBRA'
              end
              item
                DatasetField = 'FECHAVENCIMIENTO'
                TableField = 'FECHAVENCIMIENTO'
              end
              item
                DatasetField = 'DESCUENTO'
                TableField = 'DESCUENTO'
              end
              item
                DatasetField = 'IMPORTEDESCUENTO'
                TableField = 'IMPORTEDESCUENTO'
              end>
          end>
        Name = 'FacturasCliente'
        Fields = <
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            DictionaryEntry = 'CODIGOFACTURACLIENTE'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHAALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FECHAALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHAVENCIMIENTO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'USUARIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHAFACTURA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            DictionaryEntry = 'FECHAFACTURA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CLASEFACTURA'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'REFERENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PAGADA'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'BASEIMPONIBLE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'BASEIMPONIBLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IVA'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTEIVA'
            DataType = datCurrency
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Importe IVA'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTETOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Importe total'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTEDESCUENTO'
            DataType = datFloat
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taRightJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'OBSERVACIONES'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FORMAPAGO'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'FORMAPAGO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'C'#243'd. contacto'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NIFCIF'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DictionaryEntry = 'NIFCIF'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Nombre'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 150
            BlobType = dabtUnknown
            DictionaryEntry = 'CALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 30
            BlobType = dabtUnknown
            DictionaryEntry = 'PROVINCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOPOSTAL'
            DataType = datString
            Size = 5
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOPOSTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 40
            BlobType = dabtUnknown
            DictionaryEntry = 'POBLACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Cod. obra'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'CODIGOFACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'DETALLESFACTURASCLIENTE'
            SQL = 
              'SELECT '#10'    CODIGOFACTURA, NUMCONCEPTO, DESCRIPCION, CANTIDAD, '#10 +
              '    IMPORTEUNIDAD, IMPORTETOTAL, POSICION, TIPO'#10'  FROM'#10'    DETAL' +
              'LESFACTURASCLIENTE'#10'  WHERE CODIGOFACTURA = :CODIGOFACTURA'#10'  ORDE' +
              'R BY POSICION;'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'NUMCONCEPTO'
                TableField = 'NUMCONCEPTO'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'CANTIDAD'
                TableField = 'CANTIDAD'
              end
              item
                DatasetField = 'IMPORTEUNIDAD'
                TableField = 'IMPORTEUNIDAD'
              end
              item
                DatasetField = 'IMPORTETOTAL'
                TableField = 'IMPORTETOTAL'
              end
              item
                DatasetField = 'POSICION'
                TableField = 'POSICION'
              end
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end
              item
                DatasetField = 'CODIGOFACTURA'
                TableField = 'CODIGOFACTURA'
              end>
          end>
        Name = 'DetallesFacturasCliente'
        Fields = <
          item
            Name = 'CODIGOFACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            DictionaryEntry = 'CODIGOFACTURACLIENTE'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NUMCONCEPTO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'NUMCONCEPTO'
            InPrimaryKey = True
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'POSICIONCONCEPTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 1
            Description = 'Cap'#237'tulo, etc'
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            DictionaryEntry = 'TIPODETALLESFACTURACLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 2000
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Descripci'#243'n'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CANTIDAD'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'Cantidad'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTEUNIDAD'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'IMPORTEUNIDAD'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTETOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'IMPORTETOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FACTURASCLIENTE'
            SQL = 
              'SELECT '#10'    CODIGO, FECHAALTA, FECHAVENCIMIENTO, USUARIO, CLASEF' +
              'ACTURA, FECHAFACTURA,'#10'    REFERENCIA, PAGADA, BASEIMPONIBLE, IVA' +
              ', IMPORTEIVA, IMPORTETOTAL, OBSERVACIONES,'#10'    FORMAPAGO, CODIGO' +
              'CONTACTO, NIFCIF, NOMBRE, CALLE, PROVINCIA, CODIGOPOSTAL,'#10'    PO' +
              'BLACION, CODIGOOBRA'#10'  FROM'#10'    FACTURASCLIENTE'#10'  WHERE CODIGO = ' +
              ':CODIGO'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'CODIGO'
                TableField = 'CODIGO'
              end
              item
                DatasetField = 'FECHAALTA'
                TableField = 'FECHAALTA'
              end
              item
                DatasetField = 'USUARIO'
                TableField = 'USUARIO'
              end
              item
                DatasetField = 'CODIGOCONTACTO'
                TableField = 'CODIGOCONTACTO'
              end
              item
                DatasetField = 'BASEIMPONIBLE'
                TableField = 'BASEIMPONIBLE'
              end
              item
                DatasetField = 'IVA'
                TableField = 'IVA'
              end
              item
                DatasetField = 'IMPORTEIVA'
                TableField = 'IMPORTEIVA'
              end
              item
                DatasetField = 'IMPORTETOTAL'
                TableField = 'IMPORTETOTAL'
              end
              item
                DatasetField = 'OBSERVACIONES'
                TableField = 'OBSERVACIONES'
              end
              item
                DatasetField = 'FORMAPAGO'
                TableField = 'FORMAPAGO'
              end
              item
                DatasetField = 'NOMBRE'
                TableField = 'NOMBRE'
              end
              item
                DatasetField = 'NIFCIF'
                TableField = 'NIFCIF'
              end
              item
                DatasetField = 'CALLE'
                TableField = 'CALLE'
              end
              item
                DatasetField = 'CODIGOPOSTAL'
                TableField = 'CODIGOPOSTAL'
              end
              item
                DatasetField = 'POBLACION'
                TableField = 'POBLACION'
              end
              item
                DatasetField = 'FECHAFACTURA'
                TableField = 'FECHAFACTURA'
              end
              item
                DatasetField = 'PROVINCIA'
                TableField = 'PROVINCIA'
              end
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end
              item
                DatasetField = 'CLASEFACTURA'
                TableField = 'CLASEFACTURA'
              end
              item
                DatasetField = 'PAGADA'
                TableField = 'PAGADA'
              end
              item
                DatasetField = 'CODIGOOBRA'
                TableField = 'CODIGOOBRA'
              end
              item
                DatasetField = 'FECHAVENCIMIENTO'
                TableField = 'FECHAVENCIMIENTO'
              end>
          end>
        Name = 'InformeCabeceraFacturaCliente'
        Fields = <
          item
            Name = 'CODIGO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            DictionaryEntry = 'CODIGOFACTURACLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHAALTA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DictionaryEntry = 'FECHAALTA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHAVENCIMIENTO'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'USUARIO'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'USUARIO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CLASEFACTURA'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FECHAFACTURA'
            DataType = datDateTime
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            DictionaryEntry = 'FECHAFACTURACLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'REFERENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PAGADA'
            DataType = datString
            Size = 1
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOCONTACTO'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            DisplayLabel = 'C'#243'd. contacto'
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'BASEIMPONIBLE'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'BASEIMPONIBLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IVA'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'IVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTEIVA'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'IMPORTEIVA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTETOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'IMPORTETOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'OBSERVACIONES'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'OBSERVACIONES'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'FORMAPAGO'
            DataType = datMemo
            BlobType = dabtUnknown
            DictionaryEntry = 'FORMAPAGO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NIFCIF'
            DataType = datString
            Size = 10
            BlobType = dabtUnknown
            DictionaryEntry = 'NIFCIF'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NOMBRE'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'NOMBRE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CALLE'
            DataType = datString
            Size = 150
            BlobType = dabtUnknown
            DictionaryEntry = 'CALLE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'PROVINCIA'
            DataType = datString
            Size = 30
            BlobType = dabtUnknown
            DictionaryEntry = 'PROVINCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOPOSTAL'
            DataType = datString
            Size = 5
            BlobType = dabtUnknown
            DictionaryEntry = 'CODIGOPOSTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POBLACION'
            DataType = datString
            Size = 40
            BlobType = dabtUnknown
            DictionaryEntry = 'POBLACION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CODIGOOBRA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <
          item
            Name = 'CODIGOFACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            Value = ''
            ParamType = daptInput
          end>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'DETALLESFACTURASCLIENTE'
            SQL = 
              'SELECT '#10'    CODIGOFACTURA, NUMCONCEPTO, DESCRIPCION, CANTIDAD, '#10 +
              '    IMPORTEUNIDAD, IMPORTETOTAL, POSICION, TIPO'#10'  FROM'#10'    DETAL' +
              'LESFACTURASCLIENTE'#10'  WHERE CODIGOFACTURA = :CODIGOFACTURA'#10'  ORDE' +
              'R BY POSICION'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'NUMCONCEPTO'
                TableField = 'NUMCONCEPTO'
              end
              item
                DatasetField = 'DESCRIPCION'
                TableField = 'DESCRIPCION'
              end
              item
                DatasetField = 'CANTIDAD'
                TableField = 'CANTIDAD'
              end
              item
                DatasetField = 'IMPORTEUNIDAD'
                TableField = 'IMPORTEUNIDAD'
              end
              item
                DatasetField = 'IMPORTETOTAL'
                TableField = 'IMPORTETOTAL'
              end
              item
                DatasetField = 'TIPO'
                TableField = 'TIPO'
              end
              item
                DatasetField = 'POSICION'
                TableField = 'POSICION'
              end
              item
                DatasetField = 'CODIGOFACTURA'
                TableField = 'CODIGOFACTURA'
              end>
          end>
        Name = 'InformeDetallesFacturaCliente'
        Fields = <
          item
            Name = 'CODIGOFACTURA'
            DataType = datInteger
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            DictionaryEntry = 'CODIGOFACTURACLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'NUMCONCEPTO'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'NUMCONCEPTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'DESCRIPCION'
            DataType = datString
            Size = 100
            BlobType = dabtUnknown
            DictionaryEntry = 'DESCRIPCION'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'CANTIDAD'
            DataType = datFloat
            BlobType = dabtUnknown
            DictionaryEntry = 'CANTIDAD'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTEUNIDAD'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'IMPORTEUNIDAD'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'IMPORTETOTAL'
            DataType = datCurrency
            BlobType = dabtUnknown
            DictionaryEntry = 'IMPORTETOTAL'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'TIPO'
            DataType = datString
            Size = 1
            Description = 'Cap'#237'tulo, etc'
            BlobType = dabtUnknown
            DisplayWidth = 0
            Alignment = taLeftJustify
            DictionaryEntry = 'TIPODETALLESFACTURACLIENTE'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end
          item
            Name = 'POSICION'
            DataType = datInteger
            BlobType = dabtUnknown
            DictionaryEntry = 'POSICIONCONCEPTO'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end
      item
        Params = <>
        Statements = <
          item
            Connection = 'IBX'
            TargetTable = 'FACTURASCLIENTE'
            SQL = 'SELECT * FROM DAR_REFERENCIA_FACTURAPROFORMA'
            StatementType = stSQL
            ColumnMappings = <
              item
                DatasetField = 'REFERENCIA'
                TableField = 'REFERENCIA'
              end>
          end>
        Name = 'DarReferenciaFacturaProforma'
        Fields = <
          item
            Name = 'REFERENCIA'
            DataType = datString
            Size = 20
            BlobType = dabtUnknown
            DictionaryEntry = 'REFERENCIA'
            InPrimaryKey = False
            Calculated = False
            Lookup = False
            LookupCache = False
          end>
        BusinessRulesClient.ScriptLanguage = rslPascalScript
        BusinessRulesServer.ScriptLanguage = rslPascalScript
      end>
    Commands = <>
    RelationShips = <
      item
        Name = 'FK_DetallesFacturasCliente_FacturasCliente'
        MasterDatasetName = 'FacturasCliente_Refresh'
        MasterFields = 'CODIGO'
        DetailDatasetName = 'DetallesFacturasCliente'
        DetailFields = 'CODIGOFACTURA'
      end
      item
        Name = 'FK_InformeDetallesFacturaCliente_InformeCabeceraFacturaCliente'
        MasterDatasetName = 'InformeCabeceraFacturaCliente'
        MasterFields = 'CODIGO'
        DetailDatasetName = 'InformeDetallesFacturaCliente'
        DetailFields = 'CODIGOFACTURA'
      end>
    UpdateRules = <
      item
        Name = 'Insert FacturasCliente'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'FacturasCliente'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update FacturasCliente'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'FacturasCliente'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete DetallesFacturasCliente'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'DetallesFacturasCliente'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Insert DetallesFacturasCliente'
        DoUpdate = False
        DoInsert = True
        DoDelete = False
        DatasetName = 'DetallesFacturasCliente'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Update DetallesFacturasCliente'
        DoUpdate = True
        DoInsert = False
        DoDelete = False
        DatasetName = 'DetallesFacturasCliente'
        FailureBehaviour = fbRaiseException
      end
      item
        Name = 'Delete FacturasCliente'
        DoUpdate = False
        DoInsert = False
        DoDelete = True
        DatasetName = 'FacturasCliente'
        FailureBehaviour = fbRaiseException
      end>
    Left = 32
    Top = 24
  end
  object frxDBDetalles: TfrxDBDataset
    UserName = 'frxDBDetalles'
    CloseDataSource = False
    DataSource = DADataDetalles
    Left = 200
    Top = 128
  end
  object frxDBCabecera: TfrxDBDataset
    UserName = 'frxDBCabecera'
    CloseDataSource = False
    DataSource = DADataCabecera
    Left = 120
    Top = 128
  end
  object DADataCabecera: TDADataSource
    DataTable = tbl_FacturaCliente
    Left = 120
    Top = 176
  end
  object DADataDetalles: TDADataSource
    DataTable = tbl_DetallesFacturaCliente
    Left = 200
    Top = 176
  end
  object frxReport1: TfrxReport
    Version = '3.23.7'
    DotMatrixReport = False
    EngineOptions.DoublePass = True
    IniFile = '\Software\Fast Reports'
    PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator]
    PreviewOptions.OutlineWidth = 180
    PreviewOptions.Zoom = 1.000000000000000000
    PrintOptions.Printer = 'Default'
    ReportOptions.CreateDate = 37871.995398692100000000
    ReportOptions.Description.Strings = (
      'Demonstrates how to create simple list report.')
    ReportOptions.LastChange = 39014.612680115740000000
    ReportOptions.VersionBuild = '1'
    ReportOptions.VersionMajor = '12'
    ReportOptions.VersionMinor = '13'
    ReportOptions.VersionRelease = '1'
    ScriptLanguage = 'PascalScript'
    ScriptText.Strings = (
      'procedure DatosClienteOnBeforePrint(Sender: TfrxComponent);'
      'begin'
      '  DatosCliente.Lines.Clear;'
      '  DatosCliente.Lines.Add(<frxDBCabecera."CALLE">);'
      ''
      '  if (<frxDBCabecera."CODIGOPOSTAL"> <> '#39#39')'
      '  or (<frxDBCabecera."POBLACION"> <> '#39#39') then'
      
        '     DatosCliente.Lines.Add(<frxDBCabecera."CODIGOPOSTAL"> + <fr' +
        'xDBCabecera."POBLACION">);'
      'end;'
      ''
      'procedure BandaDetallesOnBeforePrint(Sender: TfrxComponent);'
      'begin'
      '  case <frxDBDetalles."TIPO"> of'
      '  '#39'C'#39': begin'
      '       MemoCampo12.Style := '#39'Concepto normal'#39';'
      '       MemoCampo4.Style := '#39'Concepto normal'#39';'
      '       end;'
      '  '#39'S'#39': begin'
      '       MemoCampo12.Style := '#39'Concepto subtotal'#39';'
      '       MemoCampo4.Style := '#39'Concepto subtotal'#39';'
      '       end;'
      '  '#39'T'#39': begin'
      '       MemoCampo12.Style := '#39'Concepto titulo'#39';'
      '       MemoCampo4.Style := '#39'Concepto titulo'#39';'
      '       end;'
      '  end;'
      'end;'
      ''
      'procedure ReportSummary1OnBeforePrint(Sender: TfrxComponent);'
      'begin'
      
        '       Engine.CurY := Engine.CurY + Engine.FreeSpace - ReportSum' +
        'mary1.Height - 1;'
      'end;'
      ''
      'procedure mTextoOnBeforePrint(Sender: TfrxComponent);'
      'begin'
      '       mTexto.Lines.Clear;'
      ''
      '       if (<frxDBCabecera."CLASEFACTURA"> = '#39'N'#39') then'
      '          mTexto.Lines.Add('#39'FACTURA'#39');'
      ''
      '       if (<frxDBCabecera."CLASEFACTURA"> = '#39'A'#39') then'
      '          mTexto.Lines.Add('#39'ABONO'#39');'
      ''
      '       if (<frxDBCabecera."CLASEFACTURA"> = '#39'P'#39') then'
      '          mTexto.Lines.Add('#39'PROFORMA'#39');'
      'end;'
      ''
      'begin'
      ''
      'end.')
    StoreInDFM = False
    Left = 32
    Top = 136
    Datasets = <
      item
        DataSet = frxDBCabecera
        DataSetName = 'frxDBCabecera'
      end
      item
        DataSet = frxDBDetalles
        DataSetName = 'frxDBDetalles'
      end>
    Variables = <>
    Style = <
      item
        Name = 'Concepto normal'
        Color = clNone
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = []
      end
      item
        Name = 'Concepto subtotal'
        Color = 15790320
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
      end
      item
        Name = 'Cabecera de columna'
        Color = 15790320
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -12
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
        Frame.Typ = [ftLeft, ftRight, ftTop, ftBottom]
      end
      item
        Name = 'Concepto titulo'
        Color = clNone
        Font.Charset = ANSI_CHARSET
        Font.Color = clWindowText
        Font.Height = -13
        Font.Name = 'Tahoma'
        Font.Style = [fsBold]
      end>
  end
  object tbl_FacturaCliente: TDACDSDataTable
    RemoteUpdatesOptions = []
    Fields = <>
    Params = <>
    MasterMappingMode = mmDataRequest
    StreamingOptions = [soDisableEventsWhileStreaming]
    RemoteFetchEnabled = False
    SchemaCall.Params = <>
    DataRequestCall.Params = <>
    DataUpdateCall.Params = <>
    ScriptCall.Params = <>
    ReadOnly = False
    Adapter = DABINAdapter
    DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
    MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
    IndexDefs = <>
    Left = 120
    Top = 232
  end
  object tbl_DetallesFacturaCliente: TDACDSDataTable
    RemoteUpdatesOptions = []
    Fields = <>
    Params = <>
    MasterMappingMode = mmDataRequest
    StreamingOptions = [soDisableEventsWhileStreaming]
    RemoteFetchEnabled = False
    SchemaCall.Params = <>
    DataRequestCall.Params = <>
    DataUpdateCall.Params = <>
    ScriptCall.Params = <>
    ReadOnly = False
    Adapter = DABINAdapter
    DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
    MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
    IndexDefs = <>
    Left = 200
    Top = 232
  end
  object frxBarCodeObject1: TfrxBarCodeObject
    Left = 24
    Top = 296
  end
  object frxOLEObject1: TfrxOLEObject
    Left = 56
    Top = 296
  end
  object frxChartObject1: TfrxChartObject
    Left = 24
    Top = 328
  end
  object frxRichObject1: TfrxRichObject
    Left = 56
    Top = 328
  end
  object frxCrossObject1: TfrxCrossObject
    Left = 88
    Top = 296
  end
  object frxCheckBoxObject1: TfrxCheckBoxObject
    Left = 88
    Top = 328
  end
  object frxGradientObject1: TfrxGradientObject
    Left = 24
    Top = 360
  end
  object frxDotMatrixExport1: TfrxDotMatrixExport
    UseFileCache = True
    ShowProgress = True
    EscModel = 0
    GraphicFrames = False
    SaveToFile = False
    UseIniSettings = True
    Left = 56
    Top = 360
  end
  object frxDialogControls1: TfrxDialogControls
    Left = 88
    Top = 360
  end
  object DABINAdapter: TDABINAdapter
    Left = 32
    Top = 72
  end
end
