AlonsoYSal_FactuGES2/Source/Modulos/Facturas de cliente/Servidor/srvFacturasCliente_Impl.dfm
roberto d2aa26662f Version 2.2.3:
- a partir de ahora se añade en los asientos de caja y banco la referencia de la factura de proveedor y su nombre, además de la referencia de la factura de proveedor en FactuGES
- se añade columna de procedencia en presupuestos, facturas de cliente.
- se añade la posibilidad de filtrar por dos campos a la vez en clientes, presupuestos y facturas

git-svn-id: https://192.168.0.254/svn/Proyectos.AlonsoYSal_FactuGES2/trunk@28 40301925-124e-1c4e-b97d-170ad7a8785b
2022-03-31 09:03:49 +00:00

1773 lines
53 KiB
Plaintext

object srvFacturasCliente: TsrvFacturasCliente
OldCreateOrder = True
OnCreate = DARemoteServiceCreate
ConnectionName = 'IBX'
ServiceSchema = schFacturasCliente
ServiceDataStreamer = Bin2DataStreamer
ExportedDataTables = <>
BeforeAcquireConnection = DataAbstractServiceBeforeAcquireConnection
Height = 180
Width = 386
object schFacturasCliente: TDASchema
ConnectionManager = dmServer.ConnectionManager
DataDictionary = DataDictionary
Diagrams = Diagrams
Datasets = <
item
Params = <>
Statements = <
item
Connection = 'IBX'
ConnectionType = 'Interbase'
Default = True
Name = 'IBX'
SQL =
'select ANO from'#10'(select distinct(substr(FECHA_FACTURA, 1,4)) as ' +
'ANO'#10'from facturas_cliente'#10'order by 1 desc)'#10#10'UNION ALL'#10#10'select di' +
'stinct '#39'Todos'#39' as ANO'#10'from empresas'#10#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ANO'
TableField = 'ANO'
end>
end>
Name = 'ListaAnosFacturas'
Fields = <
item
Name = 'ANO'
DataType = datString
Size = 255
end>
end
item
Params = <>
Statements = <
item
Connection = 'IBX'
TargetTable = 'V_FACTURAS_CLIENTE'
StatementType = stAutoSQL
ColumnMappings = <
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'ID_EMPRESA'
TableField = 'ID_EMPRESA'
end
item
DatasetField = 'REFERENCIA'
TableField = 'REFERENCIA'
end
item
DatasetField = 'TIPO'
TableField = 'TIPO'
end
item
DatasetField = 'ID_COMISION_LIQUIDADA'
TableField = 'ID_COMISION_LIQUIDADA'
end
item
DatasetField = 'FECHA_FACTURA'
TableField = 'FECHA_FACTURA'
end
item
DatasetField = 'SITUACION'
TableField = 'SITUACION'
end
item
DatasetField = 'BASE_IMPONIBLE'
TableField = 'BASE_IMPONIBLE'
end
item
DatasetField = 'DESCUENTO'
TableField = 'DESCUENTO'
end
item
DatasetField = 'IMPORTE_DESCUENTO'
TableField = 'IMPORTE_DESCUENTO'
end
item
DatasetField = 'IVA'
TableField = 'IVA'
end
item
DatasetField = 'IMPORTE_IVA'
TableField = 'IMPORTE_IVA'
end
item
DatasetField = 'RE'
TableField = 'RE'
end
item
DatasetField = 'IMPORTE_RE'
TableField = 'IMPORTE_RE'
end
item
DatasetField = 'IMPORTE_TOTAL'
TableField = 'IMPORTE_TOTAL'
end
item
DatasetField = 'OBSERVACIONES'
TableField = 'OBSERVACIONES'
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 = 'CALLE'
TableField = 'CALLE'
end
item
DatasetField = 'POBLACION'
TableField = 'POBLACION'
end
item
DatasetField = 'PROVINCIA'
TableField = 'PROVINCIA'
end
item
DatasetField = 'CODIGO_POSTAL'
TableField = 'CODIGO_POSTAL'
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 = 'RECARGO_EQUIVALENCIA'
TableField = 'RECARGO_EQUIVALENCIA'
end
item
DatasetField = 'ID_TIPO_IVA'
TableField = 'ID_TIPO_IVA'
end
item
DatasetField = 'IMPORTE_NETO'
TableField = 'IMPORTE_NETO'
end
item
DatasetField = 'IMPORTE_PORTE'
TableField = 'IMPORTE_PORTE'
end
item
DatasetField = 'ID_AGENTE'
TableField = 'ID_AGENTE'
end
item
DatasetField = 'REFERENCIA_COMISION'
TableField = 'REFERENCIA_COMISION'
end
item
DatasetField = 'IGNORAR_CONTABILIDAD'
TableField = 'IGNORAR_CONTABILIDAD'
end
item
DatasetField = 'ID_TIENDA'
TableField = 'ID_TIENDA'
end
item
DatasetField = 'TIENDA'
TableField = 'TIENDA'
end
item
DatasetField = 'ID_SUBCUENTA'
TableField = 'ID_SUBCUENTA'
end
item
DatasetField = 'SUBCUENTA'
TableField = 'SUBCUENTA'
end
item
DatasetField = 'NOMBRE_CLIENTE'
TableField = 'NOMBRE_CLIENTE'
end
item
DatasetField = 'NOMBRE_COMERCIAL_CLIENTE'
TableField = 'NOMBRE_COMERCIAL_CLIENTE'
end
item
DatasetField = 'FECHA_VENCIMIENTO'
TableField = 'FECHA_VENCIMIENTO'
end
item
DatasetField = 'ID_EJERCICIO'
TableField = 'ID_EJERCICIO'
end
item
DatasetField = 'ESTADO_EJERCICIO'
TableField = 'ESTADO_EJERCICIO'
end
item
DatasetField = 'ASIENTO_PUNTEADO'
TableField = 'ASIENTO_PUNTEADO'
end
item
DatasetField = 'ID_DIRECCION'
TableField = 'ID_DIRECCION'
end
item
DatasetField = 'ID_CONTRATO'
TableField = 'ID_CONTRATO'
end
item
DatasetField = 'REF_CONTRATO'
TableField = 'REF_CONTRATO'
end
item
DatasetField = 'SIN_COMISION'
TableField = 'SIN_COMISION'
end
item
DatasetField = 'TIPO_FACTURA'
TableField = 'TIPO_FACTURA'
end
item
DatasetField = 'REFERENCIA_CLIENTE'
TableField = 'REFERENCIA_CLIENTE'
end
item
DatasetField = 'VENDEDOR'
TableField = 'VENDEDOR'
end
item
DatasetField = 'LOPD'
TableField = 'LOPD'
end
item
DatasetField = 'LISTA_NOMBRES'
TableField = 'LISTA_NOMBRES'
end
item
DatasetField = 'PROCEDENCIA_CLIENTE'
TableField = 'PROCEDENCIA_CLIENTE'
end>
end>
Name = 'FacturasCliente'
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_FACTURAS_CLIENTE_ID'
ServerAutoRefresh = True
DictionaryEntry = 'FacturasCliente_ID'
InPrimaryKey = True
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_ID_EMPRESA'
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 20
DictionaryEntry = 'FacturasCliente_REFERENCIA'
end
item
Name = 'TIPO'
DataType = datString
Size = 1
DictionaryEntry = 'FacturasCliente_TIPO'
end
item
Name = 'ID_COMISION_LIQUIDADA'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_ID_COMISION_LIQUIDADA'
end
item
Name = 'FECHA_FACTURA'
DataType = datDateTime
DictionaryEntry = 'FacturasCliente_FECHA_FACTURA'
end
item
Name = 'FECHA_VENCIMIENTO'
DataType = datDateTime
end
item
Name = 'SITUACION'
DataType = datString
Size = 255
DictionaryEntry = 'FacturasCliente_SITUACION'
end
item
Name = 'BASE_IMPONIBLE'
DataType = datCurrency
DictionaryEntry = 'FacturasCliente_BASE_IMPONIBLE'
end
item
Name = 'DESCUENTO'
DataType = datFloat
DictionaryEntry = 'FacturasCliente_DESCUENTO'
end
item
Name = 'IMPORTE_DESCUENTO'
DataType = datCurrency
DictionaryEntry = 'FacturasCliente_IMPORTE_DESCUENTO'
end
item
Name = 'IVA'
DataType = datFloat
DictionaryEntry = 'FacturasCliente_IVA'
end
item
Name = 'IMPORTE_IVA'
DataType = datCurrency
DictionaryEntry = 'FacturasCliente_IMPORTE_IVA'
end
item
Name = 'RE'
DataType = datFloat
DictionaryEntry = 'FacturasCliente_RE'
end
item
Name = 'IMPORTE_RE'
DataType = datCurrency
DictionaryEntry = 'FacturasCliente_IMPORTE_RE'
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
DictionaryEntry = 'FacturasCliente_IMPORTE_TOTAL'
end
item
Name = 'OBSERVACIONES'
DataType = datMemo
DictionaryEntry = 'FacturasCliente_OBSERVACIONES'
end
item
Name = 'ID_CLIENTE'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_ID_CLIENTE'
end
item
Name = 'NOMBRE_CLIENTE'
DataType = datString
Size = 255
ServerAutoRefresh = True
end
item
Name = 'REFERENCIA_CLIENTE'
DataType = datString
Size = 255
end
item
Name = 'LOPD'
DataType = datSmallInt
end
item
Name = 'NOMBRE_COMERCIAL_CLIENTE'
DataType = datString
Size = 255
ServerAutoRefresh = True
end
item
Name = 'NIF_CIF'
DataType = datString
Size = 15
DictionaryEntry = 'FacturasCliente_NIF_CIF'
end
item
Name = 'NOMBRE'
DataType = datString
Size = 100
DictionaryEntry = 'FacturasCliente_NOMBRE'
end
item
Name = 'ID_DIRECCION'
DataType = datInteger
end
item
Name = 'CALLE'
DataType = datString
Size = 150
DictionaryEntry = 'FacturasCliente_CALLE'
end
item
Name = 'POBLACION'
DataType = datString
Size = 150
DictionaryEntry = 'FacturasCliente_POBLACION'
end
item
Name = 'PROVINCIA'
DataType = datString
Size = 30
DictionaryEntry = 'FacturasCliente_PROVINCIA'
end
item
Name = 'CODIGO_POSTAL'
DataType = datString
Size = 10
DictionaryEntry = 'FacturasCliente_CODIGO_POSTAL'
end
item
Name = 'FECHA_ALTA'
DataType = datDateTime
DictionaryEntry = 'FacturasCliente_FECHA_ALTA'
end
item
Name = 'FECHA_MODIFICACION'
DataType = datDateTime
DictionaryEntry = 'FacturasCliente_FECHA_MODIFICACION'
end
item
Name = 'USUARIO'
DataType = datString
Size = 100
DictionaryEntry = 'FacturasCliente_USUARIO'
end
item
Name = 'ID_FORMA_PAGO'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_ID_FORMA_PAGO'
end
item
Name = 'RECARGO_EQUIVALENCIA'
DataType = datSmallInt
DictionaryEntry = 'FacturasCliente_RECARGO_EQUIVALENCIA'
end
item
Name = 'ID_TIPO_IVA'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_ID_TIPO_IVA'
end
item
Name = 'IMPORTE_NETO'
DataType = datCurrency
DictionaryEntry = 'FacturasCliente_IMPORTE_NETO'
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
DictionaryEntry = 'FacturasCliente_IMPORTE_PORTE'
end
item
Name = 'ID_AGENTE'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_ID_AGENTE'
end
item
Name = 'REFERENCIA_COMISION'
DataType = datString
Size = 255
DictionaryEntry = 'FacturasCliente_REFERENCIA_COMISION'
end
item
Name = 'IGNORAR_CONTABILIDAD'
DataType = datSmallInt
DictionaryEntry = 'FacturasCliente_IGNORAR_CONTABILIDAD'
end
item
Name = 'ID_TIENDA'
DataType = datInteger
ServerAutoRefresh = True
end
item
Name = 'TIENDA'
DataType = datString
Size = 255
ServerAutoRefresh = True
end
item
Name = 'ID_SUBCUENTA'
DataType = datInteger
end
item
Name = 'SUBCUENTA'
DataType = datString
Size = 255
end
item
Name = 'ID_EJERCICIO'
DataType = datInteger
end
item
Name = 'ESTADO_EJERCICIO'
DataType = datString
Size = 255
end
item
Name = 'ASIENTO_PUNTEADO'
DataType = datSmallInt
end
item
Name = 'ID_CONTRATO'
DataType = datInteger
end
item
Name = 'REF_CONTRATO'
DataType = datString
Size = 255
end
item
Name = 'VENDEDOR'
DataType = datString
Size = 255
end
item
Name = 'SIN_COMISION'
DataType = datSmallInt
end
item
Name = 'TIPO_FACTURA'
DataType = datString
Size = 255
end
item
Name = 'LISTA_NOMBRES'
DataType = datString
Size = 255
DictionaryEntry = 'FacturasCliente_LISTA_NOMBRES'
end
item
Name = 'PROCEDENCIA_CLIENTE'
DataType = datString
Size = 255
end>
end
item
Params = <>
Statements = <
item
Connection = 'IBX'
TargetTable = 'FACTURAS_CLIENTE_DETALLES'
SQL =
'SELECT'#10' FACTURAS_CLIENTE_DETALLES.ID, FACTURAS_CLIENTE_DETALL' +
'ES.ID_FACTURA,'#10' FACTURAS_CLIENTE_DETALLES.POSICION, FACTURAS_' +
'CLIENTE_DETALLES.TIPO_DETALLE,'#10' FACTURAS_CLIENTE_DETALLES.CON' +
'CEPTO, FACTURAS_CLIENTE_DETALLES.CANTIDAD,'#10' FACTURAS_CLIENTE_' +
'DETALLES.IMPORTE_UNIDAD, FACTURAS_CLIENTE_DETALLES.IMPORTE_TOTAL' +
','#10' FACTURAS_CLIENTE_DETALLES.VISIBLE,'#10#10' FACTURAS_CLIENTE_D' +
'ETALLES.ID_ARTICULO, FACTURAS_CLIENTE_DETALLES.DESCUENTO,'#10' FA' +
'CTURAS_CLIENTE_DETALLES.IMPORTE_PORTE, ARTICULOS.REFERENCIA,'#10' ' +
' ARTICULOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR'#10#10'FROM FACTURA' +
'S_CLIENTE_DETALLES'#10'LEFT JOIN ARTICULOS ON FACTURAS_CLIENTE_DETAL' +
'LES.ID_ARTICULO = ARTICULOS.ID'#10'where {where}'#10'ORDER BY POSICION;'#10
StatementType = stSQL
ColumnMappings = <
item
DatasetField = 'ID'
TableField = 'ID'
end
item
DatasetField = 'ID_FACTURA'
TableField = 'ID_FACTURA'
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 = '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 = 'FacturasCliente_Detalles'
Fields = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_FACTURA_CLIENTE_DETALLES_ID'
ServerAutoRefresh = True
DictionaryEntry = 'FacturasCliente_Detalles_ID'
InPrimaryKey = True
end
item
Name = 'ID_FACTURA'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_Detalles_ID_FACTURA'
end
item
Name = 'POSICION'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_Detalles_POSICION'
end
item
Name = 'TIPO_DETALLE'
DataType = datString
Size = 10
DictionaryEntry = 'FacturasCliente_Detalles_TIPO_DETALLE'
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 2000
DictionaryEntry = 'FacturasCliente_Detalles_CONCEPTO'
end
item
Name = 'CANTIDAD'
DataType = datFloat
DictionaryEntry = 'FacturasCliente_Detalles_CANTIDAD'
end
item
Name = 'IMPORTE_UNIDAD'
DataType = datCurrency
DictionaryEntry = 'FacturasCliente_Detalles_IMPORTE_UNIDAD'
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
DictionaryEntry = 'FacturasCliente_Detalles_IMPORTE_TOTAL'
end
item
Name = 'VISIBLE'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_Detalles_VISIBLE'
end
item
Name = 'ID_ARTICULO'
DataType = datInteger
DictionaryEntry = 'FacturasCliente_Detalles_ID_ARTICULO'
end
item
Name = 'DESCUENTO'
DataType = datFloat
DictionaryEntry = 'FacturasCliente_Detalles_DESCUENTO'
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
DictionaryEntry = 'FacturasCliente_Detalles_IMPORTE_PORTE'
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
end>
end>
JoinDataTables = <>
UnionDataTables = <>
Commands = <
item
Params = <
item
Name = 'IdFactura'
Value = ''
end
item
Name = 'Tipo'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
ConnectionType = 'Interbase'
Default = True
Name = 'IBX'
SQL = 'execute procedure proc_delete_asiento_factura :IdFactura, :Tipo'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Delete_AsientoFactura'
end
item
Params = <
item
Name = 'IdFactura'
Value = ''
end
item
Name = 'IdSubCuentaVenta'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
ConnectionType = 'Interbase'
Default = True
Name = 'IBX'
SQL =
'execute procedure proc_new_asiento_factura_cli :IdFactura, :IdSu' +
'bCuentaVenta'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Insert_AsientoFactura'
end
item
Params = <
item
Name = 'OLD_ID'
DataType = datInteger
Value = ''
ParamType = daptInput
end>
Statements = <
item
Connection = 'IBX'
TargetTable = 'FACTURAS_CLIENTE'
SQL = 'DELETE '#10' FROM'#10' FACTURAS_CLIENTE'#10' WHERE'#10' (ID = :OLD_ID)'
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Delete_FacturasCliente'
end
item
Params = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_FACTURA_CLIENTE_DETALLES_ID'
Value = ''
end
item
Name = 'CANTIDAD'
DataType = datCurrency
Value = ''
end
item
Name = 'POSICION'
DataType = datInteger
Value = ''
end
item
Name = 'ID_FACTURA'
DataType = datInteger
Value = ''
end
item
Name = 'TIPO_DETALLE'
DataType = datString
Size = 10
Value = ''
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 2000
Value = ''
end
item
Name = 'IMPORTE_UNIDAD'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
Value = ''
end
item
Name = 'VISIBLE'
DataType = datSmallInt
Value = ''
end
item
Name = 'ID_ARTICULO'
DataType = datInteger
Value = ''
end
item
Name = 'DESCUENTO'
DataType = datFloat
Value = ''
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
Value = ''
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'FACTURAS_CLIENTE_DETALLES'
SQL =
'INSERT'#10' INTO FACTURAS_CLIENTE_DETALLES'#10' (ID, CANTIDAD, POSIC' +
'ION, ID_FACTURA, TIPO_DETALLE, CONCEPTO,'#10' IMPORTE_UNIDAD, IM' +
'PORTE_TOTAL, VISIBLE,'#10' ID_ARTICULO, DESCUENTO, IMPORTE_PORTE' +
')'#10' VALUES'#10' (:ID, :CANTIDAD, :POSICION, :ID_FACTURA, :TIPO_DE' +
'TALLE, :CONCEPTO,'#10' :IMPORTE_UNIDAD, :IMPORTE_TOTAL, :VISIBLE' +
','#10' :ID_ARTICULO, :DESCUENTO, :IMPORTE_PORTE)'
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Insert_FacturasCliente_Detalles'
end
item
Params = <
item
Name = 'OLD_ID'
DataType = datInteger
Value = ''
ParamType = daptInput
end>
Statements = <
item
Connection = 'IBX'
TargetTable = 'FACTURAS_CLIENTE_DETALLES'
SQL =
'DELETE '#10' FROM'#10' FACTURAS_CLIENTE_DETALLES'#10' WHERE'#10' (ID = :' +
'OLD_ID)'
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Delete_FacturasCliente_Detalles'
end
item
Params = <
item
Name = 'CANTIDAD'
DataType = datCurrency
Value = ''
end
item
Name = 'POSICION'
DataType = datInteger
Value = ''
end
item
Name = 'ID_FACTURA'
DataType = datInteger
Value = ''
end
item
Name = 'TIPO_DETALLE'
DataType = datString
Size = 10
Value = ''
end
item
Name = 'CONCEPTO'
DataType = datString
Size = 2000
Value = ''
end
item
Name = 'IMPORTE_UNIDAD'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
Value = ''
end
item
Name = 'VISIBLE'
DataType = datSmallInt
Value = ''
end
item
Name = 'ID_ARTICULO'
DataType = datInteger
Value = ''
end
item
Name = 'DESCUENTO'
DataType = datFloat
Value = ''
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
Value = ''
end
item
Name = 'OLD_ID'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
TargetTable = 'FACTURAS_CLIENTE_DETALLES'
SQL =
'UPDATE FACTURAS_CLIENTE_DETALLES'#10' SET '#10' CANTIDAD = :CANTIDAD' +
', '#10' POSICION = :POSICION, '#10' ID_FACTURA = :ID_FACTURA, '#10' ' +
' TIPO_DETALLE = :TIPO_DETALLE, '#10' CONCEPTO = :CONCEPTO, '#10' I' +
'MPORTE_UNIDAD = :IMPORTE_UNIDAD, '#10' IMPORTE_TOTAL = :IMPORTE_T' +
'OTAL,'#10' VISIBLE = :VISIBLE,'#10' ID_ARTICULO = :ID_ARTICULO,'#10' ' +
' DESCUENTO = :DESCUENTO,'#10' IMPORTE_PORTE = :IMPORTE_PORTE'#10' W' +
'HERE'#10' (ID = :OLD_ID)'
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Update_FacturasCliente_Detalles'
end
item
Params = <
item
Name = 'ID'
DataType = datAutoInc
GeneratorName = 'GEN_FACTURAS_CLIENTE_ID'
Value = ''
end
item
Name = 'ID_EMPRESA'
DataType = datInteger
Value = ''
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'FECHA_FACTURA'
DataType = datDateTime
Value = ''
end
item
Name = 'FECHA_VENCIMIENTO'
DataType = datDateTime
Value = ''
end
item
Name = 'BASE_IMPONIBLE'
DataType = datCurrency
Value = ''
end
item
Name = 'DESCUENTO'
DataType = datFloat
Value = ''
end
item
Name = 'IMPORTE_DESCUENTO'
DataType = datCurrency
Value = ''
end
item
Name = 'IVA'
DataType = datFloat
Value = ''
end
item
Name = 'IMPORTE_IVA'
DataType = datCurrency
Value = ''
end
item
Name = 'RE'
DataType = datFloat
Value = ''
end
item
Name = 'IMPORTE_RE'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
Value = ''
end
item
Name = 'OBSERVACIONES'
DataType = datMemo
Value = ''
end
item
Name = 'ID_CLIENTE'
DataType = datInteger
Value = ''
end
item
Name = 'NIF_CIF'
DataType = datString
Size = 15
Value = ''
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'CALLE'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'POBLACION'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'PROVINCIA'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'CODIGO_POSTAL'
DataType = datString
Size = 10
Value = ''
end
item
Name = 'USUARIO'
DataType = datString
Size = 30
Value = ''
end
item
Name = 'ID_FORMA_PAGO'
DataType = datInteger
Value = ''
end
item
Name = 'RECARGO_EQUIVALENCIA'
DataType = datSmallInt
Value = ''
end
item
Name = 'ID_TIPO_IVA'
DataType = datInteger
Value = ''
end
item
Name = 'IMPORTE_NETO'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
Value = ''
end
item
Name = 'IGNORAR_CONTABILIDAD'
DataType = datSmallInt
Value = ''
end
item
Name = 'ID_TIENDA'
DataType = datInteger
Value = ''
end
item
Name = 'ID_CONTRATO'
DataType = datInteger
Value = ''
end
item
Name = 'SIN_COMISION'
DataType = datSmallInt
Value = ''
end
item
Name = 'TIPO_FACTURA'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'SITUACION'
DataType = datString
Size = 255
Value = ''
end>
Statements = <
item
Connection = 'IBX'
Default = True
TargetTable = 'FACTURAS_CLIENTE'
SQL =
'INSERT INTO FACTURAS_CLIENTE ('#10' ID,'#10' ID_EMPRESA,'#10' REFER' +
'ENCIA,'#10' FECHA_FACTURA,'#10' FECHA_VENCIMIENTO,'#10' BASE_IMPONI' +
'BLE,'#10' DESCUENTO,'#10' IMPORTE_DESCUENTO,'#10' IVA,'#10' IMPORTE_' +
'IVA,'#10' RE,'#10' IMPORTE_RE,'#10' IMPORTE_TOTAL,'#10' OBSERVACIONE' +
'S,'#10' ID_CLIENTE,'#10' NIF_CIF,'#10' NOMBRE,'#10' CALLE,'#10' POBLA' +
'CION,'#10' PROVINCIA,'#10' CODIGO_POSTAL,'#10' FECHA_ALTA,'#10' USUA' +
'RIO,'#10' ID_FORMA_PAGO,'#10' RECARGO_EQUIVALENCIA,'#10' ID_TIPO_IV' +
'A,'#10' IMPORTE_NETO,'#10' IMPORTE_PORTE,'#10' IGNORAR_CONTABILIDAD' +
','#10' ID_TIENDA,'#10' ID_CONTRATO,'#10' SIN_COMISION,'#10' TIPO_FAC' +
'TURA,'#10' SITUACION)'#10' VALUES ('#10' :ID,'#10' :ID_EMPRESA,'#10' :R' +
'EFERENCIA,'#10' :FECHA_FACTURA,'#10' :FECHA_VENCIMIENTO,'#10' :BASE' +
'_IMPONIBLE,'#10' :DESCUENTO,'#10' :IMPORTE_DESCUENTO,'#10' :IVA,'#10' ' +
' :IMPORTE_IVA,'#10' :RE,'#10' :IMPORTE_RE,'#10' :IMPORTE_TOTAL,'#10' ' +
' :OBSERVACIONES,'#10' :ID_CLIENTE,'#10' :NIF_CIF,'#10' :NOMBRE,'#10' ' +
' :CALLE,'#10' :POBLACION,'#10' :PROVINCIA,'#10' :CODIGO_POSTAL,'#10' ' +
' CURRENT_TIMESTAMP,'#10' :USUARIO,'#10' :ID_FORMA_PAGO,'#10' :RECA' +
'RGO_EQUIVALENCIA,'#10' :ID_TIPO_IVA,'#10' :IMPORTE_NETO,'#10' :IMPO' +
'RTE_PORTE,'#10' :IGNORAR_CONTABILIDAD,'#10' :ID_TIENDA,'#10' :ID_CO' +
'NTRATO,'#10' :SIN_COMISION,'#10' :TIPO_FACTURA,'#10' :SITUACION);'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Insert_FacturasCliente'
end
item
Params = <
item
Name = 'ID_EMPRESA'
DataType = datInteger
Value = ''
end
item
Name = 'REFERENCIA'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'FECHA_FACTURA'
DataType = datDateTime
Value = ''
end
item
Name = 'FECHA_VENCIMIENTO'
DataType = datDateTime
Value = ''
end
item
Name = 'BASE_IMPONIBLE'
DataType = datCurrency
Value = ''
end
item
Name = 'DESCUENTO'
DataType = datFloat
Value = ''
end
item
Name = 'IMPORTE_DESCUENTO'
DataType = datCurrency
Value = ''
end
item
Name = 'IVA'
DataType = datFloat
Value = ''
end
item
Name = 'IMPORTE_IVA'
DataType = datCurrency
Value = ''
end
item
Name = 'RE'
DataType = datFloat
Value = ''
end
item
Name = 'IMPORTE_RE'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_TOTAL'
DataType = datCurrency
Value = ''
end
item
Name = 'OBSERVACIONES'
DataType = datMemo
Value = ''
end
item
Name = 'ID_CLIENTE'
DataType = datInteger
Value = ''
end
item
Name = 'NIF_CIF'
DataType = datString
Size = 15
Value = ''
end
item
Name = 'NOMBRE'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'CALLE'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'POBLACION'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'PROVINCIA'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'CODIGO_POSTAL'
DataType = datString
Size = 10
Value = ''
end
item
Name = 'USUARIO'
DataType = datString
Size = 30
Value = ''
end
item
Name = 'ID_FORMA_PAGO'
DataType = datInteger
Value = ''
end
item
Name = 'RECARGO_EQUIVALENCIA'
DataType = datSmallInt
Value = ''
end
item
Name = 'ID_TIPO_IVA'
DataType = datInteger
Value = ''
end
item
Name = 'IMPORTE_NETO'
DataType = datCurrency
Value = ''
end
item
Name = 'IMPORTE_PORTE'
DataType = datCurrency
Value = ''
end
item
Name = 'IGNORAR_CONTABILIDAD'
DataType = datSmallInt
Value = ''
end
item
Name = 'ID_TIENDA'
DataType = datInteger
Value = ''
end
item
Name = 'ID_CONTRATO'
DataType = datInteger
Value = ''
end
item
Name = 'SIN_COMISION'
DataType = datSmallInt
Value = ''
end
item
Name = 'TIPO_FACTURA'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'SITUACION'
DataType = datString
Size = 255
Value = ''
end
item
Name = 'OLD_ID'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
TargetTable = 'FACTURAS_CLIENTE'
SQL =
'UPDATE FACTURAS_CLIENTE'#10' SET'#10' ID_EMPRESA = :ID_EMPRESA,'#10' ' +
'REFERENCIA = :REFERENCIA,'#10' FECHA_FACTURA = :FECHA_FACTURA,'#10' ' +
' FECHA_VENCIMIENTO = :FECHA_VENCIMIENTO,'#10' BASE_IMPONIBLE = :' +
'BASE_IMPONIBLE,'#10' DESCUENTO = :DESCUENTO,'#10' IMPORTE_DESCUENT' +
'O = :IMPORTE_DESCUENTO,'#10' IVA = :IVA,'#10' IMPORTE_IVA = :IMPOR' +
'TE_IVA,'#10' RE = :RE,'#10' IMPORTE_RE = :IMPORTE_RE,'#10' IMPORTE_' +
'TOTAL = :IMPORTE_TOTAL,'#10' OBSERVACIONES = :OBSERVACIONES,'#10' ' +
'ID_CLIENTE = :ID_CLIENTE,'#10' NIF_CIF = :NIF_CIF,'#10' NOMBRE = :' +
'NOMBRE,'#10' CALLE = :CALLE,'#10' POBLACION = :POBLACION,'#10' PROV' +
'INCIA = :PROVINCIA,'#10' CODIGO_POSTAL = :CODIGO_POSTAL,'#10' FECH' +
'A_MODIFICACION = CURRENT_TIMESTAMP,'#10' USUARIO = :USUARIO,'#10' ' +
'ID_FORMA_PAGO = :ID_FORMA_PAGO,'#10' RECARGO_EQUIVALENCIA = :RECA' +
'RGO_EQUIVALENCIA,'#10' ID_TIPO_IVA = :ID_TIPO_IVA,'#10' IMPORTE_NE' +
'TO = :IMPORTE_NETO,'#10' IMPORTE_PORTE = :IMPORTE_PORTE,'#10' IGNO' +
'RAR_CONTABILIDAD = :IGNORAR_CONTABILIDAD,'#10' ID_TIENDA = :ID_TI' +
'ENDA,'#10' ID_CONTRATO = :ID_CONTRATO,'#10' SIN_COMISION = :SIN_CO' +
'MISION,'#10' TIPO_FACTURA = :TIPO_FACTURA,'#10' SITUACION = :SITUA' +
'CION'#10' WHERE'#10' (ID = :OLD_ID);'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Update_FacturasCliente'
end
item
Params = <
item
Name = 'ID_FACTURA'
Value = ''
end>
Statements = <
item
Connection = 'IBX'
SQL = 'delete from recibos_cliente'#10'where id_factura = :ID_FACTURA'#10
StatementType = stSQL
ColumnMappings = <>
end>
Name = 'Delete_RecibosFactura'
end>
RelationShips = <
item
Name = 'FK_FacturasCliente_Detalles'
MasterDatasetName = 'FacturasCliente'
MasterFields = 'ID'
DetailDatasetName = 'FacturasCliente_Detalles'
DetailFields = 'ID_FACTURA'
RelationshipType = rtForeignKey
end>
UpdateRules = <
item
Name = 'Insert FacturasCliente'
DoUpdate = False
DoDelete = False
DatasetName = 'FacturasCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Insert DetallesFacturasCliente'
DoUpdate = False
DoDelete = False
DatasetName = 'FacturasCliente_Detalles'
FailureBehavior = fbRaiseException
end
item
Name = 'Update FacturasCliente'
DoInsert = False
DoDelete = False
DatasetName = 'FacturasCliente'
FailureBehavior = fbRaiseException
end
item
Name = 'Update DetallesFacturasCliente'
DoInsert = False
DoDelete = False
DatasetName = 'FacturasCliente_Detalles'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete DetallesFacturasCliente'
DoUpdate = False
DoInsert = False
DatasetName = 'FacturasCliente_Detalles'
FailureBehavior = fbRaiseException
end
item
Name = 'Delete FacturasCliente'
DoUpdate = False
DoInsert = False
DatasetName = 'FacturasCliente'
FailureBehavior = fbRaiseException
end>
Version = 0
Left = 48
Top = 24
end
object Diagrams: TDADiagrams
Left = 150
Top = 74
DiagramData = '<Diagrams>'#13#10'</Diagrams>'#13#10
end
object DataDictionary: TDADataDictionary
Fields = <
item
Name = 'FacturasCliente_ID'
DataType = datAutoInc
GeneratorName = 'GEN_FACTURAS_CLIENTE_ID'
Required = True
DisplayLabel = 'ID'
ServerAutoRefresh = True
end
item
Name = 'FacturasCliente_ID_EMPRESA'
DataType = datInteger
DisplayLabel = 'ID_EMPRESA'
end
item
Name = 'FacturasCliente_FECHA_FACTURA'
DataType = datDateTime
DisplayLabel = 'Fecha de las factura'
end
item
Name = 'FacturasCliente_VENCIMIENTO'
DataType = datInteger
DisplayLabel = 'Vencimiento'
end
item
Name = 'FacturasCliente_SITUACION'
DataType = datString
Size = 255
DisplayLabel = 'Situaci'#243'n'
ServerAutoRefresh = True
end
item
Name = 'FacturasCliente_BASE_IMPONIBLE'
DataType = datCurrency
DisplayLabel = 'Base imponible'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_IMPORTE_DESCUENTO'
DataType = datCurrency
DisplayLabel = 'Importe dto.'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_IMPORTE_IVA'
DataType = datCurrency
DisplayLabel = 'Importe IVA'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_IMPORTE_TOTAL'
DataType = datCurrency
DisplayLabel = 'Importe total'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_FORMA_PAGO'
DataType = datMemo
DisplayLabel = 'Forma de pago'
end
item
Name = 'FacturasCliente_ID_CLIENTE'
DataType = datInteger
DisplayLabel = 'ID_CLIENTE'
end
item
Name = 'FacturasCliente_LISTA_NOMBRES'
DataType = datString
Size = 255
DisplayLabel = 'Otros nombres'
end
item
Name = 'FacturasCliente_NIF_CIF'
DataType = datString
Size = 15
DisplayLabel = 'NIF/CIF'
end
item
Name = 'FacturasCliente_CODIGO_POSTAL'
DataType = datString
Size = 10
DisplayLabel = 'C'#243'd. postal'
end
item
Name = 'FacturasCliente_FECHA_ALTA'
DataType = datDateTime
DisplayLabel = 'FECHA_ALTA'
end
item
Name = 'FacturasCliente_FECHA_MODIFICACION'
DataType = datDateTime
DisplayLabel = 'FECHA_MODIFICACION'
end
item
Name = 'FacturasCliente_OBSERVACIONES'
DataType = datMemo
DisplayLabel = 'Observaciones'
end
item
Name = 'FacturasCliente_NOMBRE'
DataType = datString
Size = 100
DisplayLabel = 'Cliente'
ServerAutoRefresh = True
end
item
Name = 'FacturasCliente_CALLE'
DataType = datString
Size = 150
DisplayLabel = 'Direcci'#243'n'
end
item
Name = 'FacturasCliente_PROVINCIA'
DataType = datString
Size = 30
DisplayLabel = 'Provincia'
end
item
Name = 'FacturasCliente_POBLACION'
DataType = datString
Size = 150
DisplayLabel = 'Poblaci'#243'n'
end
item
Name = 'FacturasCliente_IVA'
DataType = datFloat
DisplayLabel = 'IVA'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_USUARIO'
DataType = datString
Size = 100
DisplayLabel = 'USUARIO'
end
item
Name = 'FacturasCliente_DESCUENTO'
DataType = datFloat
DisplayLabel = 'Dto.'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_Detalles_ID'
DataType = datAutoInc
GeneratorName = 'GEN_FACTURA_CLIENTE_DETALLES_ID'
Required = True
DisplayLabel = 'ID'
ServerAutoRefresh = True
end
item
Name = 'FacturasCliente_Detalles_ID_FACTURA'
DataType = datInteger
DisplayLabel = 'ID_FACTURA'
end
item
Name = 'FacturasCliente_Detalles_TIPO_DETALLE'
DataType = datString
Size = 10
DisplayLabel = 'Tipo detalle'
end
item
Name = 'FacturasCliente_Detalles_CONCEPTO'
DataType = datString
Size = 2000
DisplayLabel = 'Concepto'
end
item
Name = 'FacturasCliente_Detalles_IMPORTE_UNIDAD'
DataType = datCurrency
DisplayLabel = 'Importe unidad'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_Detalles_IMPORTE_TOTAL'
DataType = datCurrency
DisplayLabel = 'Importe total'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_Detalles_VISIBLE'
DataType = datInteger
DisplayLabel = #191'Visible?'
end
item
Name = 'FacturasCliente_Detalles_POSICION'
DataType = datInteger
DisplayLabel = 'Posici'#243'n'
end
item
Name = 'FacturasCliente_Detalles_CANTIDAD'
DataType = datFloat
DisplayLabel = 'Cantidad'
end
item
Name = 'FacturasCliente_FECHA_PAGADO'
DataType = datDateTime
DisplayLabel = 'Fecha de pago'
end
item
Name = 'FacturasCliente_FECHA_VENCIMIENTO'
DataType = datDateTime
DisplayLabel = 'Fecha de vencimiento'
ServerAutoRefresh = True
end
item
Name = 'FacturasCliente_RE'
DataType = datFloat
DisplayLabel = 'RE'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_IMPORTE_RE'
DataType = datCurrency
DisplayLabel = 'Importe RE'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_REFERENCIA'
DataType = datString
Size = 20
DisplayLabel = 'Referencia'
ServerAutoRefresh = True
end
item
Name = 'FacturasCliente_ID_FORMA_PAGO'
DataType = datInteger
end
item
Name = 'FacturasCliente_IMPORTE_NETO'
DataType = datCurrency
DisplayLabel = 'Importe neto'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_IMPORTE_PORTE'
DataType = datCurrency
DisplayLabel = 'Importe del porte'
Alignment = taRightJustify
end
item
Name = 'FacturasCliente_RECARGO_EQUIVALENCIA'
DataType = datSmallInt
DisplayLabel = #191'Con R.E.?'
end
item
Name = 'FacturasCliente_TIPO'
DataType = datString
Size = 1
DisplayLabel = 'Tipo'
end
item
Name = 'FacturasCliente_ID_TIPO_IVA'
DataType = datInteger
DisplayLabel = 'ID_TIPO_IVA'
end
item
Name = 'FacturasCliente_ID_COMISION_LIQUIDADA'
DataType = datInteger
DisplayLabel = 'ID_COMISION_LIQUIDADA'
end
item
Name = 'FacturasCliente_REFERENCIA_COMISION'
DataType = datString
Size = 255
DisplayLabel = 'REFERENCIA_COMISION'
end
item
Name = 'FacturasCliente_ID_AGENTE'
DataType = datInteger
DisplayLabel = 'ID_AGENTE'
end
item
Name = 'FacturasCliente_Detalles_ID_ARTICULO'
DataType = datInteger
end
item
Name = 'FacturasCliente_Detalles_DESCUENTO'
DataType = datFloat
end
item
Name = 'FacturasCliente_Detalles_IMPORTE_PORTE'
DataType = datCurrency
end
item
Name = 'FacturasCliente_Detalles_REFERENCIA'
DataType = datString
Size = 255
end
item
Name = 'FacturasCliente_Detalles_REFERENCIA_PROVEEDOR'
DataType = datString
Size = 255
end
item
Name = 'FacturasCliente_IGNORAR_CONTABILIDAD'
DataType = datSmallInt
end>
Left = 150
Top = 22
end
object Bin2DataStreamer: TDABin2DataStreamer
Left = 48
Top = 80
end
object bpFacturasCliente: TDABusinessProcessor
Schema = schFacturasCliente
InsertCommandName = 'Insert_FacturasCliente'
DeleteCommandName = 'Delete_FacturasCliente'
UpdateCommandName = 'Update_FacturasCliente'
ReferencedDataset = 'FacturasCliente'
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 248
Top = 24
end
object bpFacturasClienteDetalles: TDABusinessProcessor
Schema = schFacturasCliente
InsertCommandName = 'Insert_FacturasCliente_Detalles'
DeleteCommandName = 'Delete_FacturasCliente_Detalles'
UpdateCommandName = 'Update_FacturasCliente_Detalles'
ReferencedDataset = 'FacturasCliente_Detalles'
ProcessorOptions = [poAutoGenerateRefreshDataset, poPrepareCommands]
UpdateMode = updWhereKeyOnly
Left = 248
Top = 77
end
end