diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm index 485fb256..ef3e73b1 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.dfm @@ -40,6 +40,8 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente inherited lblDesbloquear: TcxLabel Left = 687 ExplicitLeft = 687 + AnchorX = 732 + AnchorY = 14 end end inherited TBXDock: TTBXDock @@ -121,9 +123,7 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente 284) inherited Label1: TLabel Left = 378 - Width = 311 ExplicitLeft = 378 - ExplicitWidth = 311 end inherited eReferencia: TcxDBTextEdit Style.LookAndFeel.SkinName = '' @@ -178,8 +178,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' ExplicitLeft = 378 - ExplicitWidth = 339 - Width = 339 end inherited bElegirClienteFinal: TButton Left = 725 @@ -187,18 +185,13 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente end inherited frViewDatosYSeleccionClienteFacturaCliente1: TfrViewDatosYSeleccionClienteFacturaCliente Left = 367 - Width = 505 ExplicitLeft = 367 - ExplicitWidth = 505 inherited dxLayoutControl1: TdxLayoutControl - Width = 505 inherited edtlNombre: TcxDBTextEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 224 - Width = 224 end inherited edtNIFCIF: TcxDBTextEdit Left = 279 @@ -217,8 +210,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 121 - Width = 121 end inherited Button4: TButton Left = 359 @@ -231,8 +222,6 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 275 - Width = 275 end end end @@ -260,108 +249,102 @@ inherited fEditorFacturaCliente: TfEditorFacturaCliente ExplicitHeight = 284 inherited ToolBar1: TToolBar Width = 798 - Height = 78 + Height = 46 ExplicitWidth = 798 - ExplicitHeight = 78 + ExplicitHeight = 46 inherited ToolButton3: TToolButton Wrap = False end inherited ToolButton4: TToolButton Left = 278 Top = 0 + Wrap = True ExplicitLeft = 278 ExplicitTop = 0 end inherited ToolButton14: TToolButton - Left = 334 - Top = 0 + Left = 0 Wrap = False - ExplicitLeft = 334 - ExplicitTop = 0 + ExplicitLeft = 0 end inherited FontName: TJvFontComboBox - Left = 399 - Top = 0 - ExplicitLeft = 399 - ExplicitTop = 0 + Left = 65 + Top = 22 + ExplicitTop = 22 end - inherited ToolButton13: TToolButton [6] - Left = 0 - Top = 0 - Wrap = True - ExplicitLeft = 0 - ExplicitTop = 0 - ExplicitHeight = 27 - end - inherited FontSize: TEdit [7] - Left = 0 - Top = 27 + inherited FontSize: TEdit + Top = 22 Width = 248 - ExplicitLeft = 0 - ExplicitTop = 27 + ExplicitTop = 22 ExplicitWidth = 248 end - inherited UpDown1: TUpDown [8] - Left = 248 - Top = 27 - ExplicitLeft = 248 - ExplicitTop = 27 + inherited UpDown1: TUpDown + Left = 393 + Top = 22 + ExplicitLeft = 393 + ExplicitTop = 22 + end + inherited ToolButton13: TToolButton + Left = 410 + Top = 22 + ExplicitLeft = 410 + ExplicitTop = 22 end inherited ToolButton6: TToolButton - Left = 265 - Top = 27 - ExplicitLeft = 265 - ExplicitTop = 27 + Left = 418 + Top = 22 + ExplicitLeft = 418 + ExplicitTop = 22 end inherited ToolButton7: TToolButton - Left = 331 - Top = 27 - ExplicitLeft = 331 - ExplicitTop = 27 + Left = 484 + Top = 22 + ExplicitLeft = 484 + ExplicitTop = 22 end inherited ToolButton8: TToolButton - Left = 398 - Top = 27 - ExplicitLeft = 398 - ExplicitTop = 27 + Left = 551 + Top = 22 + ExplicitLeft = 551 + ExplicitTop = 22 end inherited ToolButton12: TToolButton Left = 0 - Top = 27 + Top = 22 Wrap = True ExplicitLeft = 0 - ExplicitTop = 27 + ExplicitTop = 22 ExplicitHeight = 27 end inherited ToolButton9: TToolButton Left = 0 - Top = 54 + Top = 49 ExplicitLeft = 0 - ExplicitTop = 54 + ExplicitTop = 49 end inherited ToolButton10: TToolButton Left = 145 - Top = 54 + Top = 49 ExplicitLeft = 145 - ExplicitTop = 54 + ExplicitTop = 49 end inherited ToolButton11: TToolButton Left = 270 - Top = 54 + Top = 49 ExplicitLeft = 270 - ExplicitTop = 54 + ExplicitTop = 49 end end inherited cxGrid: TcxGrid - Top = 104 + Top = 99 Width = 798 - Height = 180 + Height = 185 ExplicitTop = 104 ExplicitWidth = 798 ExplicitHeight = 180 end inherited TBXDock1: TTBXDock - Top = 78 + Top = 73 Width = 798 ExplicitTop = 78 ExplicitWidth = 798 diff --git a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas index 3ba2765a..eed82e53 100644 --- a/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uEditorFacturaCliente.pas @@ -333,10 +333,11 @@ begin else Factura.RE := 0; +//Desactivado porque en presupuestos no utilizan el catálogo de clientes // Si la factura tiene detalles hay que mirar si los descuentos y otros campos // para los artículos hay que cambiarlos. - if (FFactura.Detalles.RecordCount > 0) then - FController.DetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.Cliente); +// if (FFactura.Detalles.RecordCount > 0) then +// FController.DetallesController.ActualizarDetalles(FFactura.Detalles, FFactura.Cliente); end; procedure TfEditorFacturaCliente.pgPaginasChanging(Sender: TObject; diff --git a/Source/Modulos/Facturas de cliente/Views/uViewDatosYSeleccionClienteFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewDatosYSeleccionClienteFacturaCliente.pas index 32647063..5dc4cbf9 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewDatosYSeleccionClienteFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewDatosYSeleccionClienteFacturaCliente.pas @@ -241,12 +241,11 @@ begin if Assigned(ADireccion) then begin FDireccion := ADireccion; - FFactura.Edit; - if FDireccion.IDIsNull then - LimpiarDireccionDeFactura - else - CopiarDireccionAFactura; +// if FDireccion.IDIsNull then +// LimpiarDireccionDeFactura +// else + CopiarDireccionAFactura; EscribirTextoDireccion; end; @@ -292,6 +291,11 @@ begin if not FCliente.DataTable.Active then FCliente.DataTable.Active := True; + + if FCliente.Direcciones.RecordCount > 0 then + ElegirDireccionCliente + else + RefrescarDireccion; end else begin dsCliente.DataTable := NIL; diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm index f52be68f..c3d06807 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.dfm @@ -1,6 +1,6 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente - Width = 674 - Height = 407 + Width = 1146 + Height = 511 Align = alClient OnCreate = CustomViewCreate OnDestroy = CustomViewDestroy @@ -9,8 +9,8 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente object dxLayoutControl1: TdxLayoutControl Left = 0 Top = 0 - Width = 674 - Height = 407 + Width = 1146 + Height = 511 Align = alClient ParentBackground = True TabOrder = 0 @@ -20,10 +20,10 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente ExplicitWidth = 451 ExplicitHeight = 304 DesignSize = ( - 674 - 407) + 1146 + 511) object Label1: TLabel - Left = 373 + Left = 617 Top = 193 Width = 311 Height = 26 @@ -142,7 +142,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 269 end object bFormasPago: TButton - Left = 191 + Left = 435 Top = 103 Width = 132 Height = 23 @@ -173,7 +173,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 165 end object cbClienteFinal: TcxDBTextEdit - Left = 373 + Left = 617 Top = 227 Anchors = [akLeft, akTop, akRight] DataBinding.DataField = 'CLIENTE_FINAL' @@ -201,7 +201,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente Width = 339 end object bElegirClienteFinal: TButton - Left = 618 + Left = 1090 Top = 225 Width = 23 Height = 25 @@ -209,7 +209,7 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente TabOrder = 8 end inline frViewDatosYSeleccionClienteFacturaCliente1: TfrViewDatosYSeleccionClienteFacturaCliente - Left = 362 + Left = 606 Top = 30 Width = 505 Height = 138 @@ -221,40 +221,37 @@ inherited frViewFacturaCliente: TfrViewFacturaCliente ParentFont = False TabOrder = 6 ReadOnly = False - ExplicitLeft = 362 + ExplicitLeft = 606 ExplicitTop = 30 inherited dxLayoutControl1: TdxLayoutControl + ExplicitWidth = 101 inherited edtlNombre: TcxDBTextEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 224 - Width = 224 end inherited edtNIFCIF: TcxDBTextEdit - Left = 177 + Left = 405 Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitLeft = 177 + ExplicitLeft = 405 end inherited Button3: TBitBtn - Left = 88 - ExplicitLeft = 88 + Left = 316 + ExplicitLeft = 316 end inherited edtDireccion: TcxTextEdit Style.LookAndFeel.SkinName = '' StyleDisabled.LookAndFeel.SkinName = '' StyleFocused.LookAndFeel.SkinName = '' StyleHot.LookAndFeel.SkinName = '' - ExplicitWidth = 121 - Width = 121 end inherited Button4: TButton - Left = 257 - ExplicitLeft = 257 + Left = 485 + ExplicitLeft = 485 end end inherited ActionList1: TActionList diff --git a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas index 999d3a87..ff51ba47 100644 --- a/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas +++ b/Source/Modulos/Facturas de cliente/Views/uViewFacturaCliente.pas @@ -249,8 +249,7 @@ begin begin DADataSource.DataTable := FFactura.DataTable; - frViewDatosYSeleccionClienteFacturaCliente1.Factura := FFactura; - frViewDatosYSeleccionClienteFacturaCliente1.Cliente := FFactura.Cliente; + FViewClienteFactura.Factura := FFactura; FFormasPago := FFormasPagoController.BuscarTodos; dsFormaPago.DataTable := FFormasPago.DataTable; @@ -276,8 +275,7 @@ begin else begin DADataSource.DataTable := NIL; dsFormaPago.DataTable := NIL; - frViewDatosYSeleccionClienteFacturaCliente1.Factura := NIL; - frViewDatosYSeleccionClienteFacturaCliente1.Cliente := NIL; + FViewClienteFactura.Factura := NIL; end; end;