Tecsitel_FactuGES2/Source/Modulos/Presupuestos de cliente/Servidor/srvPresupuestosCliente_Impl.dfm
2014-02-18 22:41:52 +00:00

1488 lines
46 KiB
Plaintext

object srvPresupuestosCliente: TsrvPresupuestosCliente
OldCreateOrder = True
OnCreate = DARemoteServiceCreate
ConnectionName = 'IBX'
ServiceSchema = schPresupuestosCliente
ServiceDataStreamer = Bin2DataStreamer
ExportedDataTables = <>
Height = 230
Width = 346
object schPresupuestosCliente: 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_PRESUPUESTO, 1,4))' +
' as ANO'#10'from presupuestos_cliente'#10'order by 1 desc)'#10#10'UNION ALL'#10#10's' +
'elect distinct '#39'Todos'#39' as ANO'#10'from empresas'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ANO'
TableField = 'ANO'
end>
end>
Name = 'ListaAnosPresupuestos'
Fields = <
item
Name = 'ANO'
DataType = datString
Size = 254
end>
end
item
Params = <>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'V_PRESUPUESTOS_CLIENTE'
StatementType = stAutoSQL
ColumnMappings = <
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'ID_EMPRESA'
TableField = 'ID_EMPRESA'
end
item
DatasetField = 'FECHA_PRESUPUESTO'
TableField = 'FECHA_PRESUPUESTO'
end
item
DatasetField = 'FECHA_DECISION'
TableField = 'FECHA_DECISION'
end
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'REFERENCIA_AUX'
TableField = 'REFERENCIA_AUX'
end
item
DatasetField = 'SITUACION'
TableField = 'SITUACION'
end
item
DatasetField = 'ID_CLIENTE'
TableField = 'ID_CLIENTE'
end
item
DatasetField = 'NIF_CIF'
TableField = 'NIF_CIF'
end
item
DatasetField = 'NOMBRE'
TableField = 'NOMBRE'
end
item
DatasetField = 'REFERENCIA_CLIENTE'
TableField = 'REFERENCIA_CLIENTE'
end
item
DatasetField = 'CLIENTE_FINAL'
TableField = 'CLIENTE_FINAL'
end
item
DatasetField = 'PORTADA'
TableField = 'PORTADA'
end
item
DatasetField = 'MEMORIA'
TableField = 'MEMORIA'
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 = '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 = 'ID_FORMA_PAGO'
TableField = 'ID_FORMA_PAGO'
end
item
DatasetField = 'ID_FACTURA'
TableField = 'ID_FACTURA'
end
item
DatasetField = 'FACTURA'
TableField = 'FACTURA'
end
item
DatasetField = 'PERSONA_CONTACTO'
TableField = 'PERSONA_CONTACTO'
end
item
DatasetField = 'ID_DIRECCION'
TableField = 'ID_DIRECCION'
end
item
DatasetField = 'DESCRIPCION_BONIFICACION'
TableField = 'DESCRIPCION_BONIFICACION'
end
item
DatasetField = 'IMPORTE_BONIFICACION'
TableField = 'IMPORTE_BONIFICACION'
end
item
DatasetField = 'CERTIFICADO_ISO'
TableField = 'CERTIFICADO_ISO'
end>
end>
Name = 'PresupuestosCliente'
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_PRESUPUESTOS_CLI_ID'
ServerAutoRefresh = True
DictionaryEntry = 'PresupuestosCliente_ID'
InPrimaryKey = True
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
DictionaryEntry = 'PresupuestosCliente_ID_EMPRESA'
end
item
Name = 'FECHA_PRESUPUESTO'
DataType = datDateTime
DictionaryEntry = 'PresupuestosCliente_FECHA_PRESUPUESTO'
end
item
Name = 'FECHA_DECISION'
DataType = datDateTime
DictionaryEntry = 'PresupuestosCliente_FECHA_DECISION'
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
DictionaryEntry = 'PresupuestosCliente_REFERENCIA'
end
item
Name = 'REFERENCIA_AUX'
DataType = datString
Size = 255
end
item
Name = 'SITUACION'
DataType = datString
Size = 255
DictionaryEntry = 'PresupuestosCliente_SITUACION'
end
item
Name = 'ID_CLIENTE'
DataType = datInteger
DictionaryEntry = 'PresupuestosCliente_ID_CLIENTE'
end
item
Name = 'ID_DIRECCION'
DataType = datInteger
end
item
Name = 'NIF_CIF'
DataType = datString
Size = 15
ServerAutoRefresh = True
DictionaryEntry = 'PresupuestosCliente_NIF_CIF'
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
ServerAutoRefresh = True
DictionaryEntry = 'PresupuestosCliente_NOMBRE'
end
item
Name = 'REFERENCIA_CLIENTE'
DataType = datString
Size = 255
ServerAutoRefresh = True
DictionaryEntry = 'PresupuestosCliente_REFERENCIA_CLIENTE'
end
item
Name = 'CLIENTE_FINAL'
DataType = datString
Size = 255
DictionaryEntry = 'PresupuestosCliente_CLIENTE_FINAL'
end
item
Name = 'PORTADA'
DataType = datMemo
DictionaryEntry = 'PresupuestosCliente_PORTADA'
end
item
Name = 'MEMORIA'
DataType = datMemo
DictionaryEntry = 'PresupuestosCliente_MEMORIA'
end
item
Name = 'OBSERVACIONES'
DataType = datMemo
DictionaryEntry = 'PresupuestosCliente_OBSERVACIONES'
end
item
Name = 'INCIDENCIAS'
DataType = datMemo
DictionaryEntry = 'PresupuestosCliente_INCIDENCIAS'
end
item
Name = 'INCIDENCIAS_ACTIVAS'
DataType = datInteger
DictionaryEntry = 'PresupuestosCliente_INCIDENCIAS_ACTIVAS'
end
item
Name = 'FECHA_ALTA'
DataType = datDateTime
DictionaryEntry = 'PresupuestosCliente_FECHA_ALTA'
end
item
Name = 'FECHA_MODIFICACION'
DataType = datDateTime
DictionaryEntry = 'PresupuestosCliente_FECHA_MODIFICACION'
end
item
Name = 'USUARIO'
DataType = datString
Size = 20
DictionaryEntry = 'PresupuestosCliente_USUARIO'
end
item
Name = 'IMPORTE_NETO'
DataType = datCurrency
DictionaryEntry = 'PresupuestosCliente_IMPORTE_NETO'
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
DictionaryEntry = 'PresupuestosCliente_IMPORTE_PORTE'
end
item
Name = 'DESCUENTO'
DataType = datFloat
DictionaryEntry = 'PresupuestosCliente_DESCUENTO'
end
item
Name = 'IMPORTE_DESCUENTO'
DataType = datCurrency
DictionaryEntry = 'PresupuestosCliente_IMPORTE_DESCUENTO'
end
item
Name = 'BASE_IMPONIBLE'
DataType = datCurrency
DictionaryEntry = 'PresupuestosCliente_BASE_IMPONIBLE'
end
item
Name = 'IVA'
DataType = datFloat
DictionaryEntry = 'PresupuestosCliente_IVA'
end
item
Name = 'IMPORTE_IVA'
DataType = datCurrency
DictionaryEntry = 'PresupuestosCliente_IMPORTE_IVA'
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
DictionaryEntry = 'PresupuestosCliente_IMPORTE_TOTAL'
end
item
Name = 'ID_FORMA_PAGO'
DataType = datInteger
DictionaryEntry = 'PresupuestosCliente_ID_FORMA_PAGO'
end
item
Name = 'ID_FACTURA'
DataType = datInteger
end
item
Name = 'FACTURA'
DataType = datString
Size = 255
end
item
Name = 'PERSONA_CONTACTO'
DataType = datString
Size = 255
DictionaryEntry = 'PresupuestosCliente_PERSONA_CONTACTO'
end
item
Name = 'DESCRIPCION_BONIFICACION'
DataType = datString
Size = 255
end
item
Name = 'IMPORTE_BONIFICACION'
DataType = datCurrency
ServerAutoRefresh = True
end
item
Name = 'CERTIFICADO_ISO'
DataType = datSmallInt
end>
end
item
Params = <>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'PRESUPUESTOS_CLIENTE_DETALLES'
SQL =
'SELECT'#10' PRESUPUESTOS_CLIENTE_DETALLES.ID, PRESUPUESTOS_CLIENT' +
'E_DETALLES.ID_PRESUPUESTO,'#10' PRESUPUESTOS_CLIENTE_DETALLES.POS' +
'ICION, PRESUPUESTOS_CLIENTE_DETALLES.TIPO_DETALLE,'#10' PRESUPUES' +
'TOS_CLIENTE_DETALLES.CONCEPTO, PRESUPUESTOS_CLIENTE_DETALLES.CAN' +
'TIDAD,'#10' PRESUPUESTOS_CLIENTE_DETALLES.UNIDAD_MEDIDA,'#10' PRES' +
'UPUESTOS_CLIENTE_DETALLES.IMPORTE_UNIDAD, PRESUPUESTOS_CLIENTE_D' +
'ETALLES.IMPORTE_TOTAL,'#10' PRESUPUESTOS_CLIENTE_DETALLES.VISIBLE' +
','#10#10' PRESUPUESTOS_CLIENTE_DETALLES.ID_ARTICULO, PRESUPUESTOS_C' +
'LIENTE_DETALLES.DESCUENTO,'#10' PRESUPUESTOS_CLIENTE_DETALLES.IMP' +
'ORTE_PORTE, ARTICULOS.REFERENCIA,'#10' '#39#39' as REFERENCIA_PROVEEDOR' +
' /*Es necesario para que no fallen los detalles porque los detal' +
'les son comunes para la rama de cliente y de proveedor*/'#10#10'FROM P' +
'RESUPUESTOS_CLIENTE_DETALLES'#10'LEFT JOIN ARTICULOS ON PRESUPUESTOS' +
'_CLIENTE_DETALLES.ID_ARTICULO = ARTICULOS.ID'#10'where {where}'#10'ORDER' +
' BY POSICION;'#10#10#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'ID_PRESUPUESTO'
TableField = 'ID_PRESUPUESTO'
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 = 'UNIDAD_MEDIDA'
TableField = 'UNIDAD_MEDIDA'
end
item
DatasetField = 'IMPORTE_UNIDAD'
TableField = 'IMPORTE_UNIDAD'
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 = 'DESCUENTO'
TableField = 'DESCUENTO'
end
item
DatasetField = 'IMPORTE_PORTE'
TableField = 'IMPORTE_PORTE'
end
item
DatasetField = 'REFERENCIA'
TableField = '<unknown>'
SQLOrigin = 'REFERENCIA'
end
item
DatasetField = 'REFERENCIA_PROVEEDOR'
TableField = '<unknown>'
SQLOrigin = 'REFERENCIA_PROVEEDOR'
end>
end>
Name = 'PresupuestosCliente_Detalles'
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_PRESUPUESTOS_CLI_DETALLE_ID'
ServerAutoRefresh = True
DictionaryEntry = 'PresupuestosCliente_Detalles_ID'
InPrimaryKey = True
end
item
Name = 'ID_PRESUPUESTO'
DataType = datInteger
DictionaryEntry = 'PresupuestosCliente_Detalles_ID_PRESUPUESTO'
end
item
Name = 'POSICION'
DataType = datInteger
DictionaryEntry = 'PresupuestosCliente_Detalles_POSICION'
end
item
Name = 'TIPO_DETALLE'
DataType = datString
Size = 25
DictionaryEntry = 'PresupuestosCliente_Detalles_TIPO_DETALLE'
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 2000
DictionaryEntry = 'PresupuestosCliente_Detalles_CONCEPTO'
end
item
Name = 'CANTIDAD'
DataType = datFloat
DictionaryEntry = 'PresupuestosCliente_Detalles_CANTIDAD'
end
item
Name = 'UNIDAD_MEDIDA'
DataType = datString
Size = 255
DictionaryEntry = 'PresupuestosCliente_Detalles_UNIDAD_MEDIDA'
end
item
Name = 'IMPORTE_UNIDAD'
DataType = datCurrency
DictionaryEntry = 'PresupuestosCliente_Detalles_IMPORTE_UNIDAD'
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
DictionaryEntry = 'PresupuestosCliente_Detalles_IMPORTE_TOTAL'
end
item
Name = 'VISIBLE'
DataType = datInteger
DictionaryEntry = 'PresupuestosCliente_Detalles_VISIBLE'
end
item
Name = 'ID_ARTICULO'
DataType = datInteger
DictionaryEntry = 'PresupuestosCliente_Detalles_ID_ARTICULO'
end
item
Name = 'DESCUENTO'
DataType = datFloat
DictionaryEntry = 'PresupuestosCliente_Detalles_DESCUENTO'
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
DictionaryEntry = 'PresupuestosCliente_Detalles_IMPORTE_PORTE'
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
DictionaryEntry = 'PresupuestosCliente_Detalles_REFERENCIA'
end
item
Name = 'REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
DictionaryEntry = 'PresupuestosCliente_Detalles_REFERENCIA_PROVEEDOR'
end>
end>
JoinDataTables = <>
UnionDataTables = <>
Commands = <
item
Params = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_PRESUPUESTOS_CLI_ID'
Value = ''
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
Value = ''
end
item
Name = 'FECHA_PRESUPUESTO'
DataType = datDateTime
Value = ''
end
item
Name = 'FECHA_DECISION'
DataType = datDateTime
Value = ''
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'REFERENCIA_AUX'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'SITUACION'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'ID_CLIENTE'
DataType = datInteger
Value = ''
end
item
Name = 'ID_DIRECCION'
DataType = datInteger
Value = ''
end
item
Name = 'REFERENCIA_CLIENTE'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'CLIENTE_FINAL'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'PORTADA'
DataType = datMemo
Value = ''
end
item
Name = 'MEMORIA'
DataType = datMemo
Value = ''
end
item
Name = 'OBSERVACIONES'
DataType = datMemo
Value = ''
end
item
Name = 'INCIDENCIAS'
DataType = datMemo
Value = ''
end
item
Name = 'INCIDENCIAS_ACTIVAS'
DataType = datSmallInt
Value = ''
end
item
Name = 'USUARIO'
DataType = datString
Size = 30
Value = ''
end
item
Name = 'IMPORTE_NETO'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
Value = ''
end
item
Name = 'DESCUENTO'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_DESCUENTO'
DataType = datCurrency
Value = ''
end
item
Name = 'BASE_IMPONIBLE'
DataType = datCurrency
Value = ''
end
item
Name = 'IVA'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_IVA'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
Value = ''
end
item
Name = 'ID_FORMA_PAGO'
DataType = datInteger
Value = ''
end
item
Name = 'ID_FACTURA'
DataType = datInteger
Value = ''
end
item
Name = 'PERSONA_CONTACTO'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'DESCRIPCION_BONIFICACION'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'IMPORTE_BONIFICACION'
DataType = datCurrency
Value = ''
end
item
Name = 'CERTIFICADO_ISO'
DataType = datSmallInt
Value = ''
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'PRESUPUESTOS_CLIENTE'
SQL =
'INSERT'#10' INTO PRESUPUESTOS_CLIENTE'#10' (ID, ID_EMPRESA, FECHA_PR' +
'ESUPUESTO, FECHA_DECISION, REFERENCIA,'#10' REFERENCIA_AUX, SITU' +
'ACION, ID_CLIENTE, ID_DIRECCION, REFERENCIA_CLIENTE,'#10' CLIENT' +
'E_FINAL, PORTADA, MEMORIA, OBSERVACIONES, INCIDENCIAS, '#10' INC' +
'IDENCIAS_ACTIVAS, FECHA_ALTA,'#10' USUARIO, IMPORTE_NETO, IMPORT' +
'E_PORTE, DESCUENTO, IMPORTE_DESCUENTO, '#10' BASE_IMPONIBLE, IVA' +
', IMPORTE_IVA, IMPORTE_TOTAL, ID_FORMA_PAGO, ID_FACTURA,'#10' PE' +
'RSONA_CONTACTO, DESCRIPCION_BONIFICACION, IMPORTE_BONIFICACION, ' +
'CERTIFICADO_ISO)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :FECHA_PRESUPUE' +
'STO, :FECHA_DECISION, :REFERENCIA,'#10' :REFERENCIA_AUX, :SITUAC' +
'ION, :ID_CLIENTE, :ID_DIRECCION, :REFERENCIA_CLIENTE,'#10' :CLIE' +
'NTE_FINAL, :PORTADA, :MEMORIA, :OBSERVACIONES, '#10' :INCIDENCIA' +
'S, :INCIDENCIAS_ACTIVAS, CURRENT_TIMESTAMP,'#10' :USUARIO, :IMPO' +
'RTE_NETO, :IMPORTE_PORTE, :DESCUENTO, '#10' :IMPORTE_DESCUENTO, ' +
':BASE_IMPONIBLE, :IVA, :IMPORTE_IVA, '#10' :IMPORTE_TOTAL, :ID_F' +
'ORMA_PAGO, :ID_FACTURA, :PERSONA_CONTACTO,'#10' :DESCRIPCION_BON' +
'IFICACION, :IMPORTE_BONIFICACION, :CERTIFICADO_ISO)'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Insert_PresupuestosCliente'
end
item
Params = <
item
Name = 'OLD_ID'
DataType = datAutoInc
Value = '0'
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'PRESUPUESTOS_CLIENTE'
SQL =
'DELETE '#10' FROM'#10' PRESUPUESTOS_CLIENTE'#10' WHERE'#10' (ID = :OLD_I' +
'D)'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Delete_PresupuestosCliente'
end
item
Params = <
item
Name = 'ID'
DataType = datInteger
Value = ''
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
Value = ''
end
item
Name = 'FECHA_PRESUPUESTO'
DataType = datDateTime
Value = ''
end
item
Name = 'FECHA_DECISION'
DataType = datDateTime
Value = ''
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'REFERENCIA_AUX'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'SITUACION'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'ID_CLIENTE'
DataType = datInteger
Value = ''
end
item
Name = 'ID_DIRECCION'
DataType = datInteger
Value = ''
end
item
Name = 'REFERENCIA_CLIENTE'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'CLIENTE_FINAL'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'PORTADA'
DataType = datMemo
Value = ''
end
item
Name = 'MEMORIA'
DataType = datMemo
Value = ''
end
item
Name = 'OBSERVACIONES'
DataType = datMemo
Value = ''
end
item
Name = 'INCIDENCIAS'
DataType = datMemo
Value = ''
end
item
Name = 'INCIDENCIAS_ACTIVAS'
DataType = datSmallInt
Value = ''
end
item
Name = 'USUARIO'
DataType = datString
Size = 30
Value = ''
end
item
Name = 'IMPORTE_NETO'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
Value = ''
end
item
Name = 'DESCUENTO'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_DESCUENTO'
DataType = datCurrency
Value = ''
end
item
Name = 'BASE_IMPONIBLE'
DataType = datCurrency
Value = ''
end
item
Name = 'IVA'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_IVA'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
Value = ''
end
item
Name = 'ID_FORMA_PAGO'
DataType = datInteger
Value = ''
end
item
Name = 'ID_FACTURA'
DataType = datInteger
Value = ''
end
item
Name = 'PERSONA_CONTACTO'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'DESCRIPCION_BONIFICACION'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'IMPORTE_BONIFICACION'
DataType = datCurrency
Value = ''
end
item
Name = 'CERTIFICADO_ISO'
DataType = datSmallInt
Value = ''
end
item
Name = 'OLD_ID'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'PRESUPUESTOS_CLIENTE'
SQL =
'UPDATE PRESUPUESTOS_CLIENTE'#10' SET '#10' ID = :ID,'#10' ID_EMPRESA ' +
'= :ID_EMPRESA, '#10' FECHA_PRESUPUESTO = :FECHA_PRESUPUESTO, '#10' ' +
' FECHA_DECISION = :FECHA_DECISION, '#10' REFERENCIA = :REFERENCIA' +
', '#10' REFERENCIA_AUX = :REFERENCIA_AUX,'#10' SITUACION = :SITUAC' +
'ION, '#10' ID_CLIENTE = :ID_CLIENTE, '#10' ID_DIRECCION = :ID_DIRE' +
'CCION,'#10' REFERENCIA_CLIENTE = :REFERENCIA_CLIENTE,'#10' CLIENTE' +
'_FINAL = :CLIENTE_FINAL, '#10' PORTADA = :PORTADA, '#10' MEMORIA =' +
' :MEMORIA, '#10' OBSERVACIONES = :OBSERVACIONES, '#10' INCIDENCIAS' +
' = :INCIDENCIAS, '#10' INCIDENCIAS_ACTIVAS = :INCIDENCIAS_ACTIVAS' +
', '#10' FECHA_MODIFICACION = CURRENT_TIMESTAMP,'#10' USUARIO = :US' +
'UARIO, '#10' IMPORTE_NETO = :IMPORTE_NETO, '#10' IMPORTE_PORTE = :' +
'IMPORTE_PORTE, '#10' DESCUENTO = :DESCUENTO, '#10' IMPORTE_DESCUEN' +
'TO = :IMPORTE_DESCUENTO, '#10' BASE_IMPONIBLE = :BASE_IMPONIBLE, ' +
#10' IVA = :IVA, '#10' IMPORTE_IVA = :IMPORTE_IVA, '#10' IMPORTE_T' +
'OTAL = :IMPORTE_TOTAL, '#10' ID_FORMA_PAGO = :ID_FORMA_PAGO,'#10' ' +
'ID_FACTURA = :ID_FACTURA,'#10' PERSONA_CONTACTO = :PERSONA_CONTAC' +
'TO,'#10' DESCRIPCION_BONIFICACION = :DESCRIPCION_BONIFICACION,'#10' ' +
' IMPORTE_BONIFICACION = :IMPORTE_BONIFICACION,'#10' CERTIFICADO_' +
'ISO = :CERTIFICADO_ISO'#10' WHERE'#10' (ID = :OLD_ID)'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Update_PresupuestosCliente'
end
item
Params = <
item
Name = 'UNIDAD_MEDIDA'
Value = ''
end
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_PRESUPUESTOS_CLI_DETALLE_ID'
Value = ''
end
item
Name = 'ID_PRESUPUESTO'
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 = 'IMPORTE_UNIDAD'
Value = ''
end
item
Name = 'IMPORTE_TOTAL'
Value = ''
end
item
Name = 'VISIBLE'
Value = ''
end
item
Name = 'ID_ARTICULO'
Value = ''
end
item
Name = 'DESCUENTO'
Value = ''
end
item
Name = 'IMPORTE_PORTE'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'PRESUPUESTOS_CLIENTE_DETALLES'
SQL =
'INSERT'#10' INTO PRESUPUESTOS_CLIENTE_DETALLES'#10' (ID, ID_PRESUPUE' +
'STO, POSICION, TIPO_DETALLE, CONCEPTO, CANTIDAD,'#10' UNIDAD_MED' +
'IDA,'#10' IMPORTE_UNIDAD, IMPORTE_TOTAL, VISIBLE, ID_ARTICULO, '#10 +
' DESCUENTO, IMPORTE_PORTE, FECHA_ALTA)'#10' VALUES'#10' (:ID, :I' +
'D_PRESUPUESTO, :POSICION, :TIPO_DETALLE, :CONCEPTO,'#10' :CANTID' +
'AD, :UNIDAD_MEDIDA, :IMPORTE_UNIDAD, :IMPORTE_TOTAL, :VISIBLE,'#10' ' +
' :ID_ARTICULO, :DESCUENTO, :IMPORTE_PORTE, CURRENT_TIMESTAMP)' +
#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Insert_PresupuestosCliente_Detalles'
end
item
Params = <
item
Name = 'OLD_ID'
DataType = datAutoInc
Value = '0'
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'PRESUPUESTOS_CLIENTE_DETALLES'
SQL =
'DELETE '#10' FROM'#10' PRESUPUESTOS_CLIENTE_DETALLES'#10' WHERE'#10' (ID' +
' = :OLD_ID)'
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Delete_PresupuestosCliente_Detalles'
end
item
Params = <
item
Name = 'UNIDAD_MEDIDA'
Value = ''
end
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_PRESUPUESTOS_CLI_DETALLE_ID'
Value = ''
end
item
Name = 'ID_PRESUPUESTO'
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 = 'IMPORTE_UNIDAD'
Value = ''
end
item
Name = 'IMPORTE_TOTAL'
Value = ''
end
item
Name = 'VISIBLE'
Value = ''
end
item
Name = 'ID_ARTICULO'
Value = ''
end
item
Name = 'DESCUENTO'
Value = ''
end
item
Name = 'IMPORTE_PORTE'
Value = ''
end
item
Name = 'OLD_ID'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'PRESUPUESTOS_CLIENTE_DETALLES'
SQL =
'UPDATE PRESUPUESTOS_CLIENTE_DETALLES'#10' SET '#10' ID = :ID,'#10' ID' +
'_PRESUPUESTO = :ID_PRESUPUESTO, '#10' POSICION = :POSICION, '#10' ' +
'TIPO_DETALLE = :TIPO_DETALLE, '#10' CONCEPTO = :CONCEPTO, '#10' CA' +
'NTIDAD = :CANTIDAD, '#10' UNIDAD_MEDIDA = :UNIDAD_MEDIDA,'#10' IMP' +
'ORTE_UNIDAD = :IMPORTE_UNIDAD, '#10' IMPORTE_TOTAL = :IMPORTE_TOT' +
'AL, '#10' VISIBLE = :VISIBLE, '#10' ID_ARTICULO = :ID_ARTICULO, '#10' ' +
' DESCUENTO = :DESCUENTO, '#10' IMPORTE_PORTE = :IMPORTE_PORTE,'#10 +
' FECHA_MODIFICACION = CURRENT_TIMESTAMP'#10' WHERE'#10' (ID = :OL' +
'D_ID)'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Update_PresupuestosCliente_Detalles'
end>
RelationShips = <
item
Name = 'FK_PresupuestosCliente_Detalles'
MasterDatasetName = 'PresupuestosCliente'
MasterFields = 'ID'
DetailDatasetName = 'PresupuestosCliente_Detalles'
DetailFields = 'ID_PRESUPUESTO'
RelationshipType = rtForeignKey
end>
UpdateRules = <
item
Name = 'Insert PresupuestosCliente'
DoUpdate = False
DoDelete = False
DatasetName = 'PresupuestosCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Insert PresupuestosCliente_Detalles'
DoUpdate = False
DoDelete = False
DatasetName = 'PresupuestosCliente_Detalles'
FailureBehavior = fbRaiseException
end
item
Name = 'Update PresupuestosCliente'
DoInsert = False
DoDelete = False
DatasetName = 'PresupuestosCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Update PresupuestosCliente_Detalles'
DoInsert = False
DoDelete = False
DatasetName = 'PresupuestosCliente_Detalles'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete PresupuestosCliente_Detalles'
DoUpdate = False
DoInsert = False
DatasetName = 'PresupuestosCliente_Detalles'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete PresupuestosCliente'
DoUpdate = False
DoInsert = False
DatasetName = 'PresupuestosCliente'
FailureBehavior = fbRaiseException
end>
Version = 0
Left = 48
Top = 24
end
object DADataDictionary: TDADataDictionary
Fields = <
item
Name = 'PresupuestosCliente_ID'
DataType = datAutoInc
GeneratorName = 'GEN_PRESUPUESTOS_CLI_ID'
Required = True
DisplayLabel = 'ID'
ServerAutoRefresh = True
end
item
Name = 'PresupuestosCliente_ID_EMPRESA'
DataType = datInteger
DisplayLabel = 'ID_EMPRESA'
end
item
Name = 'PresupuestosCliente_FECHA_PRESUPUESTO'
DataType = datDateTime
end
item
Name = 'PresupuestosCliente_FECHA_DECISION'
DataType = datDateTime
end
item
Name = 'PresupuestosCliente_REFERENCIA'
DataType = datString
Size = 255
DisplayLabel = 'Referencia'
end
item
Name = 'PresupuestosCliente_SITUACION'
DataType = datString
Size = 255
DisplayLabel = 'Situaci'#243'n'
end
item
Name = 'PresupuestosCliente_ID_CLIENTE'
DataType = datInteger
DisplayLabel = 'ID_CLIENTE'
end
item
Name = 'PresupuestosCliente_NIF_CIF'
DataType = datString
Size = 15
end
item
Name = 'PresupuestosCliente_NOMBRE'
DataType = datString
Size = 255
end
item
Name = 'PresupuestosCliente_REFERENCIA_CLIENTE'
DataType = datString
Size = 255
DisplayLabel = 'PedidosCliente_REFERENCIA_CLIENTE'
end
item
Name = 'PresupuestosCliente_CLIENTE_FINAL'
DataType = datString
Size = 255
end
item
Name = 'PresupuestosCliente_PORTADA'
DataType = datMemo
end
item
Name = 'PresupuestosCliente_MEMORIA'
DataType = datMemo
end
item
Name = 'PresupuestosCliente_OBSERVACIONES'
DataType = datMemo
DisplayLabel = 'Observaciones'
end
item
Name = 'PresupuestosCliente_INCIDENCIAS'
DataType = datMemo
DisplayLabel = 'INCIDENCIAS'
end
item
Name = 'PresupuestosCliente_INCIDENCIAS_ACTIVAS'
DataType = datInteger
DisplayLabel = 'INCIDENCIAS_ACTIVAS'
end
item
Name = 'PresupuestosCliente_FECHA_ALTA'
DataType = datDateTime
DisplayLabel = 'FECHA_ALTA'
end
item
Name = 'PresupuestosCliente_FECHA_MODIFICACION'
DataType = datDateTime
DisplayLabel = 'FECHA_MODIFICACION'
end
item
Name = 'PresupuestosCliente_USUARIO'
DataType = datString
Size = 20
DisplayLabel = 'USUARIO'
end
item
Name = 'PresupuestosCliente_IMPORTE_NETO'
DataType = datCurrency
DisplayLabel = 'Importe neto'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_PERSONA_CONTACTO'
DataType = datString
Size = 255
DisplayLabel = 'Persona de contacto'
end
item
Name = 'PresupuestosCliente_IMPORTE_PORTE'
DataType = datCurrency
DisplayLabel = 'Importe del porte'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_DESCUENTO'
DataType = datFloat
DisplayLabel = 'Descuento'
DisplayFormat = ',0.00 %;-,0.00 %'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_IMPORTE_DESCUENTO'
DataType = datCurrency
DisplayLabel = 'Importe dto.'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_BASE_IMPONIBLE'
DataType = datCurrency
DisplayLabel = 'Base imponible'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_IVA'
DataType = datFloat
DisplayLabel = 'IVA'
DisplayFormat = ',0.00 %;-,0.00 %'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_IMPORTE_IVA'
DataType = datCurrency
DisplayLabel = 'Importe IVA'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_IMPORTE_TOTAL'
DataType = datCurrency
DisplayLabel = 'Importe total'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_ID_FORMA_PAGO'
DataType = datInteger
DisplayLabel = 'ID_FORMA_PAGO'
end
item
Name = 'PresupuestosCliente_Detalles_ID'
DataType = datAutoInc
GeneratorName = 'GEN_PRESUPUESTOS_CLI_DETALLE_ID'
Required = True
DisplayLabel = 'ID'
ServerAutoRefresh = True
end
item
Name = 'PresupuestosCliente_Detalles_ID_PRESUPUESTO'
DataType = datInteger
Required = True
end
item
Name = 'PresupuestosCliente_Detalles_POSICION'
DataType = datInteger
DisplayLabel = 'POSICION'
end
item
Name = 'PresupuestosCliente_Detalles_TIPO_DETALLE'
DataType = datString
Size = 25
DisplayLabel = 'TIPO_DETALLE'
end
item
Name = 'PresupuestosCliente_Detalles_CONCEPTO'
DataType = datString
Size = 2000
DisplayLabel = 'CONCEPTO'
end
item
Name = 'PresupuestosCliente_Detalles_CANTIDAD'
DataType = datFloat
DisplayLabel = 'CANTIDAD'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_Detalles_IMPORTE_UNIDAD'
DataType = datCurrency
DisplayLabel = 'Importe unidad'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_Detalles_IMPORTE_TOTAL'
DataType = datCurrency
DisplayLabel = 'Importe total'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_Detalles_VISIBLE'
DataType = datInteger
DisplayLabel = 'VISIBLE'
end
item
Name = 'PresupuestosCliente_Detalles_ID_ARTICULO'
DataType = datInteger
DisplayLabel = 'ID_ARTICULO'
end
item
Name = 'PresupuestosCliente_Detalles_DESCUENTO'
DataType = datFloat
DisplayLabel = 'Descuento'
DisplayFormat = ',0.00 %;-,0.00 %'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_Detalles_IMPORTE_PORTE'
DataType = datCurrency
DisplayLabel = 'Importe porte'
Alignment = taRightJustify
end
item
Name = 'PresupuestosCliente_Detalles_REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'PresupuestosCliente_Detalles_REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
end
item
Name = 'PresupuestosCliente_Detalles_UNIDAD_MEDIDA'
DataType = datString
Size = 255
DisplayLabel = 'Unidad de medida'
end>
Left = 48
Top = 152
end
object Bin2DataStreamer: TDABin2DataStreamer
Left = 48
Top = 88
end
object bpPresupuestosCliente: TDABusinessProcessor
Schema = schPresupuestosCliente
InsertCommandName = 'Insert_PresupuestosCliente'
DeleteCommandName = 'Delete_PresupuestosCliente'
UpdateCommandName = 'Update_PresupuestosCliente'
ReferencedDataset = 'PresupuestosCliente'
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 232
Top = 24
end
object bpPresupuestosClienteDetalles: TDABusinessProcessor
Schema = schPresupuestosCliente
InsertCommandName = 'Insert_PresupuestosCliente_Detalles'
DeleteCommandName = 'Delete_PresupuestosCliente_Detalles'
UpdateCommandName = 'Update_PresupuestosCliente_Detalles'
ReferencedDataset = 'PresupuestosCliente_Detalles'
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 232
Top = 96
end
end