Tecsitel_FactuGES2/Source/Modulos/Albaranes de cliente/Servidor/srvAlbaranesCliente_Impl.dfm

1576 lines
47 KiB
Plaintext

object srvAlbaranesCliente: TsrvAlbaranesCliente
OldCreateOrder = True
OnCreate = DARemoteServiceCreate
SessionManager = dmServer.SessionManager
ConnectionName = 'IBX'
ServiceSchema = schAlbaranesCliente
ServiceDataStreamer = Bin2DataStreamer
ExportedDataTables = <>
BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection
Height = 209
Width = 347
object schAlbaranesCliente: TDASchema
ConnectionManager = dmServer.ConnectionManager
DataDictionary = DADataDictionary
Datasets = <
item
Params = <>
Statements = <
item
Connection = 'IBX'
ConnectionType = 'Interbase'
Default = True
Name = 'IBX'
SQL =
'select ANO from'#10'(select distinct(substr(FECHA_ALBARAN, 1,4)) as ' +
'ANO'#10'from albaranes_cliente'#10'order by 1 desc)'#10#10'UNION ALL'#10#10'select d' +
'istinct '#39'Todos'#39' as ANO'#10'from empresas'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ANO'
TableField = 'ANO'
end>
end>
Name = 'ListaAnosAlbaranes'
Fields = <
item
Name = 'ANO'
DataType = datString
Size = 254
end>
end
item
Params = <>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'V_ALBARANES_CLIENTE'
StatementType = stAutoSQL
ColumnMappings = <
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'ID_EMPRESA'
TableField = 'ID_EMPRESA'
end
item
DatasetField = 'ID_CLIENTE'
TableField = 'ID_CLIENTE'
end
item
DatasetField = 'NOMBRE'
TableField = 'NOMBRE'
end
item
DatasetField = 'FECHA_ALBARAN'
TableField = 'FECHA_ALBARAN'
end
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'REFERENCIA_CLIENTE'
TableField = 'REFERENCIA_CLIENTE'
end
item
DatasetField = 'TIPO'
TableField = 'TIPO'
end
item
DatasetField = 'SITUACION'
TableField = 'SITUACION'
end
item
DatasetField = 'ID_ALMACEN'
TableField = 'ID_ALMACEN'
end
item
DatasetField = 'NOMBRE_ALMACEN'
TableField = 'NOMBRE_ALMACEN'
end
item
DatasetField = 'ID_PEDIDO'
TableField = 'ID_PEDIDO'
end
item
DatasetField = 'REF_PEDIDO'
TableField = 'REF_PEDIDO'
end
item
DatasetField = 'ID_FACTURA'
TableField = 'ID_FACTURA'
end
item
DatasetField = 'REF_FACTURA'
TableField = 'REF_FACTURA'
end
item
DatasetField = 'CALLE'
TableField = 'CALLE'
end
item
DatasetField = 'CODIGO_POSTAL'
TableField = 'CODIGO_POSTAL'
end
item
DatasetField = 'POBLACION'
TableField = 'POBLACION'
end
item
DatasetField = 'PROVINCIA'
TableField = 'PROVINCIA'
end
item
DatasetField = 'PERSONA_CONTACTO'
TableField = 'PERSONA_CONTACTO'
end
item
DatasetField = 'TELEFONO'
TableField = 'TELEFONO'
end
item
DatasetField = 'IMPORTE_NETO'
TableField = 'IMPORTE_NETO'
end
item
DatasetField = 'IMPORTE_PORTE'
TableField = 'IMPORTE_PORTE'
end
item
DatasetField = 'DESCUENTO'
TableField = 'DESCUENTO'
end
item
DatasetField = 'IMPORTE_DESCUENTO'
TableField = 'IMPORTE_DESCUENTO'
end
item
DatasetField = 'BASE_IMPONIBLE'
TableField = 'BASE_IMPONIBLE'
end
item
DatasetField = 'IVA'
TableField = 'IVA'
end
item
DatasetField = 'IMPORTE_IVA'
TableField = 'IMPORTE_IVA'
end
item
DatasetField = 'IMPORTE_TOTAL'
TableField = 'IMPORTE_TOTAL'
end
item
DatasetField = 'OBSERVACIONES'
TableField = 'OBSERVACIONES'
end
item
DatasetField = 'INCIDENCIAS'
TableField = 'INCIDENCIAS'
end
item
DatasetField = 'INCIDENCIAS_ACTIVAS'
TableField = 'INCIDENCIAS_ACTIVAS'
end
item
DatasetField = 'FECHA_ALTA'
TableField = 'FECHA_ALTA'
end
item
DatasetField = 'FECHA_MODIFICACION'
TableField = 'FECHA_MODIFICACION'
end
item
DatasetField = 'USUARIO'
TableField = 'USUARIO'
end
item
DatasetField = 'ID_FORMA_PAGO'
TableField = 'ID_FORMA_PAGO'
end
item
DatasetField = 'FECHA_PREVISTA_ENVIO'
TableField = 'FECHA_PREVISTA_ENVIO'
end
item
DatasetField = 'FECHA_ENVIO'
TableField = 'FECHA_ENVIO'
end
item
DatasetField = 'FECHA_RECEPCION'
TableField = 'FECHA_RECEPCION'
end
item
DatasetField = 'ID_DIRECCION'
TableField = 'ID_DIRECCION'
end>
end>
Name = 'AlbaranesCliente'
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_ALBARANES_CLI_ID'
ServerAutoRefresh = True
DictionaryEntry = 'AlbaranesCliente_ID'
InPrimaryKey = True
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
DictionaryEntry = 'AlbaranesCliente_ID_EMPRESA'
end
item
Name = 'ID_CLIENTE'
DataType = datInteger
DictionaryEntry = 'AlbaranesCliente_ID_CLIENTE'
end
item
Name = 'ID_DIRECCION'
DataType = datInteger
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
ServerAutoRefresh = True
DictionaryEntry = 'AlbaranesCliente_NOMBRE'
end
item
Name = 'FECHA_ALBARAN'
DataType = datDateTime
DictionaryEntry = 'AlbaranesCliente_FECHA_ALBARAN'
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
ServerAutoRefresh = True
DictionaryEntry = 'AlbaranesCliente_REFERENCIA'
end
item
Name = 'REFERENCIA_CLIENTE'
DataType = datString
Size = 255
ServerAutoRefresh = True
DictionaryEntry = 'AlbaranesCliente_REFERENCIA_CLIENTE'
end
item
Name = 'TIPO'
DataType = datString
Size = 1
DictionaryEntry = 'AlbaranesCliente_TIPO'
end
item
Name = 'SITUACION'
DataType = datString
Size = 255
DictionaryEntry = 'AlbaranesCliente_SITUACION'
end
item
Name = 'ID_ALMACEN'
DataType = datInteger
DictionaryEntry = 'AlbaranesCliente_ID_ALMACEN'
end
item
Name = 'NOMBRE_ALMACEN'
DataType = datString
Size = 255
ServerAutoRefresh = True
DictionaryEntry = 'AlbaranesCliente_NOMBRE_ALMACEN'
end
item
Name = 'ID_PEDIDO'
DataType = datInteger
DictionaryEntry = 'AlbaranesCliente_ID_PEDIDO'
end
item
Name = 'REF_PEDIDO'
DataType = datString
Size = 255
ServerAutoRefresh = True
DictionaryEntry = 'AlbaranesCliente_REF_PEDIDO'
end
item
Name = 'ID_FACTURA'
DataType = datInteger
DictionaryEntry = 'AlbaranesCliente_ID_FACTURA'
end
item
Name = 'REF_FACTURA'
DataType = datString
Size = 255
ServerAutoRefresh = True
DictionaryEntry = 'AlbaranesCliente_REF_FACTURA'
end
item
Name = 'CALLE'
DataType = datString
Size = 255
DictionaryEntry = 'AlbaranesCliente_CALLE'
end
item
Name = 'CODIGO_POSTAL'
DataType = datString
Size = 10
DictionaryEntry = 'AlbaranesCliente_CODIGO_POSTAL'
end
item
Name = 'POBLACION'
DataType = datString
Size = 255
DictionaryEntry = 'AlbaranesCliente_POBLACION'
end
item
Name = 'PROVINCIA'
DataType = datString
Size = 255
DictionaryEntry = 'AlbaranesCliente_PROVINCIA'
end
item
Name = 'PERSONA_CONTACTO'
DataType = datString
Size = 255
DictionaryEntry = 'AlbaranesCliente_PERSONA_CONTACTO'
end
item
Name = 'TELEFONO'
DataType = datString
Size = 25
DictionaryEntry = 'AlbaranesCliente_TELEFONO'
end
item
Name = 'IMPORTE_NETO'
DataType = datCurrency
DictionaryEntry = 'AlbaranesCliente_IMPORTE_NETO'
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
DictionaryEntry = 'AlbaranesCliente_IMPORTE_PORTE'
end
item
Name = 'DESCUENTO'
DataType = datFloat
DictionaryEntry = 'AlbaranesCliente_DESCUENTO'
end
item
Name = 'IMPORTE_DESCUENTO'
DataType = datCurrency
DictionaryEntry = 'AlbaranesCliente_IMPORTE_DESCUENTO'
end
item
Name = 'BASE_IMPONIBLE'
DataType = datCurrency
DictionaryEntry = 'AlbaranesCliente_BASE_IMPONIBLE'
end
item
Name = 'IVA'
DataType = datFloat
DictionaryEntry = 'AlbaranesCliente_IVA'
end
item
Name = 'IMPORTE_IVA'
DataType = datCurrency
DictionaryEntry = 'AlbaranesCliente_IMPORTE_IVA'
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
DictionaryEntry = 'AlbaranesCliente_IMPORTE_TOTAL'
end
item
Name = 'OBSERVACIONES'
DataType = datMemo
DictionaryEntry = 'AlbaranesCliente_OBSERVACIONES'
end
item
Name = 'INCIDENCIAS'
DataType = datMemo
DictionaryEntry = 'AlbaranesCliente_INCIDENCIAS'
end
item
Name = 'INCIDENCIAS_ACTIVAS'
DataType = datInteger
DictionaryEntry = 'AlbaranesCliente_INCIDENCIAS_ACTIVAS'
end
item
Name = 'FECHA_ALTA'
DataType = datDateTime
DictionaryEntry = 'AlbaranesCliente_FECHA_ALTA'
end
item
Name = 'FECHA_MODIFICACION'
DataType = datDateTime
DictionaryEntry = 'AlbaranesCliente_FECHA_MODIFICACION'
end
item
Name = 'USUARIO'
DataType = datString
Size = 20
DictionaryEntry = 'AlbaranesCliente_USUARIO'
end
item
Name = 'ID_FORMA_PAGO'
DataType = datInteger
DictionaryEntry = 'AlbaranesCliente_ID_FORMA_PAGO'
end
item
Name = 'FECHA_PREVISTA_ENVIO'
DataType = datDateTime
DictionaryEntry = 'AlbaranesCliente_FECHA_PREVISTA_ENVIO'
end
item
Name = 'FECHA_ENVIO'
DataType = datDateTime
DictionaryEntry = 'AlbaranesCliente_FECHA_ENVIO'
end
item
Name = 'FECHA_RECEPCION'
DataType = datDateTime
DictionaryEntry = 'AlbaranesCliente_FECHA_RECEPCION'
end>
end
item
Params = <>
Statements = <
item
Connection = 'IBX'
SQL =
'SELECT'#10' ALBARANES_CLIENTE_DETALLES.ID, ALBARANES_CLIENTE_DETA' +
'LLES.ID_ALBARAN,'#10' ALBARANES_CLIENTE_DETALLES.POSICION, ALBARA' +
'NES_CLIENTE_DETALLES.TIPO_DETALLE,'#10' ALBARANES_CLIENTE_DETALLE' +
'S.CONCEPTO, ALBARANES_CLIENTE_DETALLES.CANTIDAD,'#10' ALBARANES_C' +
'LIENTE_DETALLES.UNIDAD_MEDIDA, ALBARANES_CLIENTE_DETALLES.IMPORT' +
'E_UNIDAD,'#10' ALBARANES_CLIENTE_DETALLES.DESCUENTO, ALBARANES_CL' +
'IENTE_DETALLES.IMPORTE_PORTE,'#10' ALBARANES_CLIENTE_DETALLES.IMP' +
'ORTE_TOTAL,'#10' ALBARANES_CLIENTE_DETALLES.VISIBLE,'#10' ALBARANE' +
'S_CLIENTE_DETALLES.ID_ARTICULO, ARTICULOS.REFERENCIA,'#10' '#39#39' as ' +
'REFERENCIA_PROVEEDOR, /*Es necesario para que no pete detalles p' +
'orque tanto en la rama de cliente como de proveedor es comun*/'#10' ' +
' ALBARANES_CLIENTE_DETALLES.ID_PEDIDO'#10#10#10'FROM ALBARANES_CLIENTE' +
'_DETALLES'#10'LEFT JOIN ARTICULOS ON ALBARANES_CLIENTE_DETALLES.ID_A' +
'RTICULO = ARTICULOS.ID'#10'where {where}'#10'ORDER BY POSICION;'#10#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'ID_ALBARAN'
TableField = 'ID_ALBARAN'
end
item
DatasetField = 'POSICION'
TableField = 'POSICION'
end
item
DatasetField = 'TIPO_DETALLE'
TableField = 'TIPO_DETALLE'
end
item
DatasetField = 'CONCEPTO'
TableField = 'CONCEPTO'
end
item
DatasetField = 'CANTIDAD'
TableField = 'CANTIDAD'
end
item
DatasetField = 'IMPORTE_UNIDAD'
TableField = 'IMPORTE_UNIDAD'
end
item
DatasetField = 'DESCUENTO'
TableField = 'DESCUENTO'
end
item
DatasetField = 'IMPORTE_PORTE'
TableField = 'IMPORTE_PORTE'
end
item
DatasetField = 'IMPORTE_TOTAL'
TableField = 'IMPORTE_TOTAL'
end
item
DatasetField = 'VISIBLE'
TableField = 'VISIBLE'
end
item
DatasetField = 'ID_ARTICULO'
TableField = 'ID_ARTICULO'
end
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'REFERENCIA_PROVEEDOR'
TableField = 'REFERENCIA_PROVEEDOR'
end
item
DatasetField = 'ID_PEDIDO'
TableField = 'ID_PEDIDO'
end
item
DatasetField = 'UNIDAD_MEDIDA'
TableField = 'UNIDAD_MEDIDA'
end>
end>
Name = 'AlbaranesCliente_Detalles'
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_ALBARANES_CLI_DETALLES_ID'
DictionaryEntry = 'AlbaranesCliente_Detalles_ID'
InPrimaryKey = True
end
item
Name = 'ID_ALBARAN'
DataType = datInteger
DictionaryEntry = 'AlbaranesCliente_Detalles_ID_ALBARAN'
end
item
Name = 'POSICION'
DataType = datInteger
DictionaryEntry = 'POSICIONCONCEPTO'
end
item
Name = 'TIPO_DETALLE'
DataType = datString
Size = 25
DictionaryEntry = 'AlbaranesCliente_Detalles_TIPO_DETALLE'
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 2000
DictionaryEntry = 'AlbaranesCliente_Detalles_CONCEPTO'
end
item
Name = 'CANTIDAD'
DataType = datFloat
DictionaryEntry = 'CANTIDAD'
end
item
Name = 'UNIDAD_MEDIDA'
DataType = datString
Size = 255
end
item
Name = 'IMPORTE_UNIDAD'
DataType = datCurrency
DictionaryEntry = 'AlbaranesCliente_Detalles_IMPORTE_UNIDAD'
end
item
Name = 'DESCUENTO'
DataType = datFloat
DictionaryEntry = 'AlbaranesCliente_Detalles_DESCUENTO'
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
DictionaryEntry = 'AlbaranesCliente_Detalles_IMPORTE_PORTE'
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
DictionaryEntry = 'AlbaranesCliente_Detalles_IMPORTE_TOTAL'
end
item
Name = 'VISIBLE'
DataType = datInteger
DictionaryEntry = 'AlbaranesCliente_Detalles_VISIBLE'
end
item
Name = 'ID_ARTICULO'
DataType = datInteger
DictionaryEntry = 'AlbaranesCliente_Detalles_ID_ARTICULO'
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
DictionaryEntry = 'AlbaranesCliente_Detalles_REFERENCIA_PROVEEDOR'
end
item
Name = 'ID_PEDIDO'
DataType = datInteger
end>
end>
JoinDataTables = <>
UnionDataTables = <>
Commands = <
item
Params = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_ALBARANES_CLI_ID'
Value = ''
end
item
Name = 'ID_EMPRESA'
Value = ''
end
item
Name = 'ID_CLIENTE'
Value = ''
end
item
Name = 'FECHA_ALBARAN'
Value = ''
end
item
Name = 'TIPO'
Value = ''
end
item
Name = 'REFERENCIA'
Value = ''
end
item
Name = 'REFERENCIA_CLIENTE'
Value = ''
end
item
Name = 'ID_ALMACEN'
Value = ''
end
item
Name = 'ID_PEDIDO'
Value = ''
end
item
Name = 'ID_FACTURA'
Value = ''
end
item
Name = 'ID_DIRECCION'
Value = ''
end
item
Name = 'CALLE'
Value = ''
end
item
Name = 'CODIGO_POSTAL'
Value = ''
end
item
Name = 'POBLACION'
Value = ''
end
item
Name = 'PROVINCIA'
Value = ''
end
item
Name = 'PERSONA_CONTACTO'
Value = ''
end
item
Name = 'TELEFONO'
Value = ''
end
item
Name = 'IMPORTE_NETO'
Value = ''
end
item
Name = 'IMPORTE_PORTE'
Value = ''
end
item
Name = 'DESCUENTO'
Value = ''
end
item
Name = 'IMPORTE_DESCUENTO'
Value = ''
end
item
Name = 'BASE_IMPONIBLE'
Value = ''
end
item
Name = 'IVA'
Value = ''
end
item
Name = 'IMPORTE_IVA'
Value = ''
end
item
Name = 'IMPORTE_TOTAL'
Value = ''
end
item
Name = 'OBSERVACIONES'
Value = ''
end
item
Name = 'INCIDENCIAS'
Value = ''
end
item
Name = 'INCIDENCIAS_ACTIVAS'
Value = ''
end
item
Name = 'FECHA_ALTA'
Value = ''
end
item
Name = 'FECHA_MODIFICACION'
Value = ''
end
item
Name = 'USUARIO'
Value = ''
end
item
Name = 'ID_FORMA_PAGO'
Value = ''
end
item
Name = 'FECHA_PREVISTA_ENVIO'
Value = ''
end
item
Name = 'FECHA_ENVIO'
Value = ''
end
item
Name = 'FECHA_RECEPCION'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'ALBARANES_CLIENTE'
SQL =
'INSERT'#10' INTO ALBARANES_CLIENTE'#10' (ID, ID_EMPRESA, ID_CLIENTE,' +
' FECHA_ALBARAN, TIPO, REFERENCIA,'#10' REFERENCIA_CLIENTE, ID_AL' +
'MACEN, ID_PEDIDO, ID_FACTURA, ID_DIRECCION,'#10' CALLE, CODIGO_P' +
'OSTAL, POBLACION, PROVINCIA, PERSONA_CONTACTO,'#10' TELEFONO, IM' +
'PORTE_NETO, IMPORTE_PORTE, DESCUENTO, IMPORTE_DESCUENTO, '#10' B' +
'ASE_IMPONIBLE, IVA, IMPORTE_IVA, IMPORTE_TOTAL, OBSERVACIONES, '#10 +
' INCIDENCIAS, INCIDENCIAS_ACTIVAS, FECHA_ALTA, FECHA_MODIFIC' +
'ACION, '#10' USUARIO, ID_FORMA_PAGO, FECHA_PREVISTA_ENVIO, FECHA' +
'_ENVIO, '#10' FECHA_RECEPCION)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :' +
'ID_CLIENTE, :FECHA_ALBARAN, :TIPO, :REFERENCIA,'#10' :REFERENCIA' +
'_CLIENTE, :ID_ALMACEN, :ID_PEDIDO, :ID_FACTURA, :ID_DIRECCION,'#10' ' +
' :CALLE, :CODIGO_POSTAL, :POBLACION, :PROVINCIA, :PERSONA_CON' +
'TACTO,'#10' :TELEFONO, :IMPORTE_NETO, :IMPORTE_PORTE, :DESCUENTO' +
', :IMPORTE_DESCUENTO,'#10' :BASE_IMPONIBLE, :IVA, :IMPORTE_IVA, ' +
':IMPORTE_TOTAL, :OBSERVACIONES,'#10' :INCIDENCIAS, :INCIDENCIAS_' +
'ACTIVAS, :FECHA_ALTA, :FECHA_MODIFICACION,'#10' :USUARIO, :ID_FO' +
'RMA_PAGO, :FECHA_PREVISTA_ENVIO, :FECHA_ENVIO, :FECHA_RECEPCION)' +
#10' '#10' '#10#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Insert_AlbaranesCliente'
end
item
Params = <
item
Name = 'OLD_ID'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'ALBARANES_CLIENTE'
SQL = 'DELETE '#10' FROM'#10' ALBARANES_CLIENTE'#10' WHERE'#10' (ID = :OLD_ID)'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Delete_AlbaranesCliente'
end
item
Params = <
item
Name = 'ID_EMPRESA'
Value = ''
end
item
Name = 'ID_CLIENTE'
Value = ''
end
item
Name = 'FECHA_ALBARAN'
Value = ''
end
item
Name = 'TIPO'
Value = ''
end
item
Name = 'REFERENCIA'
Value = ''
end
item
Name = 'REFERENCIA_CLIENTE'
Value = ''
end
item
Name = 'ID_ALMACEN'
Value = ''
end
item
Name = 'ID_PEDIDO'
Value = ''
end
item
Name = 'ID_FACTURA'
Value = ''
end
item
Name = 'ID_DIRECCION'
Value = ''
end
item
Name = 'CALLE'
Value = ''
end
item
Name = 'CODIGO_POSTAL'
Value = ''
end
item
Name = 'POBLACION'
Value = ''
end
item
Name = 'PROVINCIA'
Value = ''
end
item
Name = 'PERSONA_CONTACTO'
Value = ''
end
item
Name = 'TELEFONO'
Value = ''
end
item
Name = 'IMPORTE_NETO'
Value = ''
end
item
Name = 'IMPORTE_PORTE'
Value = ''
end
item
Name = 'DESCUENTO'
Value = ''
end
item
Name = 'IMPORTE_DESCUENTO'
Value = ''
end
item
Name = 'BASE_IMPONIBLE'
Value = ''
end
item
Name = 'IVA'
Value = ''
end
item
Name = 'IMPORTE_IVA'
Value = ''
end
item
Name = 'IMPORTE_TOTAL'
Value = ''
end
item
Name = 'OBSERVACIONES'
Value = ''
end
item
Name = 'INCIDENCIAS'
Value = ''
end
item
Name = 'INCIDENCIAS_ACTIVAS'
Value = ''
end
item
Name = 'FECHA_ALTA'
Value = ''
end
item
Name = 'FECHA_MODIFICACION'
Value = ''
end
item
Name = 'USUARIO'
Value = ''
end
item
Name = 'ID_FORMA_PAGO'
Value = ''
end
item
Name = 'FECHA_PREVISTA_ENVIO'
Value = ''
end
item
Name = 'FECHA_ENVIO'
Value = ''
end
item
Name = 'FECHA_RECEPCION'
Value = ''
end
item
Name = 'OLD_ID'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'ALBARANES_CLIENTE'
SQL =
'UPDATE ALBARANES_CLIENTE'#10' SET '#10' ID_EMPRESA = :ID_EMPRESA,'#10' ' +
' ID_CLIENTE = :ID_CLIENTE, '#10' FECHA_ALBARAN = :FECHA_ALBARAN,' +
#10' TIPO = :TIPO,'#10' REFERENCIA = :REFERENCIA, '#10' REFERENCIA' +
'_CLIENTE = :REFERENCIA_CLIENTE, '#10' ID_ALMACEN = :ID_ALMACEN,'#10' ' +
' ID_PEDIDO = :ID_PEDIDO,'#10' ID_FACTURA = :ID_FACTURA,'#10' ID_' +
'DIRECCION = :ID_DIRECCION,'#10' CALLE = :CALLE,'#10' CODIGO_POSTAL' +
' = :CODIGO_POSTAL, '#10' POBLACION = :POBLACION, '#10' PROVINCIA =' +
' :PROVINCIA, '#10' PERSONA_CONTACTO = :PERSONA_CONTACTO, '#10' TEL' +
'EFONO = :TELEFONO, '#10' IMPORTE_NETO = :IMPORTE_NETO, '#10' IMPOR' +
'TE_PORTE = :IMPORTE_PORTE, '#10' DESCUENTO = :DESCUENTO, '#10' IMP' +
'ORTE_DESCUENTO = :IMPORTE_DESCUENTO, '#10' BASE_IMPONIBLE = :BASE' +
'_IMPONIBLE, '#10' IVA = :IVA, '#10' IMPORTE_IVA = :IMPORTE_IVA, '#10' ' +
' IMPORTE_TOTAL = :IMPORTE_TOTAL, '#10' OBSERVACIONES = :OBSERVA' +
'CIONES, '#10' INCIDENCIAS = :INCIDENCIAS, '#10' INCIDENCIAS_ACTIVA' +
'S = :INCIDENCIAS_ACTIVAS, '#10' FECHA_ALTA = :FECHA_ALTA, '#10' FE' +
'CHA_MODIFICACION = :FECHA_MODIFICACION, '#10' USUARIO = :USUARIO,' +
' '#10' ID_FORMA_PAGO = :ID_FORMA_PAGO, '#10' FECHA_PREVISTA_ENVIO ' +
'= :FECHA_PREVISTA_ENVIO, '#10' FECHA_ENVIO = :FECHA_ENVIO, '#10' F' +
'ECHA_RECEPCION = :FECHA_RECEPCION'#10' WHERE'#10' (ID = :OLD_ID)'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Update_AlbaranesCliente'
end
item
Params = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_ALBARANES_CLI_DETALLES_ID'
Value = ''
end
item
Name = 'ID_ALBARAN'
Value = ''
end
item
Name = 'POSICION'
Value = ''
end
item
Name = 'TIPO_DETALLE'
Value = ''
end
item
Name = 'CONCEPTO'
Value = ''
end
item
Name = 'CANTIDAD'
Value = ''
end
item
Name = 'UNIDAD_MEDIDA'
Value = ''
end
item
Name = 'IMPORTE_UNIDAD'
Value = ''
end
item
Name = 'DESCUENTO'
Value = ''
end
item
Name = 'IMPORTE_PORTE'
Value = ''
end
item
Name = 'IMPORTE_TOTAL'
Value = ''
end
item
Name = 'VISIBLE'
Value = ''
end
item
Name = 'ID_ARTICULO'
Value = ''
end
item
Name = 'ID_PEDIDO'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'ALBARANES_CLIENTE_DETALLES'
SQL =
'INSERT'#10' INTO ALBARANES_CLIENTE_DETALLES'#10' (ID, ID_ALBARAN, PO' +
'SICION, TIPO_DETALLE, CONCEPTO, CANTIDAD, UNIDAD_MEDIDA,'#10' IM' +
'PORTE_UNIDAD, DESCUENTO, IMPORTE_PORTE, IMPORTE_TOTAL, '#10' VIS' +
'IBLE, ID_ARTICULO, ID_PEDIDO)'#10' VALUES'#10' (:ID, :ID_ALBARAN, :P' +
'OSICION, :TIPO_DETALLE, :CONCEPTO, :CANTIDAD, :UNIDAD_MEDIDA,'#10' ' +
' :IMPORTE_UNIDAD, :DESCUENTO, :IMPORTE_PORTE, :IMPORTE_TOTAL, ' +
#10' :VISIBLE, :ID_ARTICULO, :ID_PEDIDO)'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Insert_AlbaranesCliente_Detalles'
end
item
Params = <
item
Name = 'OLD_ID'
DataType = datAutoInc
Value = '0'
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'ALBARANES_CLIENTE_DETALLES'
SQL =
'DELETE '#10' FROM'#10' ALBARANES_CLIENTE_DETALLES'#10' WHERE'#10' (ID = ' +
':OLD_ID)'
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Delete_AlbaranesCliente_Detalles'
end
item
Params = <
item
Name = 'ID'
Value = ''
end
item
Name = 'ID_ALBARAN'
Value = ''
end
item
Name = 'POSICION'
Value = ''
end
item
Name = 'TIPO_DETALLE'
Value = ''
end
item
Name = 'CONCEPTO'
Value = ''
end
item
Name = 'CANTIDAD'
Value = ''
end
item
Name = 'UNIDAD_MEDIDA'
Value = ''
end
item
Name = 'IMPORTE_UNIDAD'
Value = ''
end
item
Name = 'DESCUENTO'
Value = ''
end
item
Name = 'IMPORTE_PORTE'
Value = ''
end
item
Name = 'IMPORTE_TOTAL'
Value = ''
end
item
Name = 'VISIBLE'
Value = ''
end
item
Name = 'ID_ARTICULO'
Value = ''
end
item
Name = 'ID_PEDIDO'
Value = ''
end
item
Name = 'OLD_ID'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'ALBARANES_CLIENTE_DETALLES'
SQL =
'UPDATE ALBARANES_CLIENTE_DETALLES'#10' SET '#10' ID = :ID,'#10' ID_AL' +
'BARAN = :ID_ALBARAN, '#10' POSICION = :POSICION, '#10' TIPO_DETALL' +
'E = :TIPO_DETALLE, '#10' CONCEPTO = :CONCEPTO, '#10' CANTIDAD = :C' +
'ANTIDAD, '#10' UNIDAD_MEDIDA = :UNIDAD_MEDIDA,'#10' IMPORTE_UNIDAD' +
' = :IMPORTE_UNIDAD, '#10' DESCUENTO = :DESCUENTO, '#10' IMPORTE_PO' +
'RTE = :IMPORTE_PORTE, '#10' IMPORTE_TOTAL = :IMPORTE_TOTAL, '#10' ' +
'VISIBLE = :VISIBLE, '#10' ID_ARTICULO = :ID_ARTICULO,'#10' ID_PEDI' +
'DO = :ID_PEDIDO'#10' WHERE'#10' (ID = :OLD_ID)'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Update_AlbaranesCliente_Detalles'
end>
RelationShips = <
item
Name = 'FK_AlbaranesCliente_Detalles'
MasterDatasetName = 'AlbaranesCliente'
MasterFields = 'ID'
DetailDatasetName = 'AlbaranesCliente_Detalles'
DetailFields = 'ID_ALBARAN'
RelationshipType = rtForeignKey
end>
UpdateRules = <
item
Name = 'Insert AlbaranesCliente'
DoUpdate = False
DoDelete = False
DatasetName = 'AlbaranesCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Insert AlbaranesCliente_Detalles'
DoUpdate = False
DoDelete = False
DatasetName = 'AlbaranesCliente_Detalles'
FailureBehavior = fbRaiseException
end
item
Name = 'Update AlbaranesCliente'
DoInsert = False
DoDelete = False
DatasetName = 'AlbaranesCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Update AlbaranesCliente_Detalles'
DoInsert = False
DoDelete = False
DatasetName = 'AlbaranesCliente_Detalles'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete AlbaranesCliente_Detalles'
DoUpdate = False
DoInsert = False
DatasetName = 'AlbaranesCliente_Detalles'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete AlbaranesCliente'
DoUpdate = False
DoInsert = False
DatasetName = 'AlbaranesCliente'
FailureBehavior = fbRaiseException
end>
Version = 0
Left = 56
Top = 24
end
object bpAlbaranesCliente: TDABusinessProcessor
Schema = schAlbaranesCliente
InsertCommandName = 'Insert_AlbaranesCliente'
DeleteCommandName = 'Delete_AlbaranesCliente'
UpdateCommandName = 'Update_AlbaranesCliente'
ReferencedDataset = 'AlbaranesCliente'
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 224
Top = 24
end
object bpAlbaranesCliente_Detalles: TDABusinessProcessor
Schema = schAlbaranesCliente
InsertCommandName = 'Insert_AlbaranesCliente_Detalles'
DeleteCommandName = 'Delete_AlbaranesCliente_Detalles'
UpdateCommandName = 'Update_AlbaranesCliente_Detalles'
ReferencedDataset = 'AlbaranesCliente_Detalles'
ProcessorOptions = [poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 224
Top = 88
end
object DADataDictionary: TDADataDictionary
Fields = <
item
Name = 'AlbaranesCliente_ID'
DataType = datAutoInc
GeneratorName = 'GEN_ALBARANES_CLI_ID'
Required = True
DisplayLabel = 'ID'
ServerAutoRefresh = True
end
item
Name = 'AlbaranesCliente_ID_EMPRESA'
DataType = datInteger
DisplayLabel = 'ID_EMPRESA'
end
item
Name = 'AlbaranesCliente_ID_CLIENTE'
DataType = datInteger
DisplayLabel = 'ID_CLIENTE'
end
item
Name = 'AlbaranesCliente_NOMBRE'
DataType = datString
Size = 255
DisplayLabel = 'Nombre del cliente'
end
item
Name = 'AlbaranesCliente_SITUACION'
DataType = datString
Size = 255
DisplayLabel = 'Situaci'#243'n'
end
item
Name = 'AlbaranesCliente_CALLE'
DataType = datString
Size = 255
DisplayLabel = 'Calle'
end
item
Name = 'AlbaranesCliente_CODIGO_POSTAL'
DataType = datString
Size = 10
DisplayLabel = 'C'#243'd. postal'
end
item
Name = 'AlbaranesCliente_POBLACION'
DataType = datString
Size = 255
DisplayLabel = 'Poblaci'#243'n'
end
item
Name = 'AlbaranesCliente_PROVINCIA'
DataType = datString
Size = 255
DisplayLabel = 'Provincia'
end
item
Name = 'AlbaranesCliente_PERSONA_CONTACTO'
DataType = datString
Size = 255
DisplayLabel = 'Persona de contacto'
end
item
Name = 'AlbaranesCliente_TELEFONO'
DataType = datString
Size = 25
DisplayLabel = 'Tel'#233'fono'
end
item
Name = 'AlbaranesCliente_OBSERVACIONES'
DataType = datMemo
DisplayLabel = 'Observaciones'
end
item
Name = 'AlbaranesCliente_INCIDENCIAS'
DataType = datMemo
DisplayLabel = 'INCIDENCIAS'
end
item
Name = 'AlbaranesCliente_INCIDENCIAS_ACTIVAS'
DataType = datInteger
DisplayLabel = 'INCIDENCIAS_ACTIVAS'
end
item
Name = 'AlbaranesCliente_FECHA_ALTA'
DataType = datDateTime
DisplayLabel = 'FECHA_ALTA'
end
item
Name = 'AlbaranesCliente_FECHA_MODIFICACION'
DataType = datDateTime
DisplayLabel = 'FECHA_MODIFICACION'
end
item
Name = 'AlbaranesCliente_USUARIO'
DataType = datString
Size = 20
DisplayLabel = 'USUARIO'
end
item
Name = 'AlbaranesCliente_IMPORTE_NETO'
DataType = datCurrency
DisplayLabel = 'Importe neto'
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_IMPORTE_PORTE'
DataType = datCurrency
DisplayLabel = 'Importe del porte'
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_DESCUENTO'
DataType = datFloat
DisplayLabel = 'Descuento'
DisplayFormat = ',0.00 %;-,0.00 %'
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_IMPORTE_DESCUENTO'
DataType = datCurrency
DisplayLabel = 'Importe dto.'
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_BASE_IMPONIBLE'
DataType = datCurrency
DisplayLabel = 'Base imponible'
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_IVA'
DataType = datFloat
DisplayLabel = 'IVA'
DisplayFormat = ',0.00 %;-,0.00 %'
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_IMPORTE_IVA'
DataType = datCurrency
DisplayLabel = 'Importe IVA'
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_IMPORTE_TOTAL'
DataType = datCurrency
DisplayLabel = 'Importe total'
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_ID_FORMA_PAGO'
DataType = datInteger
DisplayLabel = 'ID_FORMA_PAGO'
end
item
Name = 'AlbaranesCliente_Detalles_ID'
DataType = datAutoInc
GeneratorName = 'GEN_ALBARANES_CLI_DETALLES_ID'
Required = True
DisplayLabel = 'ID'
ServerAutoRefresh = True
end
item
Name = 'AlbaranesCliente_Detalles_ID_PEDIDO'
DataType = datInteger
DisplayLabel = 'ID_PEDIDO'
end
item
Name = 'POSICIONCONCEPTO'
DataType = datInteger
DisplayLabel = 'POSICION'
end
item
Name = 'AlbaranesCliente_Detalles_TIPO_DETALLE'
DataType = datString
Size = 25
DisplayLabel = 'TIPO_DETALLE'
end
item
Name = 'AlbaranesCliente_Detalles_REFERENCIA'
DataType = datString
Size = 255
DisplayLabel = 'Referencia'
end
item
Name = 'AlbaranesCliente_Detalles_ID_ARTICULO'
DataType = datInteger
DisplayLabel = 'ID_ARTICULO'
end
item
Name = 'AlbaranesCliente_Detalles_CONCEPTO'
DataType = datString
Size = 2000
DisplayLabel = 'CONCEPTO'
end
item
Name = 'CANTIDAD'
DataType = datFloat
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_Detalles_IMPORTE_UNIDAD'
DataType = datCurrency
DisplayLabel = 'Importe unidad'
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_Detalles_IMPORTE_TOTAL'
DataType = datCurrency
DisplayLabel = 'Importe total'
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_Detalles_DESCUENTO'
DataType = datFloat
DisplayLabel = 'Descuento'
DisplayFormat = ',0.00 %;-,0.00 %'
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_Detalles_IMPORTE_PORTE'
DataType = datCurrency
DisplayLabel = 'Importe porte'
Alignment = taRightJustify
end
item
Name = 'AlbaranesCliente_Detalles_VISIBLE'
DataType = datInteger
DisplayLabel = 'VISIBLE'
end
item
Name = 'AlbaranesCliente_Detalles_REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
DisplayLabel = 'Ref. proveedor'
end
item
Name = 'AlbaranesCliente_FECHA_ALBARAN'
DataType = datDateTime
DisplayLabel = 'Fecha albar'#225'n'
end
item
Name = 'AlbaranesCliente_ID_PEDIDO'
DataType = datInteger
DisplayLabel = 'ID_PEDIDO'
end
item
Name = 'AlbaranesCliente_ID_FACTURA'
DataType = datInteger
DisplayLabel = 'ID_FACTURA'
end
item
Name = 'AlbaranesCliente_Detalles_ID_ALBARAN'
DataType = datInteger
DisplayLabel = 'ID_ALBARAN'
end
item
Name = 'AlbaranesCliente_Detalles_Refresh_ID_ALBARAN'
DataType = datInteger
DisplayLabel = 'ID_ALBARAN'
end
item
Name = 'AlbaranesCliente_Detalles_Refresh_DESCUENTO'
DataType = datFloat
DisplayLabel = 'DESCUENTO'
end
item
Name = 'AlbaranesCliente_Detalles_Refresh_IMPORTE_PORTE'
DataType = datFloat
DisplayLabel = 'IMPORTE_PORTE'
end
item
Name = 'AlbaranesCliente_Detalles_Refresh_REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
DisplayLabel = 'REFERENCIA_PROVEEDOR'
end
item
Name = 'AlbaranesCliente_ID_ALMACEN'
DataType = datInteger
DisplayLabel = 'ID_ALMACEN'
end
item
Name = 'AlbaranesCliente_FECHA_ENVIO'
DataType = datDateTime
DisplayLabel = 'Fecha de env'#237'o'
end
item
Name = 'AlbaranesCliente_FECHA_RECEPCION'
DataType = datDateTime
DisplayLabel = 'Fecha de recepci'#243'n'
end
item
Name = 'AlbaranesCliente_REF_PEDIDO'
DataType = datString
Size = 255
DisplayLabel = 'Ref. pedido cliente'
end
item
Name = 'AlbaranesCliente_REF_FACTURA'
DataType = datString
Size = 255
DisplayLabel = 'Ref. factura cliente'
end
item
Name = 'AlbaranesCliente_REFERENCIA'
DataType = datString
Size = 255
DisplayLabel = 'Referencia'
ServerAutoRefresh = True
end
item
Name = 'AlbaranesCliente_FECHA_PREVISTA_ENVIO'
DataType = datDateTime
DisplayLabel = 'Fecha prevista de envio'
end
item
Name = 'AlbaranesCliente_NOMBRE_ALMACEN'
DataType = datString
Size = 255
DisplayLabel = 'Almac'#233'n'
end
item
Name = 'AlbaranesCliente_TIPO'
DataType = datString
Size = 1
DisplayLabel = 'Tipo'
end
item
Name = 'AlbaranesCliente_REFERENCIA_CLIENTE'
DataType = datString
Size = 255
end>
Left = 56
Top = 144
end
object Bin2DataStreamer: TDABin2DataStreamer
Left = 56
Top = 80
end
end