From e509c5b88266fd10987daf0dec729cf20e4d0822 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 24 Sep 2008 17:59:34 +0000 Subject: [PATCH] =?UTF-8?q?Ticket=20#141=20->=20A=C3=B1adir=20cuenta=20dom?= =?UTF-8?q?iciliacion=20bancaria=20en=20facturas=20de=20proveedor=20(como?= =?UTF-8?q?=20esta=20en=20facturas=20de=20cliente)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: https://192.168.0.254/svn/Proyectos.Tecsitel_FactuGES2/trunk@619 0c75b7a4-871f-7646-8a2f-f78d34cc349f --- .../Controller/uEmpresasController.pas | 9 ++- .../Views/uViewFacturaCliente.dfm | 44 ++++++++++++++ .../Views/uViewFacturaCliente.pas | 8 ++- .../Data/uDataModuleFacturasProveedor.dfm | 7 +++ .../Model/FacturasProveedor_model.dpk | Bin 1211 -> 1211 bytes .../Model/schFacturasProveedorClient_Intf.pas | 47 +++++++++++++-- .../Model/schFacturasProveedorServer_Intf.pas | 55 +++++++++++++++-- .../Servidor/srvFacturasProveedor_Impl.dfm | 49 ++++++++++++--- .../Views/uEditorFacturaProveedor.dfm | 38 ++++++++---- .../Views/uEditorFacturaProveedor.pas | 5 +- .../Views/uViewFacturaProveedor.dfm | 57 ++++++++++++++---- .../Views/uViewFacturaProveedor.pas | 50 ++++++++++++++- Source/Modulos/Obras/Views/uEditorObra.dfm | 14 ++++- Source/Modulos/Obras/Views/uEditorObra.pas | 5 +- 14 files changed, 330 insertions(+), 58 deletions(-) diff --git a/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas b/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas index 89c1c862..19fb3675 100644 --- a/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas +++ b/Source/ApplicationBase/Empresas/Controller/uEmpresasController.pas @@ -54,7 +54,7 @@ type implementation uses - uEditorRegistryUtils, cxControls, DB, uFactuGES_App, + uEditorRegistryUtils, cxControls, DB, uFactuGES_App, uStringsUtils, uDataModuleEmpresas, uIEditorEmpresa, uBizEmpresasDatosBancarios; { TEmpresasController } @@ -130,8 +130,11 @@ begin ADatosBancarios.DataTable.First; while not ADatosBancarios.DataTable.EOF do begin - Aux := Format('IBAN: %s - SWIFT: %s', [ADatosBancarios.IBAN, ADatosBancarios.SWIFT]); - Add(Format('%s=%d', [Aux, ADatosBancarios.ID])); + if not EsCadenaVacia(ADatosBancarios.IBAN) then + begin + Aux := Format('IBAN: %s - SWIFT: %s', [ADatosBancarios.IBAN, ADatosBancarios.SWIFT]); + Add(Format('%s=%d', [Aux, ADatosBancarios.ID])); + end; ADatosBancarios.DataTable.Next; end; end; diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm index 8f6e8396..f76b0a68 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm @@ -33,11 +33,15 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Style.Color = clInfoBk Style.HotTrack = False Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.Color = clMenuBar StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleDisabled.TextColor = clWindowText StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 0 Width = 165 end @@ -52,13 +56,17 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Style.Color = clInfoBk Style.HotTrack = False Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' Style.Shadow = False Style.ButtonStyle = bts3D Style.ButtonTransparency = ebtNone Style.PopupBorderStyle = epbsFrame3D StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 1 Width = 165 end @@ -73,9 +81,13 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Style.BorderStyle = ebs3D Style.HotTrack = False Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 5 Height = 124 Width = 267 @@ -104,32 +116,56 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente ExplicitHeight = 215 inherited edtlNombre: TcxDBTextEdit DataBinding.DataSource = DADataSource + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 210 Width = 210 end inherited edtNIFCIF: TcxDBTextEdit DataBinding.DataSource = DADataSource + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 210 Width = 210 end inherited edtCalle: TcxDBTextEdit DataBinding.DataSource = DADataSource + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 210 Width = 210 end inherited edtPoblacion: TcxDBTextEdit DataBinding.DataSource = DADataSource + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 92 Width = 92 end inherited edtProvincia: TcxDBTextEdit DataBinding.DataSource = DADataSource + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitWidth = 210 Width = 210 end inherited edtCodigoPostal: TcxDBTextEdit Left = 192 DataBinding.DataSource = DADataSource + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 192 end inherited Button3: TBitBtn @@ -159,14 +195,18 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Style.HotTrack = False Style.LookAndFeel.Kind = lfStandard Style.LookAndFeel.NativeStyle = True + Style.LookAndFeel.SkinName = '' Style.ButtonStyle = bts3D Style.PopupBorderStyle = epbsFrame3D StyleDisabled.LookAndFeel.Kind = lfStandard StyleDisabled.LookAndFeel.NativeStyle = True + StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.Kind = lfStandard StyleFocused.LookAndFeel.NativeStyle = True + StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.Kind = lfStandard StyleHot.LookAndFeel.NativeStyle = True + StyleHot.LookAndFeel.SkinName = '' TabOrder = 2 Width = 27 end @@ -191,8 +231,12 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Style.BorderColor = clWindowFrame Style.BorderStyle = ebs3D Style.HotTrack = False + Style.LookAndFeel.SkinName = '' Style.ButtonStyle = bts3D Style.PopupBorderStyle = epbsFrame3D + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' TabOrder = 4 Width = 165 end diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas index e46d93ab..2aaea5e9 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas @@ -116,9 +116,13 @@ begin Clear; Add(''); for i := 0 to ALista.Count - 1 do - begin Add(ALista.Names[i]); - Add(AListaIBAN.Names[i]); + + if AListaIBAN.Count > 0 then + begin + Add('--------------'); + for i := 0 to AListaIBAN.Count - 1 do + Add(AListaIBAN.Names[i]); end; finally EndUpdate; diff --git a/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm b/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm index 92df9d4b..17a90634 100644 --- a/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Data/uDataModuleFacturasProveedor.dfm @@ -227,6 +227,13 @@ inherited DataModuleFacturasProveedor: TDataModuleFacturasProveedor DisplayLabel = 'Importe del porte' Alignment = taRightJustify DictionaryEntry = 'FacturasProveedor_IMPORTE_PORTE' + end + item + Name = 'DATOS_BANCARIOS' + DataType = datString + Size = 255 + DisplayLabel = 'Datos bancarios' + DictionaryEntry = 'FacturasProveedor_DATOS_BANCARIOS' end> Params = <> StreamingOptions = [soDisableEventsWhileStreaming] diff --git a/Source/Modulos/Facturas de proveedor/Model/FacturasProveedor_model.dpk b/Source/Modulos/Facturas de proveedor/Model/FacturasProveedor_model.dpk index 52d266384b6c90acf826b7ffecc62ff5b3775cc1..94df676360dca8f7fdbc3d691a8cb0be8435cf36 100644 GIT binary patch delta 32 ocmdnZxtnvtRp!b0EDn?PnOP@aWuD4o&CA8hm715L$IHb40JSs;5&!@I delta 28 kcmdnZxtnvtRp!Z3EK?_6V0PuP=H=q$O3h2r end> Name = 'FacturasProveedor' @@ -318,6 +322,12 @@ object srvFacturasProveedor: TsrvFacturasProveedor Name = 'IMPORTE_PORTE' DataType = datCurrency DictionaryEntry = 'FacturasProveedor_IMPORTE_PORTE' + end + item + Name = 'DATOS_BANCARIOS' + DataType = datString + Size = 255 + DictionaryEntry = 'FacturasProveedor_DATOS_BANCARIOS' end> end item @@ -620,6 +630,12 @@ object srvFacturasProveedor: TsrvFacturasProveedor end item Params = < + item + Name = 'DATOS_BANCARIOS' + DataType = datString + Size = 255 + Value = '' + end item Name = 'ID' DataType = datAutoInc @@ -750,15 +766,15 @@ object srvFacturasProveedor: TsrvFacturasProveedor ' '#10' IMPORTE_TOTAL, OBSERVACIONES, ID_PROVEEDOR, NIF_CIF, '#10' ' + ' NOMBRE, CALLE, POBLACION, PROVINCIA, CODIGO_POSTAL, '#10' FECH' + 'A_ALTA, FECHA_MODIFICACION, USUARIO, ID_FORMA_PAGO, '#10' RECARG' + - 'O_EQUIVALENCIA, ID_TIPO_IVA, IMPORTE_NETO, IMPORTE_PORTE)'#10' VALU' + - 'ES'#10' (:ID, :ID_EMPRESA, :REFERENCIA, :REFERENCIA_PROVEEDOR,'#10' ' + - ' :FECHA_FACTURA, :BASE_IMPONIBLE, :DESCUENTO,'#10' :IMPORTE_DE' + - 'SCUENTO, :IVA, :IMPORTE_IVA, :RE, :IMPORTE_RE, '#10' :IMPORTE_TO' + - 'TAL, :OBSERVACIONES, :ID_PROVEEDOR, :NIF_CIF, '#10' :NOMBRE, :CA' + - 'LLE, :POBLACION, :PROVINCIA, :CODIGO_POSTAL, '#10' :FECHA_ALTA, ' + - ':FECHA_MODIFICACION, :USUARIO, :ID_FORMA_PAGO, '#10' :RECARGO_EQ' + - 'UIVALENCIA, :ID_TIPO_IVA, :IMPORTE_NETO, '#10' :IMPORTE_PORTE)'#10' ' + - ' '#10' '#10#10 + 'O_EQUIVALENCIA, ID_TIPO_IVA, IMPORTE_NETO, IMPORTE_PORTE,'#10' D' + + 'ATOS_BANCARIOS)'#10' VALUES'#10' (:ID, :ID_EMPRESA, :REFERENCIA, :RE' + + 'FERENCIA_PROVEEDOR,'#10' :FECHA_FACTURA, :BASE_IMPONIBLE, :DESCU' + + 'ENTO,'#10' :IMPORTE_DESCUENTO, :IVA, :IMPORTE_IVA, :RE, :IMPORTE' + + '_RE, '#10' :IMPORTE_TOTAL, :OBSERVACIONES, :ID_PROVEEDOR, :NIF_C' + + 'IF, '#10' :NOMBRE, :CALLE, :POBLACION, :PROVINCIA, :CODIGO_POSTA' + + 'L, '#10' :FECHA_ALTA, :FECHA_MODIFICACION, :USUARIO, :ID_FORMA_P' + + 'AGO, '#10' :RECARGO_EQUIVALENCIA, :ID_TIPO_IVA, :IMPORTE_NETO, '#10 + + ' :IMPORTE_PORTE, :DATOS_BANCARIOS)'#10' '#10' '#10#10 StatementType = stSQL ColumnMappings = <> end> @@ -785,6 +801,12 @@ object srvFacturasProveedor: TsrvFacturasProveedor end item Params = < + item + Name = 'DATOS_BANCARIOS' + DataType = datString + Size = 255 + Value = '' + end item Name = 'ID' Value = '' @@ -926,7 +948,8 @@ object srvFacturasProveedor: TsrvFacturasProveedor ' :USUARIO, '#10' ID_FORMA_PAGO = :ID_FORMA_PAGO, '#10' RECARGO_EQU' + 'IVALENCIA = :RECARGO_EQUIVALENCIA, '#10' ID_TIPO_IVA = :ID_TIPO_I' + 'VA, '#10' IMPORTE_NETO = :IMPORTE_NETO, '#10' IMPORTE_PORTE = :IMP' + - 'ORTE_PORTE'#10' WHERE'#10' (ID = :OLD_ID)'#10 + 'ORTE_PORTE,'#10' DATOS_BANCARIOS = :DATOS_BANCARIOS'#10' WHERE'#10' (' + + 'ID = :OLD_ID)'#10 StatementType = stSQL ColumnMappings = <> end> @@ -1469,6 +1492,12 @@ object srvFacturasProveedor: TsrvFacturasProveedor DataType = datDateTime DisplayLabel = 'Fecha de pago' end + item + Name = 'FacturasProveedor_DATOS_BANCARIOS' + DataType = datString + Size = 255 + DisplayLabel = 'Datos bancarios' + end item Name = 'FacturasProveedor_FECHA_VENCIMIENTO' DataType = datDateTime diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm index ef6a8acf..d22abbf9 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.dfm @@ -15,7 +15,7 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor Caption = 'Nueva factura de proveedor' ExplicitWidth = 819 inherited Image1: TImage - Left = 792 + Left = 686 Picture.Data = { 0A54504E474F626A65637489504E470D0A1A0A0000000D494844520000001800 0000180806000000E0773DF80000000970485973000017120000171201679FD2 @@ -37,6 +37,10 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor 454E44AE426082} ExplicitLeft = 742 end + inherited lblDesbloquear: TcxLabel + Left = 721 + ExplicitLeft = 721 + end end inherited TBXDock: TTBXDock Width = 819 @@ -216,6 +220,14 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor end end end + inherited cbCuentaBancaria: TcxDBComboBox + Style.LookAndFeel.SkinName = '' + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + ExplicitWidth = 165 + Width = 165 + end end end end @@ -254,13 +266,14 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor ExplicitLeft = 278 ExplicitTop = 0 end - inherited ToolButton14: TToolButton [4] + inherited ToolButton14: TToolButton Left = 334 Top = 0 + Wrap = False ExplicitLeft = 334 ExplicitTop = 0 end - inherited FontName: TJvFontComboBox [5] + inherited FontName: TJvFontComboBox Left = 399 Top = 0 ExplicitLeft = 399 @@ -269,10 +282,10 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor inherited FontSize: TEdit Left = 544 Top = 0 - Width = 136 + Width = 152 ExplicitLeft = 544 ExplicitTop = 0 - ExplicitWidth = 136 + ExplicitWidth = 152 end inherited ToolButton13: TToolButton [7] Left = 0 @@ -288,44 +301,43 @@ inherited fEditorFacturaProveedor: TfEditorFacturaProveedor ExplicitLeft = 0 ExplicitTop = 27 end - inherited ToolButton6: TToolButton [9] + inherited ToolButton6: TToolButton Left = 17 Top = 27 ExplicitLeft = 17 ExplicitTop = 27 end - inherited ToolButton7: TToolButton [10] + inherited ToolButton7: TToolButton Left = 83 Top = 27 ExplicitLeft = 83 ExplicitTop = 27 end - inherited ToolButton8: TToolButton [11] + inherited ToolButton8: TToolButton Left = 150 Top = 27 ExplicitLeft = 150 ExplicitTop = 27 end - inherited ToolButton12: TToolButton [12] + inherited ToolButton12: TToolButton Left = 233 Top = 27 ExplicitLeft = 233 ExplicitTop = 27 - ExplicitHeight = 22 end - inherited ToolButton9: TToolButton [13] + inherited ToolButton9: TToolButton Left = 241 Top = 27 ExplicitLeft = 241 ExplicitTop = 27 end - inherited ToolButton10: TToolButton [14] + inherited ToolButton10: TToolButton Left = 386 Top = 27 ExplicitLeft = 386 ExplicitTop = 27 end - inherited ToolButton11: TToolButton [15] + inherited ToolButton11: TToolButton Left = 511 Top = 27 ExplicitLeft = 511 diff --git a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas index 2148c114..49fdadfb 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas +++ b/Source/Modulos/Facturas de proveedor/Views/uEditorFacturaProveedor.pas @@ -14,7 +14,8 @@ uses dxLayoutLookAndFeels, JvExComCtrls, JvStatusBar, uBizTiposIVA, uViewDetallesDTO, uViewDetallesArticulos, uTiposIVAController, uViewDetallesFacturaProveedor, uViewFacturaProveedor, uDAInterfaces, - uViewDetallesGenerico, uViewPedidosFacturaProveedor; + uViewDetallesGenerico, uViewPedidosFacturaProveedor, cxControls, cxContainer, + cxEdit, cxLabel; type @@ -78,7 +79,7 @@ implementation {$R *.dfm} uses - cxDBEdit, uBizContactos, uDataModuleUsuarios, cxControls, uFactuGES_App, + cxDBEdit, uBizContactos, uDataModuleUsuarios, uFactuGES_App, uDetallesFacturaProveedorController, uDialogUtils, uDataTableUtils, uGenerarAlbaranesProvFacProvUtils; diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.dfm b/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.dfm index 5738007d..ab8d3495 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.dfm +++ b/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.dfm @@ -72,7 +72,7 @@ inherited frViewFacturaProveedor: TfrViewFacturaProveedor end object memObservaciones: TcxDBMemo Left = 22 - Top = 164 + Top = 191 Anchors = [akLeft, akTop, akRight, akBottom] DataBinding.DataField = 'OBSERVACIONES' DataBinding.DataSource = DADataSource @@ -88,7 +88,7 @@ inherited frViewFacturaProveedor: TfrViewFacturaProveedor StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.NativeStyle = True StyleHot.LookAndFeel.SkinName = '' - TabOrder = 5 + TabOrder = 6 Height = 159 Width = 301 end @@ -171,7 +171,7 @@ inherited frViewFacturaProveedor: TfrViewFacturaProveedor Font.Name = 'Tahoma' Font.Style = [] ParentFont = False - TabOrder = 6 + TabOrder = 7 ReadOnly = False ExplicitLeft = 322 ExplicitTop = 30 @@ -228,6 +228,27 @@ inherited frViewFacturaProveedor: TfrViewFacturaProveedor end end end + object cbCuentaBancaria: TcxDBComboBox + Left = 136 + Top = 140 + DataBinding.DataField = 'DATOS_BANCARIOS' + DataBinding.DataSource = DADataSource + Properties.DropDownListStyle = lsFixedList + Properties.ImmediatePost = True + Properties.ImmediateUpdateText = True + Properties.PostPopupValueOnTab = True + Style.BorderColor = clWindowFrame + Style.BorderStyle = ebs3D + Style.HotTrack = False + Style.LookAndFeel.SkinName = '' + Style.ButtonStyle = bts3D + Style.PopupBorderStyle = epbsFrame3D + StyleDisabled.LookAndFeel.SkinName = '' + StyleFocused.LookAndFeel.SkinName = '' + StyleHot.LookAndFeel.SkinName = '' + TabOrder = 5 + Width = 165 + end object dxLayoutControl1Group_Root: TdxLayoutGroup ShowCaption = False Hidden = True @@ -261,18 +282,28 @@ inherited frViewFacturaProveedor: TfrViewFacturaProveedor object dxLayoutControl1Group3: TdxLayoutGroup ShowCaption = False Hidden = True - LayoutDirection = ldHorizontal ShowBorder = False - object dxLayoutControl1Item4: TdxLayoutItem - AutoAligns = [aaVertical] - AlignHorz = ahClient - Caption = 'Forma de pago:' - Control = cbFormaPago - ControlOptions.ShowBorder = False - end - object dxLayoutControl1Item10: TdxLayoutItem + object dxLayoutControl1Group4: TdxLayoutGroup ShowCaption = False - Control = bFormasPago + Hidden = True + LayoutDirection = ldHorizontal + ShowBorder = False + object dxLayoutControl1Item4: TdxLayoutItem + AutoAligns = [aaVertical] + AlignHorz = ahClient + Caption = 'Forma de pago:' + Control = cbFormaPago + ControlOptions.ShowBorder = False + end + object dxLayoutControl1Item10: TdxLayoutItem + ShowCaption = False + Control = bFormasPago + ControlOptions.ShowBorder = False + end + end + object dxLayoutControl1Item7: TdxLayoutItem + Caption = 'Cuenta bancaria:' + Control = cbCuentaBancaria ControlOptions.ShowBorder = False end end diff --git a/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.pas b/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.pas index 4049ac4f..fcb8eff1 100644 --- a/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.pas +++ b/Source/Modulos/Facturas de proveedor/Views/uViewFacturaProveedor.pas @@ -46,6 +46,9 @@ type eReferenciaProveedor: TcxDBTextEdit; dxLayoutControl1Item3: TdxLayoutItem; frViewProveedorFactura: TfrViewDatosYSeleccionProveedor; + dxLayoutControl1Item7: TdxLayoutItem; + cbCuentaBancaria: TcxDBComboBox; + dxLayoutControl1Group4: TdxLayoutGroup; procedure bFormasPagoClick(Sender: TObject); procedure CustomViewDestroy(Sender: TObject); procedure CustomViewCreate(Sender: TObject); @@ -57,6 +60,7 @@ type FFormasPagoController : IFormasPagoController; function GetFactura: IBizFacturaProveedor; procedure SetFactura(const Value: IBizFacturaProveedor); + procedure RellenarCuentasBancarias; public property Factura: IBizFacturaProveedor read GetFactura write SetFactura; end; @@ -65,7 +69,8 @@ type implementation uses - uDataModuleContactos, schFacturasProveedorClient_Intf; + uDataModuleContactos, schFacturasProveedorClient_Intf, uFactuGES_App, + uEmpresasController; {$R *.dfm} @@ -121,9 +126,52 @@ begin Result := FFactura; end; +procedure TfrViewFacturaProveedor.RellenarCuentasBancarias; +var + AController : IEmpresasController; + ALista : TStringList; + AListaIBAN : TStringList; + i : integer; +begin + AController := TEmpresasController.Create; + try + ALista := AController.DarListaCuentasBancarias(AppFactuGES.EmpresaActiva); + AListaIBAN := AController.DarListaCuentasBancariasIBAN(AppFactuGES.EmpresaActiva); + try + with cbCuentaBancaria.Properties.Items do + begin + BeginUpdate; + try + Clear; + Add(''); + for i := 0 to ALista.Count - 1 do + Add(ALista.Names[i]); + + if AListaIBAN.Count > 0 then + begin + Add('--------------'); + for i := 0 to AListaIBAN.Count - 1 do + Add(AListaIBAN.Names[i]); + end; + finally + EndUpdate; + end; + end; + finally + FreeANDNIL(ALista); + FreeANDNIL(AListaIBAN); + end; + finally + AController := NIL; + end; +end; + procedure TfrViewFacturaProveedor.SetFactura(const Value: IBizFacturaProveedor); begin FFactura := Value; + + RellenarCuentasBancarias; + if Assigned(FFactura) then begin DADataSource.DataTable := FFactura.DataTable; diff --git a/Source/Modulos/Obras/Views/uEditorObra.dfm b/Source/Modulos/Obras/Views/uEditorObra.dfm index 3ddb76dd..48742a79 100644 --- a/Source/Modulos/Obras/Views/uEditorObra.dfm +++ b/Source/Modulos/Obras/Views/uEditorObra.dfm @@ -37,10 +37,14 @@ inherited fEditorObra: TfEditorObra B814FC13744DD1BF455C165144A928AEADA7EF9FCC8132039DE6808E89764705 F71CB45E6B9A55504F39ECDA5D7FBE002E8A0FD064A100E60000000049454E44 AE426082} - ExplicitLeft = 605 + ExplicitLeft = 619 ExplicitTop = -3 ExplicitHeight = 27 end + inherited lblDesbloquear: TcxLabel + Left = 507 + ExplicitLeft = 534 + end end inherited TBXDock: TTBXDock Width = 632 @@ -105,6 +109,14 @@ inherited fEditorObra: TfEditorObra ExplicitWidth = 618 ExplicitHeight = 332 end + object TabSheet1: TTabSheet + Caption = 'Presupuestos de cliente' + ImageIndex = 1 + end + object TabSheet2: TTabSheet + Caption = 'Pedidos a proveedor' + ImageIndex = 2 + end end inherited StatusBar: TJvStatusBar Width = 632 diff --git a/Source/Modulos/Obras/Views/uEditorObra.pas b/Source/Modulos/Obras/Views/uEditorObra.pas index 5c73ea35..d2e8f666 100644 --- a/Source/Modulos/Obras/Views/uEditorObra.pas +++ b/Source/Modulos/Obras/Views/uEditorObra.pas @@ -13,12 +13,15 @@ uses JvAppStorage, JvAppRegistryStorage, JvFormPlacement, JvComponentBase, uViewObras, uIEditorObra, uObrasController, JvExComCtrls, - JvStatusBar, dxLayoutLookAndFeels, uDAInterfaces, dxGDIPlusClasses; + JvStatusBar, dxLayoutLookAndFeels, uDAInterfaces, dxGDIPlusClasses, + cxControls, cxContainer, cxEdit, cxLabel; type TfEditorObra = class(TfEditorDBItem, IEditorObra) dxLayoutLookAndFeelList1: TdxLayoutLookAndFeelList; dxLayoutOfficeLookAndFeel1: TdxLayoutOfficeLookAndFeel; + TabSheet1: TTabSheet; + TabSheet2: TTabSheet; procedure FormShow(Sender: TObject); procedure dsDataTableDataChange(Sender: TObject; Field: TField); procedure CustomEditorClose(Sender: TObject; var Action: TCloseAction);