diff --git a/Output/Debug/Servidor/FactuGES_Server.exe b/Output/Debug/Servidor/FactuGES_Server.exe
index f7ca5f0b..44292d85 100644
Binary files a/Output/Debug/Servidor/FactuGES_Server.exe and b/Output/Debug/Servidor/FactuGES_Server.exe differ
diff --git a/Output/Debug/Servidor/Informes/InfAlbaranProveedor.fr3 b/Output/Debug/Servidor/Informes/InfAlbaranProveedor.fr3
new file mode 100644
index 00000000..5a5ddab4
--- /dev/null
+++ b/Output/Debug/Servidor/Informes/InfAlbaranProveedor.fr3
@@ -0,0 +1,35 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Source/Modulos/Albaranes de proveedor/Reports/uRptAlbaranesProveedor_Server.dfm b/Source/Modulos/Albaranes de proveedor/Reports/uRptAlbaranesProveedor_Server.dfm
new file mode 100644
index 00000000..5c0c54cb
--- /dev/null
+++ b/Source/Modulos/Albaranes de proveedor/Reports/uRptAlbaranesProveedor_Server.dfm
@@ -0,0 +1,1111 @@
+object RptAlbaranesProveedor: TRptAlbaranesProveedor
+ OldCreateOrder = True
+ OnCreate = DataModuleCreate
+ Height = 405
+ Width = 447
+ object DADataCabecera: TDADataSource
+ DataTable = tbl_Cabecera
+ Left = 264
+ Top = 72
+ end
+ object DADataDetalles: TDADataSource
+ DataTable = tbl_Detalles
+ Left = 344
+ Top = 72
+ end
+ object tbl_Cabecera: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ LogChanges = False
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ SchemaCall.Params = <>
+ DataRequestCall.Params = <>
+ DataUpdateCall.Params = <>
+ ScriptCall.Params = <>
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ IndexDefs = <>
+ Left = 264
+ Top = 128
+ end
+ object tbl_Detalles: TDACDSDataTable
+ RemoteUpdatesOptions = []
+ Fields = <>
+ Params = <>
+ MasterMappingMode = mmDataRequest
+ LogChanges = False
+ StreamingOptions = [soDisableEventsWhileStreaming]
+ RemoteFetchEnabled = False
+ SchemaCall.Params = <>
+ DataRequestCall.Params = <>
+ DataUpdateCall.Params = <>
+ ScriptCall.Params = <>
+ ReadOnly = False
+ DetailOptions = [dtCascadeOpenClose, dtCascadeApplyUpdates, dtAutoFetch, dtCascadeDelete, dtCascadeUpdate, dtDisableLogOfCascadeDeletes, dtDisableLogOfCascadeUpdates, dtIncludeInAllInOneFetch]
+ MasterOptions = [moCascadeOpenClose, moCascadeApplyUpdates, moCascadeDelete, moCascadeUpdate, moDisableLogOfCascadeDeletes, moDisableLogOfCascadeUpdates]
+ IndexDefs = <>
+ Left = 344
+ Top = 128
+ end
+ object DABINAdapter: TDABINAdapter
+ Left = 48
+ Top = 80
+ end
+ object frxRichObject1: TfrxRichObject
+ Left = 48
+ Top = 296
+ end
+ object frxBarCodeObject1: TfrxBarCodeObject
+ Left = 144
+ Top = 296
+ end
+ object frxOLEObject1: TfrxOLEObject
+ Left = 48
+ Top = 344
+ end
+ object frxCrossObject1: TfrxCrossObject
+ Left = 144
+ Top = 344
+ end
+ object frxCheckBoxObject1: TfrxCheckBoxObject
+ Left = 256
+ Top = 296
+ end
+ object frxGradientObject1: TfrxGradientObject
+ Left = 360
+ Top = 296
+ end
+ object frxChartObject1: TfrxChartObject
+ Left = 256
+ Top = 344
+ end
+ object schReport: TDASchema
+ ConnectionManager = dmServer.ConnectionManager
+ DataDictionary = DataDictionary
+ Datasets = <
+ item
+ Params = <
+ item
+ Name = 'ID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ TargetTable = 'V_ALBARANES_PROVEEDOR'
+ SQL =
+ 'SELECT'#10' V_ALBARANES_PROVEEDOR.ID,'#10' V_ALBARANES_PROVEEDOR.ID_EM' +
+ 'PRESA,'#10' V_ALBARANES_PROVEEDOR.ID_PROVEEDOR,'#10' V_ALBARANES_PROVE' +
+ 'EDOR.NOMBRE,'#10' V_ALBARANES_PROVEEDOR.FECHA_ALBARAN,'#10' V_ALBARANE' +
+ 'S_PROVEEDOR.REFERENCIA,'#10' V_ALBARANES_PROVEEDOR.ID_PEDIDO,'#10' V_A' +
+ 'LBARANES_PROVEEDOR.REF_PED_PROVEEDOR,'#10' V_ALBARANES_PROVEEDOR.CO' +
+ 'DIGO_POSTAL,'#10' V_ALBARANES_PROVEEDOR.POBLACION,'#10' V_ALBARANES_PR' +
+ 'OVEEDOR.PROVINCIA,'#10' V_ALBARANES_PROVEEDOR.PERSONA_CONTACTO,'#10' V' +
+ '_ALBARANES_PROVEEDOR.TELEFONO,'#10' V_ALBARANES_PROVEEDOR.CALLE,'#10' ' +
+ 'V_ALBARANES_PROVEEDOR.OBSERVACIONES,'#10' V_ALBARANES_PROVEEDOR.IMP' +
+ 'ORTE_TOTAL,'#10' EMPRESAS.NIF_CIF AS NIF_CIF_EMPRESA,'#10' EMPRESAS.NO' +
+ 'MBRE AS NOMBRE_EMPRESA,'#10' EMPRESAS.RAZON_SOCIAL AS RAZON_SOCIAL_' +
+ 'EMPRESA,'#10' EMPRESAS.TELEFONO_1 AS TELEFONO_1_EMPRESA,'#10' EMPRESAS' +
+ '.FAX AS FAX_EMPRESA,'#10' EMPRESAS.MOVIL_1 AS MOVIL_1_EMPRESA,'#10' EM' +
+ 'PRESAS.EMAIL_1 AS EMAIL_1_EMPRESA,'#10' EMPRESAS.PAGINA_WEB AS PAGI' +
+ 'NA_WEB_EMPRESA'#10'FROM'#10' V_ALBARANES_PROVEEDOR'#10' LEFT OUTER JOIN ' +
+ 'V_PROVEEDORES ON (V_PROVEEDORES.ID = V_ALBARANES_PROVEEDOR.ID_PR' +
+ 'OVEEDOR)'#10' LEFT OUTER JOIN EMPRESAS ON (EMPRESAS.ID = V_ALBARANE' +
+ 'S_PROVEEDOR.ID_EMPRESA)'#10'WHERE V_ALBARANES_PROVEEDOR.ID = :ID'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'OBSERVACIONES'
+ TableField = 'OBSERVACIONES'
+ end
+ item
+ DatasetField = 'NOMBRE'
+ TableField = 'NOMBRE'
+ end
+ item
+ DatasetField = 'CALLE'
+ TableField = 'CALLE'
+ end
+ item
+ DatasetField = 'POBLACION'
+ TableField = 'POBLACION'
+ end
+ item
+ DatasetField = 'REFERENCIA'
+ TableField = 'REFERENCIA'
+ end
+ item
+ DatasetField = 'ID'
+ TableField = 'ID'
+ end
+ item
+ DatasetField = 'ID_EMPRESA'
+ TableField = 'ID_EMPRESA'
+ end
+ item
+ DatasetField = 'CODIGO_POSTAL'
+ TableField = 'CODIGO_POSTAL'
+ end
+ item
+ DatasetField = 'PROVINCIA'
+ TableField = 'PROVINCIA'
+ end
+ item
+ DatasetField = 'PERSONA_CONTACTO'
+ TableField = 'PERSONA_CONTACTO'
+ end
+ item
+ DatasetField = 'TELEFONO'
+ TableField = 'TELEFONO'
+ end
+ item
+ DatasetField = 'NIF_CIF_EMPRESA'
+ TableField = 'NIF_CIF_EMPRESA'
+ end
+ item
+ DatasetField = 'NOMBRE_EMPRESA'
+ TableField = 'NOMBRE_EMPRESA'
+ end
+ item
+ DatasetField = 'RAZON_SOCIAL_EMPRESA'
+ TableField = 'RAZON_SOCIAL_EMPRESA'
+ end
+ item
+ DatasetField = 'TELEFONO_1_EMPRESA'
+ TableField = 'TELEFONO_1_EMPRESA'
+ end
+ item
+ DatasetField = 'FAX_EMPRESA'
+ TableField = 'FAX_EMPRESA'
+ end
+ item
+ DatasetField = 'MOVIL_1_EMPRESA'
+ TableField = 'MOVIL_1_EMPRESA'
+ end
+ item
+ DatasetField = 'EMAIL_1_EMPRESA'
+ TableField = 'EMAIL_1_EMPRESA'
+ end
+ item
+ DatasetField = 'PAGINA_WEB_EMPRESA'
+ TableField = 'PAGINA_WEB_EMPRESA'
+ end
+ item
+ DatasetField = 'FECHA_ALBARAN'
+ TableField = 'FECHA_ALBARAN'
+ end
+ item
+ DatasetField = 'ID_PEDIDO'
+ TableField = 'ID_PEDIDO'
+ end
+ item
+ DatasetField = 'IMPORTE_TOTAL'
+ TableField = 'IMPORTE_TOTAL'
+ end
+ item
+ DatasetField = 'ID_PROVEEDOR'
+ TableField = 'ID_PROVEEDOR'
+ end
+ item
+ DatasetField = 'REF_PED_PROVEEDOR'
+ TableField = 'REF_PED_PROVEEDOR'
+ end>
+ end>
+ Name = 'Informe_Cabecera'
+ Fields = <
+ item
+ Name = 'ID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ID_EMPRESA'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ID_PROVEEDOR'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'REFERENCIA'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'FECHA_ALBARAN'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ID_PEDIDO'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'OBSERVACIONES'
+ DataType = datMemo
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'REF_PED_PROVEEDOR'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'NOMBRE'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CALLE'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CODIGO_POSTAL'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PROVINCIA'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PERSONA_CONTACTO'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'TELEFONO'
+ DataType = datString
+ Size = 25
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'POBLACION'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'IMPORTE_TOTAL'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'NIF_CIF_EMPRESA'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'NOMBRE_EMPRESA'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'RAZON_SOCIAL_EMPRESA'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'TELEFONO_1_EMPRESA'
+ DataType = datString
+ Size = 25
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'FAX_EMPRESA'
+ DataType = datString
+ Size = 25
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'MOVIL_1_EMPRESA'
+ DataType = datString
+ Size = 25
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'EMAIL_1_EMPRESA'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'PAGINA_WEB_EMPRESA'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end
+ item
+ Params = <
+ item
+ Name = 'ID_ALBARAN'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ Value = ''
+ ParamType = daptInput
+ end>
+ Statements = <
+ item
+ Connection = 'IBX'
+ TargetTable = 'ALBARANES_CLIENTE_DETALLES'
+ SQL =
+ 'SELECT ALBARANES_PROVEEDOR_DETALLES.ID, ALBARANES_PROVEEDOR_DETA' +
+ 'LLES.ID_ALBARAN,'#10' ALBARANES_PROVEEDOR_DETALLES.POSICION, A' +
+ 'LBARANES_PROVEEDOR_DETALLES.TIPO_DETALLE,'#10' ALBARANES_PROVE' +
+ 'EDOR_DETALLES.CONCEPTO, ALBARANES_PROVEEDOR_DETALLES.CANTIDAD,'#10' ' +
+ ' ALBARANES_PROVEEDOR_DETALLES.IMPORTE_UNIDAD, ALBARANES_PRO' +
+ 'VEEDOR_DETALLES.IMPORTE_TOTAL,'#10' ARTICULOS.REFERENCIA, ARTI' +
+ 'CULOS.FAMILIA, ARTICULOS.REFERENCIA_PROV as REFERENCIA_PROVEEDOR' +
+ #10#10'FROM ALBARANES_PROVEEDOR_DETALLES'#10'LEFT JOIN ARTICULOS ON (ALBA' +
+ 'RANES_PROVEEDOR_DETALLES.ID_ARTICULO = ARTICULOS.ID)'#10'WHERE ID_AL' +
+ 'BARAN = :ID_ALBARAN'#10'ORDER BY POSICION'
+ StatementType = stSQL
+ ColumnMappings = <
+ item
+ DatasetField = 'CANTIDAD'
+ TableField = 'CANTIDAD'
+ end
+ item
+ DatasetField = 'POSICION'
+ TableField = 'POSICION'
+ end
+ item
+ DatasetField = 'ID'
+ TableField = 'ID'
+ end
+ item
+ DatasetField = 'TIPO_DETALLE'
+ TableField = 'TIPO_DETALLE'
+ end
+ item
+ DatasetField = 'CONCEPTO'
+ TableField = 'CONCEPTO'
+ end
+ item
+ DatasetField = 'IMPORTE_UNIDAD'
+ TableField = 'IMPORTE_UNIDAD'
+ end
+ item
+ DatasetField = 'IMPORTE_TOTAL'
+ TableField = 'IMPORTE_TOTAL'
+ end
+ item
+ DatasetField = 'REFERENCIA'
+ TableField = 'REFERENCIA'
+ end
+ item
+ DatasetField = 'FAMILIA'
+ TableField = 'FAMILIA'
+ end
+ item
+ DatasetField = 'REFERENCIA_PROVEEDOR'
+ TableField = 'REFERENCIA_PROVEEDOR'
+ end
+ item
+ DatasetField = 'ID_ALBARAN'
+ TableField = 'ID_ALBARAN'
+ end>
+ end>
+ Name = 'Informe_Detalles'
+ Fields = <
+ item
+ Name = 'ID'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'ID_ALBARAN'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'POSICION'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'TIPO_DETALLE'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'REFERENCIA'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CONCEPTO'
+ DataType = datString
+ Size = 2000
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'CANTIDAD'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'IMPORTE_UNIDAD'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'IMPORTE_TOTAL'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'FAMILIA'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end
+ item
+ Name = 'REFERENCIA_PROVEEDOR'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ Alignment = taLeftJustify
+ InPrimaryKey = False
+ Calculated = False
+ Lookup = False
+ LookupCache = False
+ end>
+ BusinessRulesClient.ScriptLanguage = rslPascalScript
+ BusinessRulesServer.ScriptLanguage = rslPascalScript
+ end>
+ Commands = <>
+ RelationShips = <>
+ UpdateRules = <>
+ Left = 48
+ Top = 16
+ end
+ object DataDictionary: TDADataDictionary
+ Fields = <
+ item
+ Name = 'FacturasCliente_ID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ DisplayLabel = 'ID'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_ID_EMPRESA'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'ID_EMPRESA'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_ID_CONTRATO'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'ID_CONTRATO'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_FECHA_FACTURA'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Fecha de las factura'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_VENCIMIENTO'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Vencimiento'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_SITUACION'
+ DataType = datString
+ Size = 255
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Situaci'#243'n'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_BASE_IMPONIBLE'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Base imponible'
+ Alignment = taRightJustify
+ end
+ item
+ Name = 'FacturasCliente_IMPORTE_DESCUENTO'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Importe dto.'
+ Alignment = taRightJustify
+ end
+ item
+ Name = 'FacturasCliente_IMPORTE_IVA'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Importe IVA'
+ Alignment = taRightJustify
+ end
+ item
+ Name = 'FacturasCliente_IMPORTE_TOTAL'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Importe total'
+ Alignment = taRightJustify
+ end
+ item
+ Name = 'FacturasCliente_FORMA_PAGO'
+ DataType = datMemo
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Forma de pago'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_ID_CLIENTE'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'ID_CLIENTE'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_NIF_CIF'
+ DataType = datString
+ Size = 15
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'NIF/CIF'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_CODIGO_POSTAL'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'C'#243'd. postal'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_FECHA_ALTA'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'FECHA_ALTA'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_FECHA_MODIFICACION'
+ DataType = datDateTime
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'FECHA_MODIFICACION'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_OBSERVACIONES'
+ DataType = datMemo
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Observaciones'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_NOMBRE'
+ DataType = datString
+ Size = 100
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Cliente'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_CALLE'
+ DataType = datString
+ Size = 150
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Direcci'#243'n'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_PROVINCIA'
+ DataType = datString
+ Size = 30
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Provincia'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_POBLACION'
+ DataType = datString
+ Size = 150
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Poblaci'#243'n'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_IVA'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'IVA'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_USUARIO'
+ DataType = datString
+ Size = 100
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'USUARIO'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_REFERENCIA'
+ DataType = datString
+ Size = 20
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Referencia'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_DESCUENTO'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Dto.'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_Detalles_ID'
+ DataType = datAutoInc
+ BlobType = dabtUnknown
+ Required = True
+ DisplayWidth = 0
+ DisplayLabel = 'ID'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_Detalles_ID_FACTURA'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'ID_FACTURA'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_Detalles_TIPO_DETALLE'
+ DataType = datString
+ Size = 10
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Tipo detalle'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_Detalles_CONCEPTO'
+ DataType = datString
+ Size = 2000
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Concepto'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_Detalles_IMPORTE_UNIDAD'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Importe unidad'
+ Alignment = taRightJustify
+ end
+ item
+ Name = 'FacturasCliente_Detalles_IMPORTE_TOTAL'
+ DataType = datFloat
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Importe total'
+ Alignment = taRightJustify
+ end
+ item
+ Name = 'FacturasCliente_Detalles_VISIBLE'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = #191'Visible?'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_Detalles_POSICION'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Posici'#243'n'
+ Alignment = taLeftJustify
+ end
+ item
+ Name = 'FacturasCliente_Detalles_CANTIDAD'
+ DataType = datInteger
+ BlobType = dabtUnknown
+ DisplayWidth = 0
+ DisplayLabel = 'Cantidad'
+ Alignment = taLeftJustify
+ end>
+ Left = 46
+ Top = 158
+ end
+ object frxReport: TfrxReport
+ Version = '3.23.7'
+ DotMatrixReport = False
+ EngineOptions.DoublePass = True
+ IniFile = '\Software\Fast Reports'
+ PreviewOptions.Buttons = [pbPrint, pbLoad, pbSave, pbExport, pbZoom, pbFind, pbOutline, pbPageSetup, pbTools, pbEdit, pbNavigator, pbExportQuick]
+ PreviewOptions.Zoom = 1.000000000000000000
+ PrintOptions.Printer = 'Por defecto'
+ ReportOptions.CreateDate = 39065.872423495400000000
+ ReportOptions.LastChange = 39245.797981226850000000
+ ScriptLanguage = 'PascalScript'
+ ScriptText.Strings = (
+ ''
+ 'procedure DatosEmpresaOnBeforePrint(Sender: TfrxComponent);'
+ 'var'
+ ' Cadena: String;'
+ 'begin'
+ ' DatosEmpresa.Lines.Clear;'
+ ' if ( <> '#39#39') then'
+ ' Cadena := '#39'TLF: '#39' + ;'
+ ' if ( <> '#39#39') then'
+
+ ' Cadena := Cadena + '#39' FAX: '#39' + ;'
+ ' DatosEmpresa.Lines.Add(Cadena);'
+ 'end;'
+ ''
+ 'procedure NombreEmpresaOnBeforePrint(Sender: TfrxComponent);'
+ 'begin'
+ ' NombreEmpresa.Lines.Clear;'
+ ' NombreEmpresa.Lines.Add();'
+ 'end;'
+ ''
+ 'procedure DireccionEnvioOnBeforePrint(Sender: TfrxComponent);'
+ 'var'
+ ' ACadena : String;'
+ 'begin'
+ ' ACadena := '#39#39';'
+ ' DireccionEnvio.Lines.Clear;'
+ ''
+ ' if ( <> '#39#39') then'
+ ' ACadena := ;'
+ ' if ( <> '#39#39') then'
+
+ ' ACadena := ACadena + '#39' (tlf: '#39' + ' +
+ ' + '#39' )'#39';'
+ ''
+ ' DireccionEnvio.Lines.Add(ACadena);'
+ ' ACadena := '#39#39';'
+ ' DireccionEnvio.Lines.Add(ACadena);'
+ ''
+ ' DireccionEnvio.Lines.Add();'
+ ' if ( <> '#39#39') then'
+ ' ACadena := + '#39' '#39';'
+ ' if ( <> '#39#39') then'
+ ' ACadena := ACadena + ;'
+ ''
+ ' if (ACadena <> '#39#39') then'
+ ' DireccionEnvio.Lines.Add(ACadena);'
+ ''
+ ' if ( <> '#39#39') then'
+ ' DireccionEnvio.Lines.Add();'
+ 'end;'
+ ''
+ 'procedure Memo2OnBeforePrint(Sender: TfrxComponent);'
+ 'begin'
+ ' Memo2.Lines.Clear;'
+ ' if (StrToFloat() < 0) then'
+ ' Memo2.Lines.Add('#39'ORDEN DE DEVOLUCI'#211'N'#39')'
+ ' else'
+ ' Memo2.Lines.Add('#39'ALBAR'#193'N DE PROVEEDOR'#39')'
+ 'end;'
+ ''
+ 'begin'
+ ''
+ 'end.')
+ ShowProgress = False
+ StoreInDFM = False
+ Left = 169
+ Top = 16
+ Datasets = <
+ item
+ DataSet = frxDBCabecera
+ DataSetName = 'frxDBCabecera'
+ end
+ item
+ DataSet = frxDBDetalles
+ DataSetName = 'frxDBDetalles'
+ end>
+ Variables = <>
+ Style = <>
+ end
+ object frxDBCabecera: TfrxDBDataset
+ UserName = 'frxDBCabecera'
+ CloseDataSource = False
+ DataSource = DADataCabecera
+ Left = 264
+ Top = 16
+ end
+ object frxDBDetalles: TfrxDBDataset
+ UserName = 'frxDBDetalles'
+ CloseDataSource = False
+ DataSource = DADataDetalles
+ Left = 344
+ Top = 16
+ end
+end
diff --git a/Source/Modulos/Albaranes de proveedor/Reports/uRptAlbaranesProveedor_Server.pas b/Source/Modulos/Albaranes de proveedor/Reports/uRptAlbaranesProveedor_Server.pas
new file mode 100644
index 00000000..773e0ac8
--- /dev/null
+++ b/Source/Modulos/Albaranes de proveedor/Reports/uRptAlbaranesProveedor_Server.pas
@@ -0,0 +1,93 @@
+unit uRptAlbaranesProveedor_Server;
+
+interface
+
+uses
+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
+ Dialogs, frxClass, frxDBSet, uDAScriptingProvider,
+ uDADataTable, uDACDSDataTable, DB, uDAClasses, frxChart, frxGradient,
+ frxChBox, frxCross, frxOLE, frxBarcode, frxRich, uDABINAdapter, uROTypes,
+ uDAInterfaces;
+
+type
+ TRptAlbaranesProveedor = class(TDataModule)
+ DADataCabecera: TDADataSource;
+ DADataDetalles: TDADataSource;
+ tbl_Cabecera: TDACDSDataTable;
+ tbl_Detalles: TDACDSDataTable;
+ DABINAdapter: TDABINAdapter;
+ frxRichObject1: TfrxRichObject;
+ frxBarCodeObject1: TfrxBarCodeObject;
+ frxOLEObject1: TfrxOLEObject;
+ frxCrossObject1: TfrxCrossObject;
+ frxCheckBoxObject1: TfrxCheckBoxObject;
+ frxGradientObject1: TfrxGradientObject;
+ frxChartObject1: TfrxChartObject;
+ frxDBCabecera: TfrxDBDataset;
+ frxDBDetalles: TfrxDBDataset;
+ frxReport: TfrxReport;
+ schReport: TDASchema;
+ DataDictionary: TDADataDictionary;
+ procedure DataModuleCreate(Sender: TObject);
+ private
+ FConnection: IDAConnection;
+ public
+ function GenerarAlbaran(const AID : Integer): Binary;
+ end;
+
+implementation
+
+{$R *.dfm}
+
+uses
+ uDataModuleServer, schAlbaranesProveedorClient_Intf;
+
+const
+ rptInforme = 'InfAlbaranProveedor.fr3';
+
+ { Dataset names for schReport }
+ ds_InformeCabecera = 'Informe_Cabecera';
+ ds_InformeDetalles = 'Informe_Detalles';
+
+
+{ TRptAlbaranesCliente }
+
+
+procedure TRptAlbaranesProveedor.DataModuleCreate(Sender: TObject);
+begin
+ schReport.ConnectionManager := dmServer.ConnectionManager;
+ FConnection := dmServer.DarNuevaConexion;
+ frxReport.EngineOptions.NewSilentMode := simReThrow;
+end;
+
+function TRptAlbaranesProveedor.GenerarAlbaran(const AID: Integer): Binary;
+var
+ dsMaster: IDADataset;
+ dsDetail: IDADataset;
+ AStream: TMemoryStream;
+begin
+ AStream := TMemoryStream.Create;
+ Result := Binary.Create;
+ FConnection.BeginTransaction;
+ try
+ dsMaster := schReport.NewDataset(FConnection, ds_InformeCabecera, ['ID'], [AID]);
+ dsDetail := schReport.NewDataset(FConnection, ds_InformeDetalles, ['ID_ALBARAN'], [AID], False);
+
+ AStream.Clear;
+ DABINAdapter.WriteDataset(AStream, dsMaster, [woRows, woSchema], -1);
+ DABINAdapter.ReadDataset(AStream, tbl_Cabecera, TRUE, '', TRUE, TRUE);
+
+ AStream.Clear;
+ DABINAdapter.WriteDataset(AStream, dsDetail, [woRows, woSchema], -1);
+ DABINAdapter.ReadDataset(AStream, tbl_Detalles, TRUE, '', TRUE, TRUE);
+
+ frxReport.LoadFromFile(DarRutaInformes + rptInforme, True);
+ frxReport.PrepareReport;
+ frxReport.PreviewPages.SaveToStream(Result);
+ finally
+ AStream.Free;
+ FConnection.RollbackTransaction;
+ end;
+end;
+
+end.
diff --git a/Source/Modulos/Albaranes de proveedor/Servidor/srvAlbaranesProveedor_Impl.pas b/Source/Modulos/Albaranes de proveedor/Servidor/srvAlbaranesProveedor_Impl.pas
index fa605c0a..79db8772 100644
--- a/Source/Modulos/Albaranes de proveedor/Servidor/srvAlbaranesProveedor_Impl.pas
+++ b/Source/Modulos/Albaranes de proveedor/Servidor/srvAlbaranesProveedor_Impl.pas
@@ -38,7 +38,7 @@ type
protected
{ IsrvAlbaranesProveedor methods }
function GetNextAutoInc(const GeneratorName: String): Integer;
-// function GenerateReport(const ID: Integer): Binary;
+ function GenerateReport(const ID: Integer): Binary;
end;
implementation
@@ -48,8 +48,7 @@ uses
Dialogs,
{Generated:} FactuGES_Invk, uDataModuleServer, uDatabaseUtils,
schAlbaranesProveedorClient_Intf, uRestriccionesUsuarioUtils,
- uBizAlbaranProveedorServer;
-// uRptAlbaranesProveedor_Server;
+ uBizAlbaranProveedorServer, uRptAlbaranesProveedor_Server;
{ uRORemoteDataModule,
fServerForm, Variants, IB, schAlbaranesProveedorClient_Intf;
@@ -85,6 +84,18 @@ begin
bpAlbaranesProveedor.BusinessRulesID := BIZ_SERVER_ALBARAN_PROVEEDOR;
end;
+function TsrvAlbaranesProveedor.GenerateReport(const ID: Integer): Binary;
+var
+ AReportGenerator : TRptAlbaranesProveedor;
+begin
+ AReportGenerator := TRptAlbaranesProveedor.Create(nil);
+ try
+ Result := AReportGenerator.GenerarAlbaran(ID);
+ finally
+ FreeAndNIL(AReportGenerator);
+ end;
+end;
+
function TsrvAlbaranesProveedor.GetNextAutoInc(const GeneratorName: String): Integer;
begin
Result := uDatabaseUtils.GetNextAutoInc(GeneratorName)
diff --git a/Source/Servicios/FactuGES.RODL b/Source/Servicios/FactuGES.RODL
index fcc347c5..0a243594 100644
--- a/Source/Servicios/FactuGES.RODL
+++ b/Source/Servicios/FactuGES.RODL
@@ -272,6 +272,14 @@
+
+
+
+
+
+
+
+
diff --git a/Source/Servicios/RODLFILE.res b/Source/Servicios/RODLFILE.res
index 5f6c2356..adca1c0b 100644
Binary files a/Source/Servicios/RODLFILE.res and b/Source/Servicios/RODLFILE.res differ
diff --git a/Source/Servidor/FactuGES_Server.dpr b/Source/Servidor/FactuGES_Server.dpr
index 754d4092..58029884 100644
--- a/Source/Servidor/FactuGES_Server.dpr
+++ b/Source/Servidor/FactuGES_Server.dpr
@@ -109,7 +109,8 @@ uses
schPedidosClienteServer_Intf in '..\Modulos\Pedidos de cliente\Model\schPedidosClienteServer_Intf.pas',
schInventarioClient_Intf in '..\Modulos\Inventario\Model\schInventarioClient_Intf.pas',
schInventarioServer_Intf in '..\Modulos\Inventario\Model\schInventarioServer_Intf.pas',
- srvHistoricoMovimientos_Impl in '..\Modulos\Historico de movimientos\Servidor\srvHistoricoMovimientos_Impl.pas' {srvHistoricoMovimientos: TDARemoteService};
+ srvHistoricoMovimientos_Impl in '..\Modulos\Historico de movimientos\Servidor\srvHistoricoMovimientos_Impl.pas' {srvHistoricoMovimientos: TDARemoteService},
+ uRptAlbaranesProveedor_Server in '..\Modulos\Albaranes de proveedor\Reports\uRptAlbaranesProveedor_Server.pas' {RptAlbaranesProveedor: TDataModule};
{$R *.res}
{$R ..\Servicios\RODLFile.res}
diff --git a/Source/Servidor/uDataModuleServer.dfm b/Source/Servidor/uDataModuleServer.dfm
index 22bfb411..975c85e7 100644
--- a/Source/Servidor/uDataModuleServer.dfm
+++ b/Source/Servidor/uDataModuleServer.dfm
@@ -56,9 +56,9 @@ object dmServer: TdmServer
item
Name = 'IBX'
ConnectionString =
- 'IBX?Server=localhost;Database=t:\Codigo (Luis LeOn)\BD\FACTUGES.' +
- 'FDB;UserID=sysdba;Password=masterkey;Dialect=3;Charset=ISO8859_1' +
- ';'
+ 'IBX?Server=localhost;Database=E:\Codigo (Luis Le'#243'n)\Database\FAC' +
+ 'TUGES.FDB;UserID=sysdba;Password=masterkey;Dialect=3;Charset=ISO' +
+ '8859_1;'
Default = True
Tag = 0
end>